tRPC-Agent-Go · build a streaming, tool-calling AI agent in Go
4 months ago
Almost every agent framework is written in Python. tRPC-Agent-Go brings production agents to Go instead: concurrent, observable, and shipped as a single binary. It comes from Tencent's tRPC open source group, and runs in production behind apps like Tencent Yuanbao and Tencent Video. The whole thing is five composable layers. Let's build one.
Ask about this presentation
Chapters
Show transcriptHide transcript
Almost every agent framework is written in Python. tRPC-Agent-Go brings production agents to Go instead: concurrent, observable, and shipped as a single binary. It comes from Tencent's tRPC open source group, and runs in production behind apps like Tencent Yuanbao and Tencent Video. The whole thing is five composable layers. Let's build one.
Here is the shape. A model gives you the language reasoning. Tools are things the agent can call. An agent wraps the model and its tools. A runner executes that agent and manages the session. And you get back a stream of events. Every piece is pluggable, and they talk to each other through events.
Start with a model. Point it at OpenAI, DeepSeek, or another provider through a variant. Then the good part: any Go function becomes a tool. You wrap a plain function, give it a name and a description, and that is it. The function takes a typed request struct, and its schema tags become the tool's parameter schema. No glue code to write by hand.
Now wrap them. The agent takes your model, your tools, and a config that turns on streaming. Then a runner wraps the agent. The runner is what manages sessions and drives the execution flow, so you do not hand roll any of that.
Run it, and you get back a Go channel of events. Range over the channel and print each streamed chunk as it arrives. It feels like idiomatic Go, because it is. Want to stop a run early? Cancel the context. There is no special stop method to learn.
You can try all of this in about a minute. Clone the repo, set your API key, and run the example. You land in an interactive, streaming chat with a calculator and a time tool wired up. Ask it something, and watch the agent plan, call a tool, and stream the answer back.
That is one agent. From here it scales: multi-agent workflows in chain, parallel, cycle, and graph forms, long-term memory, retrieval, agent skills, evaluation, and full tracing, all native to Go. It is Apache 2.0. Explore the rest of these docs to go deeper.
Up next
2:03cargo-nextest · a next-generation test runner for Rust
@github
4 months ago
1:35mq · jq, but for Markdown
@github
4 months ago
1:24Mimesis · realistic, locale-aware fake data in one line
@github
4 months ago
1:38pikepdf · open, edit and repair PDFs in Python, losslessly
@github
4 months ago
1:22tfswitch · the right Terraform version, automatically
@github
4 months ago
1:21PyPDFForm · fill a PDF form in Python in a few lines
@github
4 months ago
1:35MCP-UI - interactive apps for MCP tools
@github
4 months ago
1:39workmux - parallel coding agents in isolated worktrees
@github
4 months ago
1:33Pumpkin - start a Rust Minecraft server
@github
4 months ago
1:39Bifrost - your first reliable AI gateway
@github
4 months ago
1:39Honcho - memory that reasons across sessions
@github
4 months ago
1:56agentgateway · one governed proxy for your agent traffic
@github
4 months ago






