Build locally
Use agnt5 dev to iterate on a workflow with hot reload, inspect runs in Studio, and verify durability across worker restarts.
You finished the quickstart. The my-investigator project on your laptop runs end-to-end. This page walks you through the local development loop you’ll use to extend it: hot-reload edits, trace inspection in Studio, and a durability test that kills the worker mid-run.
Time: about 10 minutes.
You’ll learn:
- Edit the workflow and see changes apply on the next run
- Read the trace for a paused run in Studio
- Kill the worker mid-pause, restart, and watch the workflow resume
Prerequisites:
- Completed the quickstart. You have
my-investigator/checked out andagnt5 devin one terminal.
Step 1: Edit the workflow
Open src/agnt5_quickstart/workflows.py and tighten the prompt:
INVESTIGATOR_PROMPT = (
"You investigate technical and operational questions for an engineering team. "
"Use the DeepWiki MCP tools to read documentation and ask questions about "
"GitHub repositories — that's your primary evidence source. If web search is "
"available, use it sparingly to corroborate community signal. "
"Separate first-party evidence (docs, source code) from public commentary. "
"Return a concise brief: answer, evidence, risks, recommendation, open questions. "
"Cite specific file paths and commit ranges from the source repo when relevant." # NEW
)Save the file. The terminal running agnt5 dev shows the worker reconnect:
File changed: src/agnt5_quickstart/workflows.py
Reloading components...
Registered components: investigate_with_review, save_report
Worker connectedNo restart needed. The next run picks up the new prompt.
Step 2: Trigger another run and watch the trace
In your second terminal:
agnt5 run investigate_with_review --input '{
"question": "Should we adopt Polars to replace Pandas in our analytics pipeline?"
}'Open Studio (default https://app.agnt5.com; agnt5 context show if your context is custom). The new run shows up at the top of your project’s runs list. Click into it.
The trace shows:
- The workflow input (
question). - The MCP
connectstep againstmcp.deepwiki.com/mcp. - Each model call inside the agent loop, with input messages and output.
- Each tool call: DeepWiki
read_wiki_structure,ask_question, plus anyweb_search_previewcalls if you’re on the provider-hosted path. Built-in tool calls are markedbuilt_in: true. - The
wait_for_userstep, paused with the brief and the three options.
The trace is a record of every checkpointed boundary. There is no “agent black box” — every model call and every tool call is its own step.
Step 3: Verify durability
The HITL pause is the hard one. AGNT5 promises the workflow is not held in process memory. Verify it:
- With the run still paused at review, switch to the terminal running
agnt5 devand stop it:Ctrl-C. - Wait 10 seconds. Confirm the worker is gone (
ps aux | grep agnt5_quickstartreturns nothing). - Restart it:
agnt5 dev. Watch it reconnect and re-registerinvestigate_with_reviewandsave_report. - Open Studio and approve the brief.
The workflow resumes from the wait_for_user step. The agent does not re-call the model. The MCP server does not get re-queried. The save_report step runs and writes the file.
cat .agnt5/reports/*.mdThe report contains the brief that was drafted before you killed the worker, with whatever edits Studio captured.
What that demonstrated
You exercised three properties that distinguish AGNT5 from a plain agent loop:
- Hot reload. Source edits register without a process bounce. The dev session is the development surface; you don’t redeploy locally.
- Glass-box trace. Every model call, tool call, and human-review pause is a discrete step in Studio. The trace is the artifact you’ll come back to when something is wrong.
- Durable pauses. A long-running pause (a human review, a webhook callback, a scheduled wait) is not a process. It’s a checkpoint. Workers come and go; the workflow does not.
These are the same properties that make the same workflow run unchanged in cloud. That’s the next page.
Next steps
- Run in cloud — promote the same workflow to a managed environment with
agnt5 deploy. - Workflows — the durable-execution model that makes the trace and the resume possible.
- Agents — the model→tool→model loop and how
Agentcomposes with@workflow.