What is tRPC-Agent-Go?
tRPC-Agent-Go is an open-source Go framework from the tRPC group for building production agent systems. It sits in the Agent Frameworks & Builders category of the Agents & Automation tools and is open-source, written in Go and licensed Apache-2.0. To get started: clone the repository.
Overview
tRPC-Agent-Go is an open-source Go framework from the tRPC group for building production agent systems. Its README describes one Go-native stack that covers LLM agents, graph workflows, tool calling, session and memory state, knowledge retrieval, agent self-evolution, evaluation and OpenTelemetry observability, aimed at agent applications that have to fit into Go services: concurrent, observable and easy to deploy.
The core pieces are a Runner, which orchestrates execution, manages sessions and connects the memory service, and agents that you compose rather than implement. The framework ships an LLMAgent that wraps a chat-completion model, a ChainAgent that runs sub-agents in sequence, a ParallelAgent that runs them concurrently and merges their output, and a CycleAgent that loops until a stop condition. GraphAgent adds type-safe graph workflows with conditional and multi-conditional fan-out routing, which the project describes as functionally equivalent to LangGraph for Go.

Around those agents sit packages for models (OpenAI, DeepSeek and other providers), tools (Go functions turned into tools, MCP tools, DuckDuckGo web search, code execution), sessions, long-term memory with in-memory and Redis backends, RAG knowledge retrieval, a planner, versioned artifacts with in-memory, S3 and COS backends, and reusable Agent Skills defined by SKILL.md folders. An evolution service can review completed sessions in the background and publish reusable procedures back as managed skills after quality gates.
For integration, the server package exposes agents over AG-UI for frontends (with a built-in Server-Sent Events server and CopilotKit and TDesign Chat client samples), A2A for agent-to-agent interoperability, and a gateway server. Runs can be cancelled via context, from code or by request ID; an evaluation package runs repeatable eval sets with pluggable metrics; and OpenTelemetry hooks span the model, tool and runner layers, with Langfuse examples. The README credits Tencent business units including Tencent Yuanbao, Tencent Video and QQ Music with real-world validation. It is written in Go and released under the Apache-2.0 license.
What it does
- Built-in LLMAgent, ChainAgent, ParallelAgent and CycleAgent that nest into multi-agent pipelines without implementing the agent interface yourself
- GraphAgent: type-safe state graphs with conditional and multi-conditional fan-out routing, run through the same Runner
- Tool ecosystem covering Go function tools, MCP tools via trpc-mcp-go, DuckDuckGo web search and secure code execution
- Session, memory (in-memory and Redis), RAG knowledge retrieval and versioned artifacts (in-memory, S3, COS)
- Agent Skills from SKILL.md folders, plus a self-evolution service that turns reviewed sessions into managed skills
- AG-UI, A2A and gateway servers, eval sets with pluggable metrics, and OpenTelemetry tracing with Langfuse examples
Getting started
The README's quick start runs a bundled example agent from a clone of the repository. You need Go 1.21 or later and an API key for an LLM provider such as OpenAI or DeepSeek. The runner example opens an interactive, streaming chat with calculator and time tools.
Clone the repository
The examples directory contains runnable demos for every major feature.
git clone https://github.com/trpc-group/trpc-agent-go.git
cd trpc-agent-goConfigure your LLM
Set your provider key; the base URL is optional and lets you point at an OpenAI-compatible endpoint.
export OPENAI_API_KEY="your-api-key-here"
export OPENAI_BASE_URL="your-base-url-here" # OptionalRun your first agent
Start the runner example with streaming on, then try a prompt such as "What's the current time? Then calculate 15 * 23 + 100" to watch it call its tools across a multi-turn conversation.
cd examples/runner
go run . -model="gpt-4o-mini" -streaming=trueBuild an agent in your own code
In your own program, create a model, wrap a Go function as a tool, build an LLMAgent and execute it through a Runner, which returns a stream of events. This is condensed from the README's Basic Usage example, which also defines the calculator function and its request and response types.
modelInstance := openai.New("deepseek-chat",
openai.WithVariant(openai.VariantDeepSeek),
)
calculatorTool := function.NewFunctionTool(
calculator,
function.WithName("calculator"),
function.WithDescription("Execute addition, subtraction, multiplication, and division."),
)
agent := llmagent.New("assistant",
llmagent.WithModel(modelInstance),
llmagent.WithTools([]tool.Tool{calculatorTool}),
llmagent.WithGenerationConfig(model.GenerationConfig{Stream: true}),
)
runner := runner.NewRunner("calculator-app", agent)
events, err := runner.Run(context.Background(),
"user-001", "session-001",
model.NewUserMessage("Calculate what 2+3 equals"),
)
if err != nil {
log.Fatal(err)
}
for event := range events {
if event.Object == "chat.completion.chunk" {
fmt.Print(event.Response.Choices[0].Delta.Content)
}
}Compose agents into a pipeline
Nest the built-in agents to build workflows: here a ChainAgent passes an assistant's output to a translator agent, and the Runner adds sessions and telemetry.
pipeline := chainagent.New(
"pipeline",
chainagent.WithSubAgents([]agent.Agent{base, translator}),
)
run := runner.NewRunner("demo-app", pipeline)
events, _ := run.Run(ctx, "user-1", "sess-1",
model.NewUserMessage("Hello!"))
for ev := range events { /* ... */ }Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Reach for it when your backend is written in Go and you want agents that live inside those services instead of a separate Python runtime
- Use it to build controllable multi-step workflows, such as customer-support or business-process bots with human-in-the-loop, as graphs or chained, parallel and looping agents

- Reach for it when an agent must stream events to a web frontend over AG-UI or interoperate with other agents over A2A
- Use it when you need to measure and trace agent quality in production, with eval sets, OpenTelemetry tracing and Langfuse
How tRPC-Agent-Go compares
tRPC-Agent-Go alongside other open-source agent frameworks & builders tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| DeepSeek Harness | ★ 289k | DeepSeek AI's open-source agent harness (dsh), built on Cordis, where models, tools, skills, sessions, sandboxes, storage and the UI are all plugins composed through profiles. |
| AutoGPT | ★ 188k | One of the earliest autonomous agent projects, now a platform for building and running agents from reusable blocks and workflows. |
| DeerFlow | ★ 86k | ByteDance's open-source super agent harness built on LangGraph: skills, sub-agents, sandboxes, a filesystem and long-term memory for long-horizon research, coding and content tasks. |
| nanobot | ★ 50.5k | Lightweight self-hosted personal AI agent framework in Python, with a WebUI, terminal and chat-app channels, tools, long-term memory, MCP and scheduled automations. |
| LangGraph | ★ 45.6k | A library from the LangChain team for building stateful, graph-based agent workflows with explicit control over steps, memory, and human-in-the-loop checkpoints. |
| Agno | ★ 43.3k | A fast Python framework (formerly Phidata) for building agents with memory, tools, and multimodal inputs, plus a runtime for deploying them in production. |
| AgentGPT | ★ 36.3k | AgentGPT lets you name a custom AI, give it a goal, and watch it plan tasks, run them, and learn from the results, all from a web browser. |
| tRPC-Agent-Go | ★ 1.9k | A Go-native framework for production agent systems: LLM agents, graph workflows, tools, memory, evaluation and tracing in one stack |
