Skip to content

Advanced User Guide

The Tutorial gives you everything you need to build a real agent — files, tools, planning, subagents, structured output, memory. If you've worked through it, you already know enough to ship.

This guide is the next step. Each page here adds one power feature on top of what you already know.

Read this after the Tutorial

The Advanced User Guide builds on the Tutorial, so it assumes you're comfortable with the basics: creating an agent, giving it a backend, running it. If a page references something you haven't seen, the Tutorial has it.

That said, you don't need to "graduate" to anything. The features here aren't harder — they're just more specialized. Most agents do great with the Tutorial alone.

Pick what you need

Every page in this section is independent. There's no order to follow and nothing you're required to read. Skim the list, find the feature that solves your problem, and jump straight to it.

Each one follows the same shape as the Tutorial: a minimal example you can paste and run, then a piece-by-piece explanation, then a recap. You'll be productive in a few minutes.

Most of this is opt-in

A lot of these features are just a flag on create_deep_agent() or one item in the capabilities list. You add power without rewriting anything.

The topics

Lifecycle & control

  • Capabilities & lifecycle — the hook points every other feature is built on. Start here if you want to understand the machinery.
  • Hooks — run your own code (or shell commands) before and after every tool call.
  • Stuck-loop detection — catch an agent repeating itself and break the cycle.
  • Periodic reminders — keep the agent on track by re-injecting context on a schedule.

Context & cost

Running & steering

  • Goal loop — let the agent keep working until a goal is met.
  • Monitor — watch a run and react to what it does in real time.
  • Message queue & steering — send the agent new instructions mid-run.
  • Live run forking — branch a running agent and explore alternatives in parallel.
  • Plan mode — have the agent draft and confirm a plan before it touches anything.

Scaling out

Output & tooling

  • Output styles — shape how the agent writes its responses.
  • Browser — give the agent a real browser to navigate and act on the web.
  • Document parsing — turn PDFs and other documents into text the agent can read.
  • Agent Spec — define an agent declaratively instead of in code.

Where to go next

Pick a page above and run the example. If you're not sure where to start, Capabilities & lifecycle explains the foundation that ties most of these together — and from there everything else clicks into place.