trpc-group/trpc-agent-go
A Go SDK for running stateful agent workflows and streaming events inside services
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
tRPC-Agent-Go is an embeddable Go SDK. Runner is the execution boundary: it takes a context, user ID, session ID, and message, invokes an agent, and returns an event stream. It can reuse a configured agent or call a factory for each run. LLMAgent handles model and tool interactions; GraphAgent combines graph.State and a schema with nodes and conditional edges so the application can express routing explicitly. Session and memory services can be wired at the runner level.
The module is trpc.group/trpc-go/trpc-agent-go. Its root manifest includes github.com/openai/openai-go v1.12.0, Connect v1.18.1, and OpenTelemetry v1.29.0 with OTLP metric exporters. Go functions can be wrapped as tools, and MCP supplies an integration path for external tools. A2A serves agent-to-agent interoperability, while AG-UI carries run events to clients. These are separate integration surfaces, not a single required transport stack.
Key Capabilities & Differentiators
GraphAgent supports schema-based workflow state and multi-conditional fan-out. For common collaboration patterns, ChainAgent sequences sub-agents, ParallelAgent runs them concurrently and combines results, and CycleAgent repeats work until a termination condition is met. The chat examples show gpt-4o-mini and deepseek-chat through the OpenAI adapter, with the latter selecting the DeepSeek variant. The memory examples cover in-memory and Redis services with CRUD and search; the knowledge example demonstrates loading, embedding, and querying sources through a vector store.
Reusable SKILL.md packages can be loaded on demand, and an optional evolution service can asynchronously review completed sessions and publish skills after quality checks. Evaluation supports repeatable datasets, pluggable metrics, and multiple runs per case. OpenTelemetry traces and metrics address runtime diagnosis, while the Langfuse example shows how to attach user and session attributes to spans. Evaluation and telemetry answer different questions: whether the agent produces acceptable results and where a particular run spent time or failed.
Trade-offs & Limitations
Compared with adopting LangGraph, the key reason to choose this SDK is that the workflow executes inside a Go service using its context and event lifecycle. The graph concepts are comparable, but that does not make workflows portable: state, routing nodes, and tool integrations need to be revalidated during a migration. For a single model call with a few tools, direct provider integration or a plain LLMAgent may be simpler. Graphs earn their place when explicit branches, shared state, and routing tests matter.
Production behavior still depends on integration choices. A streaming consumer must cancel the run and drain the event channel rather than just exit its read loop. Parallel branches can increase simultaneous model and tool calls, so test against provider limits and downstream capacity. Treat skill packages and execution tools as executable inputs: restrict who can publish skills, grant tools only the permissions they need, and disable automatic execution of fenced code when enabling skill_run if it is not required. Apache-2.0 permits commercial use, but it does not cover provider contracts or data-handling obligations.
Hardware & Deployment Guide
The root module sets Go 1.21 as its baseline. To try the hosted-model path, configure OPENAI_API_KEY and optionally OPENAI_BASE_URL, then run go run . -model="gpt-4o-mini" -streaming=true from examples/runner. This starts an example, not a packaged production service. The embedded Go runtime does not need a GPU for API-backed inference. Size it for concurrent runs, stream handling, state persistence, and tool workloads; size any separately operated model endpoint independently. An in-memory example does not validate state recovery across restarts or sharing across replicas.
The listed stable release is v1.12.0. The v1.13.0-beta.2 root release includes graph execution and tracing optimizations, structured multimodal tool results, and deferred-tool and provider-action capabilities. The v1.13 beta line also introduces the separate trpc.group/trpc-go/trpc-agent-go/model/openai/sdkv3 module for OpenAI Responses, including streaming, local function tools, image and file inputs, and JSON Schema output. That module requires Go 1.25 and selects a v1.13 beta root dependency. Check both module versions and the build toolchain before adopting it.
Go teams adding support, internal knowledge, or multistep business workflows to existing services, especially when they need explicit routing, streaming UI events, tool integration, and repeatable evaluation.
You need a turnkey hosted agent product, want to run existing LangGraph workflows unchanged, or only need a few calls to a model API without stateful orchestration.
Quick Start & Installation
# 1. Clone and setup git clone https://github.com/trpc-group/trpc-agent-go.git cd trpc-agent-go # 2. Configure your LLM export OPENAI_API_KEY="your-api-key-here" export OPENAI_BASE_URL="your-base-url-here" # Optional # 3. Run your first agent! cd examples/runner go run . -model="gpt-4o-mini" -streaming=true
Comparison vs. Top Agents & Frameworks Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| trpc-agent-go ★ | 2k | +3 | Go | Apache-2.0 | A Go SDK for running stateful agent workflows and streaming events inside servic |
| pydantic-ai | 21.5k | +95 | Python | MIT | Typed Python agent SDK for reusable tools, model fallback, and realtime voice. |
| rocketride-server | 19.9k | +22 | Python | MIT | C++ workflow engine for building and running extensible AI pipelines |
| browser-use | 122.7k | +477 | Python | MIT | Python REPL and CDP for adaptive browser automation |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/trpc-group/trpc-agent-go.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about trpc-agent-go
How do I integrate streaming and cancellation into an existing Go service?
Does the agent service need a GPU or a fixed amount of VRAM?
Can I self-host it in a commercial product?
When should a Go team choose this over LangGraph?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy