Skip to content

Glossary

Use this page when a lesson uses a term you have not seen before. The goal is not to memorize every definition. The goal is to build a shared vocabulary so you can ask better questions and understand what OpenCode is doing.

AI and LLM Basics

Agent

An agent is an LLM plus tools plus a loop.

In plain English: an agent can read your request, inspect files, run tools, observe what happened, and decide what to do next.

Example: In OpenCode, the plan agent can investigate a bug without editing files. The build agent can edit files and run commands.

Agent Loop

The repeated cycle an agent follows:

  1. Read the user's request.
  2. Inspect context, files, or tool output.
  3. Decide the next action.
  4. Use a tool.
  5. Observe the result.
  6. Continue until the task is done or blocked.

This is what makes OpenCode different from a normal chat window.

AI-Assisted Coding

Using an AI model or agent to help with programming tasks such as reading code, explaining errors, writing tests, refactoring, or drafting documentation.

The important word is assisted. You still own the judgment, review, and final decision.

Context

The information available to the model right now.

Context may include your prompt, previous messages, file contents, command output, AGENTS.md, loaded skills, and tool results.

Better context usually produces better answers.

Context Window

The maximum amount of text a model can consider at one time.

If the conversation becomes too large, older details may be summarized or dropped. This is why concise prompts, scoped tasks, and subagents matter later in the course.

Hallucination

When an LLM produces something that sounds confident but is false, outdated, or invented.

Example: The model names a CLI flag that does not exist, or cites a file that is not in your repo.

How to handle it: ask the agent to verify against files, command output, or official docs.

Large Language Model (LLM)

A machine learning model trained to predict text. LLMs generate responses one token at a time based on patterns learned during training and the context you provide.

Examples include models from Anthropic, OpenAI, Google, local model providers, and others.

Model

The specific LLM used for a task.

Different models vary in speed, cost, reasoning ability, coding ability, context size, and tool-use reliability.

Provider

The company or service that gives OpenCode access to a model.

OpenCode is provider-agnostic, which means it can work with different model providers instead of locking you into only one.

Prompt

The instruction you give to an LLM or agent.

A strong prompt includes the goal, context, constraints, and expected output.

Weak prompt: fix this

Better prompt: Find why the login test fails. Start in plan mode, do not edit files yet, and report the likely cause with file references.

Token

A small chunk of text processed by an LLM. A token may be a word, part of a word, punctuation, or whitespace.

Models read and write tokens, not whole human sentences.

OpenCode Terms

AGENTS.md

A project instruction file for agents.

Use it to explain how the repo works, which commands are safe, what files are off-limits, how tests run, and what conventions the agent should follow.

Think of it as the repo's "how to work here" guide for AI agents.

Build Mode

The OpenCode mode used when you want the agent to make changes.

Use build mode when you are ready for edits, commands, file creation, or implementation.

Course rule: explore first when the task is risky or unclear, then build.

Command / Slash Command

A command (also called a slash command) is a reusable prompt you invoke by typing /name in OpenCode.

Commands are useful when you type the same workflow repeatedly. In this course, we use the Rule of Three: if you have typed the same prompt three times, consider turning it into a command.

Examples: /explain-file src/auth.ts, /init, /test, /review-pr 123

Commands reduce repeated prompting and help teams standardize workflows.

Custom Agent

An agent you define for a specific job.

Examples:

  • A docs writer that can edit Markdown but should not run shell commands.
  • A security reviewer that is read-only.
  • A test-impact subagent that can run tests and summarize risk.

LSP

Language Server Protocol (LSP). A protocol that provides language-specific code intelligence — autocomplete, go-to-definition, hover type info, diagnostics — directly in your editor or terminal.

OpenCode uses LSP to understand your code without sending code context to the model on every request.

MCP

Model Context Protocol. A protocol that lets agents connect to external tools, services, and data sources.

Examples: GitHub, databases, browsers, file systems, internal APIs.

MCP appears in Week 8 after you understand prompts, commands, skills, and agents.

OpenCode

An open-source, provider-agnostic agentic CLI for working with code from your terminal.

In this course, OpenCode is the main tool you use to learn agentic engineering.

Plan Mode

The OpenCode mode used for safe exploration.

Use plan mode when you want the agent to read, inspect, reason, explain, or propose a plan without changing files.

Good uses:

  • Code review
  • Security audit
  • Bug investigation
  • Understanding a new repo
  • Asking "what would you change?" before allowing edits

Plugin

An extension that adds capabilities to OpenCode itself.

Plugins extend OpenCode's own engine — they add custom tools, register new output formatters, or modify how OpenCode processes certain file types. They are distinct from MCP servers, which connect OpenCode to external services.

Fetch Tool

A built-in OpenCode tool that lets an agent retrieve content from URLs. The agent uses it to read documentation, check API responses, or fetch web pages.

Controlled by the webfetch permission (allow / ask / deny).

Groq

A model provider known for very fast inference speeds. Useful for lightweight or iterative coding tasks where latency matters more than raw capability.

Configured in opencode.jsonc under providers.groq.

