We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Agents

Agents in OpenCode are configurable AI assistants with their own prompts, models, and permissions.

OpenCode ships with two built-in primary agents, "Build" and "Plan", but you can also create your own with custom tools, model settings, instructions, etc.

For example, you might want a review agent that:

  • Can read files and diffs, but can't edit
  • Can't run any destructive shell commands
  • Is pre-loaded with instructions to compare each change against a set of rules
  • Won't ever run more than 6 agentic cycles without human input

I know, the word "agent" is an incredibly overloaded term... OpenCode itself is called a "coding agent," but then these configurable assistants within it are also called "agents."

And OpenClaw, for example, is a very different take on agents. Sorry, that's just the way it is. Try to keep up.