Agent
Agent overview
Give the agent a goal and it works the problem end-to-end — reading, editing, running commands, and verifying — until it's done.
How it works
The agent runs a loop: it reads relevant context, decides on a tool call, runs it, observes the result, and repeats. Three things shape every run:
- Instructions & rules — your prompt plus any rules in the repo steer how the agent behaves and what conventions it follows.
- Tools — the agent acts on your project through a fixed set of tools (read, write, edit, list, grep, run terminal, fetch the web).
- Model — the underlying reasoning model. Frontier runs drive most agent work; see Models & pricing.
Modes
Pick a mode from the composer menu to change how the agent behaves — plan first, just answer, fan out across parallel workers, or build end-to-end.
Staying in control
- Terminal commands and other side-effecting tools ask for approval before they run; you can pre-approve trusted ones per project.
- Take a checkpoint before a large change so you can restore afterwards.
- Review the diff and the run timeline before you commit anything to git.
Background agents
Hand a brief to a background agent and it clones, builds, tests, and opens a PR while you do something else.
Next