DEDUPED Hot AI repos, turned into use cases Get the Monday 5
180 stars · Go

How to use Zhizhi Agent Runtime: what you can do with it

What is Zhizhi Agent Runtime? A model-agnostic Go runtime that turns ordinary Go functions into validated tools and runs planned, dependency-aware agent tasks with guarded side effects.

How do I use it? Clone https://github.com/cocoyes/zhizhi-agent-runtime and change into the repo directory; then 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. Full steps below.

Trended earlier

View repo on GitHub

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer

4 use cases

  • Run a planned multi-step agent task with branches and tests

    Run the full agent example to see planning, conditional branches, and bindings execute end to end.

    View prompt
    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.
  • Add a chat agent to a Go service with one model call

    Wire an OpenAI-compatible model into a Go program with the runtime's Run method.

    View prompt
    In a Go project, add github.com/cocoyes/zhizhi-agent-runtime and build an agent using openaicompat with LLM_BASE_URL, LLM_API_KEY, and LLM_MODEL. Expose a function that runs <request-text> through agent.Run and returns response.Text. Verify by running `go run ./examples/00-chat` from a clone and confirming a non-empty reply.
  • Gate an email-sending tool behind confirmation and a guard

    Declare a high-risk write tool so it runs only after an explicit approval and leaves a receipt.

    View prompt
    Using github.com/cocoyes/zhizhi-agent-runtime, register a <send-email> tool with SideEffectWriteNonIdempotent, RiskHigh, and ConfirmationAlways, and wire WithGuard and WithConfirmation. Run a request that asks to send one message and confirm the response contains CONFIRMATION_REQUIRED before approval. Then resume with Decision true and report the ActionReceipt.
  • Expose MCP server tools to an agent through an allow-list

    Connect an MCP endpoint and limit which of its tools the agent may call.

    View prompt
    Configure github.com/cocoyes/zhizhi-agent-runtime with a runtimemcp.Config for <internal-mcp-endpoint> using streamable HTTP and a lazy connection strategy. Allow only <tool-names> and run one request that needs them. Verify that the JSONL trace shows calls only to allowed tools.

Quick start with Zhizhi Agent Runtime

  1. Check you have what it needs: 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.
  2. Open cocoyes/zhizhi-agent-runtime on GitHub and read the README and license.
  3. Clone https://github.com/cocoyes/zhizhi-agent-runtime and change into the repo directory.
  4. 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"
  5. Run the complete workflow: go run ./examples/10-full-agent
  6. Run the tests for the same example: go test ./examples/10-full-agent

These steps come from our top use case, Run a planned multi-step agent task with branches and tests, which also has a copy-paste agent prompt.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for cocoyes/zhizhi-agent-runtime

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Zhizhi Agent Runtime alternatives · Best AI repos for Software and DevOps

About this repo

Requirements

  • 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

Add this badge to your README

Maintain Zhizhi Agent Runtime? Show readers where to find these use cases. Use cases on Deduped

Markdown

[![Use cases on Deduped](https://dedupedai.com/badge/cocoyes/zhizhi-agent-runtime.svg)](https://dedupedai.com/use-cases/cocoyes-zhizhi-agent-runtime/?utm_source=github&utm_medium=badge&utm_campaign=cocoyes-zhizhi-agent-runtime)

HTML

<a href="https://dedupedai.com/use-cases/cocoyes-zhizhi-agent-runtime/?utm_source=github&amp;utm_medium=badge&amp;utm_campaign=cocoyes-zhizhi-agent-runtime"><img src="https://dedupedai.com/badge/cocoyes/zhizhi-agent-runtime.svg" alt="Use cases on Deduped" height="20"></a>

A static image, no tracking script. About the badge

Questions about Zhizhi Agent Runtime

What is Zhizhi Agent Runtime?

A model-agnostic Go runtime that turns ordinary Go functions into validated tools and runs planned, dependency-aware agent tasks with guarded side effects. It is an open-source project on GitHub: https://github.com/cocoyes/zhizhi-agent-runtime.

How do I use Zhizhi Agent Runtime?

Clone https://github.com/cocoyes/zhizhi-agent-runtime and change into the repo directory; then 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. The use cases on this page give the full steps and a copy-paste agent prompt for each job.

Who is Zhizhi Agent Runtime for?

Go developers who want to build an LLM agent that plans multi-step work, calls typed tools, and keeps side effects under control.

What can I do with Zhizhi Agent Runtime?

4 use cases so far, for example: Run a planned multi-step agent task with branches and tests; Add a chat agent to a Go service with one model call; Gate an email-sending tool behind confirmation and a guard. Each has steps and a copy-paste agent prompt.

What do I need to run Zhizhi Agent Runtime?

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.

What are alternatives to Zhizhi Agent Runtime?

Other hot AI repos in Software and DevOps: Deep Infer, Harness2, Orca, Opencode, Graphify.

Is Zhizhi Agent Runtime safe to run?

Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.