OpenRouter

A model provider that acts as a router — one API key gives access to many models from different providers. Useful for experimenting with different models without managing multiple API keys.

Copilot Provider

OpenCode can use your GitHub Copilot subscription as a model provider. This means no separate API billing — the cost is covered by your Copilot subscription.

Skill

A reusable Markdown knowledge file that an agent can discover and load when relevant.

Commands are invoked by you. Skills are selected by the agent.

Example: A release-notes skill might load automatically when you ask, "Draft release notes from these commits."

Subagent

A specialized agent called by another agent.

Subagents are useful for context isolation and focused work. For example, a primary orchestrator can ask a security-checker subagent to review only security issues, then use that report in the main workflow.

Task

A tool that lets one agent invoke a subagent with its own context, instructions, and tools. Useful for delegating focused work while maintaining isolation.

TodoWrite

A tool for creating, updating, and tracking task lists. Agents use TodoWrite to maintain a visible progress checklist during multi-step workflows.

TUI

Text User Interface. A terminal-based interface that behaves more like an app than a single command.

Running opencode opens the interactive TUI.

WebSearch

A tool that lets an agent search the web for current information. Use when the task requires recent docs, API changes, news, or any information outside the agent's training data or the local codebase.

Reasoning Effort

A configuration setting that controls how much "thinking" a model does before responding.

Values: low (cheap, fast), medium (balanced), high (thorough, expensive).

Higher reasoning effort is better for security audits and complex refactors. Lower effort is fine for formatting tasks and boilerplate generation.

Terminal and Git Terms

CLI

Command Line Interface. A tool you use by typing commands in a terminal.

OpenCode is a CLI because you run it with commands such as opencode or opencode -p "Explain this repo" -f json.

Commit

A saved snapshot of changes in git.

In this course, commits are checkpoints. They let you review what changed and recover if an agent goes off track.

Directory

A folder on your computer.

Example: reference/ is a directory in this course repo.

Git

A version control system. Git tracks file changes over time.

You do not need to be a git expert for this course, but you do need to understand status, diff, commit, branch, and restore concepts.

Repository

A project folder tracked by git.

Short form: repo.

Working Directory

The folder where a command runs.

If OpenCode is pointed at the wrong working directory, it may inspect or edit the wrong project. Always check where you are before starting serious work.

Working Tree

The current state of files in a git repository, including modified, staged, and untracked files.

Before asking an agent to edit code, check the working tree so you know what changes already exist.

Course Judgment Terms

Approval Prompt

A confirmation step before an agent performs an action.

Approval prompts protect you from accidental file edits, destructive shell commands, or unexpected external actions.

Context Bleed

When information from one task, agent, or concern leaks into another and causes confusion.

Example: A security subagent starts commenting on code style because the handoff was vague.

Deny-by-Default

A permissions strategy where an agent starts with minimal access and only gets the tools it truly needs.

This is safer for shared agents, production repos, and high-risk workflows.

SSE (Server-Sent Events)

A protocol for streaming data from a server to a client over HTTP. OpenCode uses SSE to connect to remote MCP servers that run on other machines, containers, or shared team infrastructure.

Configured by setting "type": "sse" in an MCP server config entry.

Shell Configuration

The shell section in opencode.jsonc controls which shell OpenCode uses when executing commands via the bash tool.

Example: setting path to /bin/zsh and args to ["-l"] loads your login environment (PATH, aliases, etc.).

Auto-Compact

OpenCode's automatic context window management. When enabled, OpenCode summarizes older conversation turns to free space in the context window.

Controlled by the autoCompact setting in opencode.jsonc (default: true).

Evaluation (Eval)

A repeatable test for agent behavior.

Example: Give your code-review agent three fixture PRs and check whether it correctly identifies the risky one.

Handoff Contract

The agreed input and output shape between agents.

Example: security-checker receives a PR diff and returns findings with severity, file, line, and recommendation.

Good handoff contracts reduce vague summaries and conflicting edits.

Human-in-the-Loop

A workflow where the human reviews, approves, or redirects the agent at important points.

This course teaches high agency, not blind automation. You should know when to let the agent continue and when to stop it.

Permission Boundary

A limit on what an agent is allowed to do.

Examples: read-only access, no shell commands, no network calls, no editing outside a specific directory.

Productive Friction

Small, intentional slowdowns that improve safety and learning.

Examples: starting in plan mode, requiring a 5-bullet plan, reviewing diffs before commit, or asking the agent to cite files.

Verification

Checking that the agent's work is correct.

Verification can include reading the diff, running tests, checking documentation, reproducing a bug, or asking a second agent to review.

Quick Mental Models

Chat vs. Agent

Chat explains what you could do. An agent can try to do it, observe the result, and continue.

Command vs. Skill vs. Agent

Command: a prompt shortcut you invoke.

Skill: reusable knowledge the agent loads when relevant.

Agent: a role with tools, permissions, model choice, and instructions.

Plan vs. Build

Plan is for understanding. Build is for changing.

When in doubt, start with plan.