Skip to lesson
Exit
Cursor Foundry: A Software Assembly Line1 / 3

1 min lesson

Agent SDK, three stages

Say what this means in practice: "The job: you can design a staged agent pipeline with clean handoffs between stages."

Step 1 of 3

The job: you can design a staged agent pipeline with clean handoffs between stages. Start with this check: Each stage has one job and a defined handoff to the next. Keep it small enough to check the result yourself instead of taking the summary on trust.

Learn more

Full explanation

Agent SDK, three stages

Foundry pipeline — plan, build, review with a spec as the handoff
Agent SDK, three stages
SayOne agent per task stopped scaling for a recurring job: turn a feature request into a merged change. I chain three specialised agents into an assembly line with a clean handoff between stages, the pattern behind Cursor FoundryA prototype software factory that chains specialised agents (plan, design, build, review) with clean handoffs, built on the Agent SDK. Press Enter for the full definition..
DoStage one is a plan agent. Its only output is a written spec artifact: the files to touch, the interfaces, the acceptance checks. It writes no code.
SeeThe handoff down the line is that spec file, not the plan agent's whole transcript.
DoStage two is a build agent that consumes only the spec artifact and implements against it. It never sees the plan agent's reasoning, just the contract it was handed.
SeeContext stays clean across the boundary: the build agent starts from a tight brief instead of a long conversation.
DoStage three is a review agent that reads the resulting diff against the spec's acceptance checks and flags anything that misses.
SeeEach stage left an inspectable artifact - a spec, a diff, a review - so you can reread or rerun one stage without restarting the whole line.
SayWrap the line in your own UI when you want to watch it, for example a Kanban board over the cloud agents, and reuse the same pattern for non-coding jobs, not just code.
SeeThe proof point: each stage has one job and a defined handoff, the run produces an artifact at every stage rather than one opaque result, and any single stage can be rerun on its own.
Learn more

Optional practice

Practice: Agent SDK, three stages

QYou've applied it. What actually proves the work is done, not just a plausible answer?