BuildSeniorData / MLAuto-graded
Build a pipeline that hands state between agents
Each agent should see what the earlier ones wrote, and one failing agent shouldn't stop the whole run.run_pipeline(agents, state) runs a list of agents in order. Each agent takes the shared state dict and returns the updated one for the next agent. Right now later agents don't see what earlier ones wrote, an agent that sets state["done"] doesn't stop the run, and one agent raising an error ends everything. Fix the runner so state carries forward, the run stops after done, and a failing agent is logged in state["errors"] while the chain keeps going.35 min
python
You're done when
- The agents run in the order given and the pipeline finishes without crashing.
- Each agent sees every write the earlier agents made.
- The final state holds the writes of every agent that ran, not only the last one's.
- Once an agent sets
state["done"], the agents after it don't run. - The state returned to the caller still has
doneset. - An agent that raises doesn't stop the run, and the next agent still runs.
- The failure is logged in
state["errors"]as a dict whoseerrorholds the exception message, and the next agent sees the state as it was before the failing agent ran.
What it measures
Agent engineeringRunning agents in order, passing state along and stopping when an agent says it's done.
Context engineeringGiving each agent the earlier agents' writes and nothing from an agent that failed.
Handling failureHow a failing agent is recorded and kept from breaking the rest of the run.
Your environment
Terminal + editorA full shell in the browser
Coding agentAlready signed in, no API key to set up
Isolated workspaceOnly yours, wiped when you finish
Start this lab
35 min
Start labYou'll need to sign in to Anthropos first. The lab opens in a private cloud workspace with your coding agent ready to use.AI Labs is part of Anthropos Workforce. Not on your plan yet? Book a demo