Who it is forA Go developer evaluating whether the runtime can plan dependent steps and skip branches that do not match.
The problemReading about dependency graphs and conditions is not enough. You want to see a complete complex-mode run that you can execute and test.
The outcomeA working complex-mode run that prints a final answer, plus a passing test for the same example.
What you need first
- Go 1.25 or newer
- An OpenAI-compatible Chat Completions endpoint with a base URL, API key, and model name
- A clone of the repo or a Go module that imports github.com/cocoyes/zhizhi-agent-runtime
Steps
- Clone https://github.com/cocoyes/zhizhi-agent-runtime and change into the repo directory.
- Set the provider settings:
export LLM_BASE_URL="https://your-provider.example/v1"export LLM_API_KEY="your-api-key"export LLM_MODEL="your-model" - Run the complete workflow:
go run ./examples/10-full-agent - Run the tests for the same example:
go test ./examples/10-full-agent - Read the JSONL trace or the execution statistics in the response to confirm which steps ran and which were skipped.
Prompt for your agent
Clone the zhizhi-agent-runtime repo and set LLM_BASE_URL, LLM_API_KEY, and LLM_MODEL for <your-provider>. Run `go run ./examples/10-full-agent` and report the final answer. Then run `go test ./examples/10-full-agent` and confirm it passes.
Caveat. The runtime never fabricates model responses, so the example needs a real reachable model endpoint and key to produce output.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for cocoyes/zhizhi-agent-runtime and "Run a planned multi-step agent task with branches and tests"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer