tRPC-Agent-Go

A Go-native framework for production agent systems, graph workflows, and streamed service integration.

Stars
★ 1.9k
Last updated
1d ago
License
Apache-2.0
Primary language
Go

At a glance

How it runs
Library / SDKFrameworkSelf-hosted service
Works with
Universal · cross-platformOpenAI API
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Go 1.21 or laterLLM provider API keyShell / CLINetwork accessLocal filesystemMCP Server
Typical use
A Go backend team adding multi-turn support agents with session context, tool calls, and long-term memory can use Runner with LLMAgent.
Not a fit if
  • Teams wanting a hosted product instead of choosing models and deploying themselves
  • Non-Go teams expecting a Python or TypeScript agent stack

What does this agent do, and when should you use it?

tRPC-Agent-Go is a Go framework for production agent systems whose execution boundary centers on Runner, Agent implementations, and event streams. It ships with LLMAgent, ChainAgent, ParallelAgent, CycleAgent, and GraphAgent for model-driven tasks, composed multi-agent work, and conditional graph workflows. Runner coordinates execution and sessions, emits event.Event streams, and can be combined with memory, knowledge retrieval, artifacts, and evaluation services. The framework also includes function and MCP tools, A2A interoperability, AG-UI HTTP/SSE serving, OpenTelemetry instrumentation, and SKILL.md-based reusable workflows. It fits teams building agent capabilities into Go services and willing to integrate their own models and operational infrastructure.

An application creates a runner with runner.NewRunner, submits a model.NewUserMessage through Runner.Run(ctx, userID, sessionID, message), and consumes the returned events channel; chat.completion.chunk events carry streamed output. LLMAgent can call Go functions wrapped with function.NewFunctionTool and MCP tools, while configured tools can perform calculations, web search, file operations, or custom-service work. GraphAgent uses graph.NewStateGraph, AddNode, and AddMultiConditionalEdges to define state updates, routing, and parallel branches. Memory services can expose persistent search and tools; the knowledge example loads sources, embeds them in a vector store, and retrieves RAG context; artifact stores and retrieves versioned files. The server layer can expose a Runner through AG-UI with SSE events, the repository includes A2A interoperation examples, and evaluation.New runs eval sets with pluggable metrics and repeated runs.

  1. A Go backend team adding multi-turn support agents with session context, tool calls, and long-term memory can use Runner with LLMAgent.
  2. A business-automation team splitting analysis, processing, and reporting into distinct stages can compose agents with ChainAgent or run independent work through ParallelAgent.
  3. A developer building a research or approval workflow with conditional routing, fan-out, and state updates can model it with GraphAgent and StateGraph.
  4. A team adding a streamed agent experience to an existing chat frontend can expose a Runner through AG-UI and SSE.
  5. A developer building document question answering can follow the knowledge example to load sources, embed them in a vector store, and retrieve relevant context.
  6. A team that needs repeatable quality checks for an agent can use evaluation.New to run eval sets multiple times with pluggable metrics.

How do you install or deploy this agent?

Requirements: Go 1.21 or later and an LLM-provider API key. Run:

git clone https://github.com/trpc-group/trpc-agent-go.git
cd trpc-agent-go
export OPENAI_API_KEY="your-api-key-here"

export OPENAI_BASE_URL="your-base-url-here" (optional)
Then run the first example:

cd examples/runner
go run . -model="gpt-4o-mini" -streaming=true

How do you use this agent?

For the basic integration, create a model with openai.New, configure an agent with llmagent.New plus tools and model.GenerationConfig{Stream: true}, create a Runner with runner.NewRunner, call Run, and consume its events. To stop a running request, cancel the context passed to Runner.Run and keep draining events until the channel closes; a server or background process can instead set a request ID with agent.WithRequestID and call Cancel(requestID) on runner.ManagedRunner. When prompts, models, tools, or sandbox instances must vary per request, use runner.NewRunnerWithAgentFactory to create a fresh Agent for each Run call.

What are this agent's strengths and limitations?

Pros
  • Its Go-native Runner, context cancellation, and streamed event model align directly with Go service integration.
  • GraphAgent supports type-safe state graphs, multi-conditional routing, and parallel fan-out alongside sequential, parallel, and cycle-based multi-agent composition.
  • It brings sessions, memory, RAG, artifacts, evaluation, OpenTelemetry, MCP, A2A, and AG-UI integrations into one framework.
  • Skills are directory-based SKILL.md workflows that can load from local paths, HTTP(S) archives, or multiple roots and can be refreshed in long-lived processes.
Limitations
  • The first runnable example requires Go 1.21+ and an LLM-provider API key; the quick start specifically uses OpenAI environment variables and a model argument.
  • This is a library and service-integration framework rather than a ready-hosted product, so adopters still choose models, implement tools, configure storage, and own deployment.
  • Skill or code execution introduces local-execution risk; the documentation specifically recommends disabling the code-execution response processor in a skill_run-only setup to prevent fenced Markdown code from auto-executing.
  • The README mentions Redis, S3, COS, OTLP, and Langfuse paths, but does not document a single production deployment topology, hosted offering, or cost model.

How does this agent compare with similar options?

The README describes GraphAgent as functionally equivalent to LangGraph for Go. It also names ADK, Agno, CrewAI, and AutoGen as open-source inspirations, but provides no benchmarks or feature-by-feature comparison.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
tRPC-Agent-Go This agent 53 · Major gaps Library / SDKFree + model costs ★ 1.9k 1d ago Go OpenAI API
Spring AI Alibaba 53 · Major gaps FrameworkFree + model costs ★ 11k 1mo ago Java —
MCP Memory Service 68 · Some gaps MCP serverFree ★ 2.1k 1d ago Python ChatGPT · Codex · Claude Code · Claude.ai
MassGen 51 · Major gaps CLIFree + model costs ★ 1.1k 4mo ago Python Codex · Claude Code · OpenAI API · Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
53/ 100 5-point scale 2.7 / 5
This review covers the source as of Aug 09, 2026. The project has shipped 3 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 10/29
Reliability 9/14
Adaptability 12/18
Convention 10/18
Effectiveness 9/13
Verifiability 3/8
Why each dimension lost points
Trust10 / 29 · 1.7/5

Evidence shows the framework provides capabilities like tool calling, code execution, file operations, but least privilege principle is not explicitly stated; user confirmation mechanisms exist (e.g., human-in-the-loop examples) but not systematic; data flow transparency is partially documented (e.g., telemetry) but not comprehensive; sensitive data handling is not explicit; dependency security has go.mod but no audit; external effects have safety controls (e.g., allowlist) but not comprehensive; rollback mechanisms are not explicit; source attribution has CLA and contribution guidelines but not verified. Deductions: lack of systematic security design documentation and permission controls.

Reliability9 / 14 · 3.2/5

Internal consistency is good, documentation matches code examples; dependency availability has go.mod and CI, but not verified; failure messages have error handling examples but not comprehensive. Deductions: no fault recovery and error handling best practices provided.

Adaptability12 / 18 · 3.3/5

Target audience is clear (Go developers), scenarios cover a wide range; capability boundaries are documented; trigger precision has examples but not comprehensive; environment fit has Go version and dependency instructions. Deductions: no detailed configuration guide and platform compatibility notes.

Convention10 / 18 · 2.8/5

Information architecture is clear, with documentation and examples; install notes have quick start; naming is stable; examples are rich; known limitations are not explicit; license is Apache-2.0; versioning has releases but no changelog; maintenance responsibility has contribution guidelines. Deductions: missing known limitations and changelog.

Effectiveness9 / 13 · 3.5/5

Output usability has examples and documentation; marginal value is high, providing multiple features; cost-benefit has optimizations like prompt caching. Deductions: no performance benchmarks and cost analysis.

Verifiability3 / 8 · 1.9/5

Claims are supported by documentation and examples, but no independent verification; cross-source corroboration is limited; facts and inferences are not clearly separated. Deductions: lack of test results and independent verification.

Risks and how to mitigate them
  • Unverified publisher identity, supply chain risks should be carefully assessed.
  • Many dependencies, security audit needed.
  • Code execution and file operation tools may pose security risks, permissions must be strictly configured.
Evidence confidence: Low Reviewed Aug 09, 2026 Reviewed revision c6988c7ef0d5 New commits since this review; the score may not cover them
See the full review method →

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v1.12.0
    Release notes excerpt
    What's Changed * {codeexecutor, internal/workspaceprep, tool/workspaceexec}: scope prepared state per generation by @liuzengh in https://github.com/trpc-group/trpc-agent-go/pull/2423 * knowledge/chunking: preserve whitespace-sensitive content by @hr-chang in https://github.com/trpc-group/trpc-agent-go/pull/2434 * tool/function: allow disabling automatic output schema by @hyprh in https://github.com/trpc-group/trpc-agent-go/pull/2435 * telemetry: report gen_ai.usage.total_tokens on chat spans by @liuzengh in https://github.com/trpc-group/trpc-agent-go/pull/2438 …
    View on GitHub ↗
  2. v1.11.2 Release v1.11.2
    Release notes excerpt
    What's Changed * runner: deduplicate event persistence by @Rememorio in https://github.com/trpc-group/trpc-agent-go/pull/2460 * knowledge: align root module versions by @print-happy in https://github.com/trpc-group/trpc-agent-go/pull/2469 * {internal/state/summaryfork, internal/state/summaryview}: avoid cloning immutable invocation snapshots by @Rememorio in https://github.com/trpc-group/trpc-agent-go/pull/2476 * model/openai: use max_tokens for DeepSeek by @Rememorio in https://github.com/trpc-group/trpc-agent-go/pull/2480 …
    View on GitHub ↗
  3. v1.11.1 Release v1.11.1
    Release notes excerpt
    What's Changed * {runner, session/summary}: make automatic summaries cancellation-safe by @Rememorio in https://github.com/trpc-group/trpc-agent-go/pull/2436 * session/summary: discard canceled summary results by @yu-xin-c in https://github.com/trpc-group/trpc-agent-go/pull/2455 * tool/agent: preserve user history for persistent streaming calls by @bytethm in https://github.com/trpc-group/trpc-agent-go/pull/2452 * internal/flow/llmflow: avoid state clones in streaming telemetry by @Rememorio in https://github.com/trpc-group/trpc-agent-go/pull/2462 …
    View on GitHub ↗

FAQ

Is it limited to OpenAI models?
No. The basic example uses openai.New and OPENAI_API_KEY, while the architecture section says the model package supports multiple LLM models, including OpenAI and DeepSeek. The exact provider path depends on the application integration.
How should a streamed run be cancelled safely?
Cancel the context passed to Runner.Run, then continue consuming events until the channel closes. The README warns that simply breaking out of the event loop can leave an agent goroutine running and blocked on channel writes.
Can it power a streaming frontend?
Yes. The AG-UI example exposes a Runner through the AG-UI protocol and includes an SSE server; the README also mentions client samples such as CopilotKit and TDesign Chat.
Will Skills automatically run code found in model output?
Skills can use skill_run for commands required by selected skill documentation. When LLMAgent has WithCodeExecutor only to support skill_run, the README recommends WithEnableCodeExecutionResponseProcessor(false) so fenced code in assistant text does not auto-execute.
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents