trpc-group/trpc-agent-go

每日信息看板 · 2026-02-26
开源项目
Category
github_search
Source
0
Score
2026-02-26T01:59:28Z
Published

AI 总结

English | 中文 tRPC-Agent-Go Go Reference Go Report Card LICENSE Releases Tests Coverage Documentation **A powerful Go framework for building intelligent agent…
#GitHub #repo #开源项目 #Agent #RAG

内容摘录

English | 中文
tRPC-Agent-Go

Go Reference
Go Report Card
LICENSE
Releases
Tests
Coverage
Documentation

**A powerful Go framework for building intelligent agent systems** that transforms how you create AI applications. Build autonomous agents that think, remember, collaborate, and act with unprecedented ease.

**Why tRPC-Agent-Go?**
**Intelligent Reasoning**: Advanced hierarchical planners and multi-agent orchestration
**Rich Tool Ecosystem**: Seamless integration with external APIs, databases, and services
**Persistent Memory**: Long-term state management and contextual awareness
**Multi-Agent Collaboration**: Chain, parallel, and graph-based agent workflows
**GraphAgent**: Type-safe graph workflows with multi-conditional routing, functionally equivalent to LangGraph for Go
**Agent Skills**: Reusable SKILL.md workflows with safe execution
**Artifacts**: Versioned storage for files produced by agents and tools
**Prompt Caching**: Automatic cost optimization with 90% savings on cached content
**Evaluation & Benchmarks**: Eval sets + metrics to measure quality over time
**UI & Server Integration**: AG-UI (Agent-User Interaction),
 and Agent-to-Agent (A2A) interoperability
**Production Ready**: Built-in telemetry, tracing, and enterprise-grade reliability
**High Performance**: Optimized for scalability and low latency
Use Cases

**Perfect for building:**
**Customer Support Bots** - Intelligent agents that understand context and solve complex queries
**Data Analysis Assistants** - Agents that query databases, generate reports, and provide insights
**DevOps Automation** - Smart deployment, monitoring, and incident response systems
**Business Process Automation** - Multi-step workflows with human-in-the-loop capabilities
**Research & Knowledge Management** - RAG-powered agents for document analysis and Q&A
Key Features

<table>
<tr>
<td width="50%" valign="top">
Multi-Agent Orchestration

</td>
<td width="50%" valign="top">
Advanced Memory System

</td>
</tr>
<tr>
<td valign="top">
Rich Tool Integration

</td>
<td valign="top">
Production Observability

</td>
</tr>
<tr>
<td valign="top">
Agent Skills

NewFSRepository also accepts an HTTP(S) URL (for example, a .zip or
.tar.gz archive). The payload is downloaded and cached locally (set
SKILLS_CACHE_DIR to override the cache location).

</td>
<td valign="top">
Evaluation & Benchmarks

</td>
</tr>
</table>
Table of Contents
tRPC-Agent-Go
Use Cases
Key Features
Multi-Agent Orchestration
Advanced Memory System
Rich Tool Integration
Production Observability
Agent Skills
Evaluation \& Benchmarks
Table of Contents
Documentation
Quick Start
Prerequisites
Run the Example
Basic Usage
Stop / Cancel a Run
Examples
Tool Usage
LLM-Only Agent
Multi-Agent Runners
Graph Agent
Memory
Knowledge
Telemetry \& Tracing
MCP Integration
AG-UI Demo
Evaluation
Agent Skills
Artifacts
A2A Interop
Architecture Overview
**Execution Flow**
Using Built-in Agents
Multi-Agent Collaboration Example
Contributing
**Ways to Contribute**
**Quick Contribution Setup**
Acknowledgements
**Enterprise Validation**
**Open Source Inspiration**
Star History
License
**Star us on GitHub** • **Report Issues** • **Join Discussions**
Documentation

Ready to dive into tRPC-Agent-Go? Our documentation covers everything from basic concepts to advanced techniques, helping you build powerful AI applications with confidence. Whether you're new to AI agents or an experienced developer, you'll find detailed guides, practical examples, and best practices to accelerate your development journey.
Quick Start
**See it in Action**: _[Demo GIF placeholder - showing agent reasoning and tool usage]_
Prerequisites
Go 1.21 or later
LLM provider API key (OpenAI, DeepSeek, etc.)
5 minutes to build your first intelligent agent
Run the Example

**Get started in 3 simple steps:**

**What you'll see:**
**Interactive chat** with your AI agent
**Real-time streaming** responses
**Tool usage** (calculator + time tools)
**Multi-turn conversations** with memory

Try asking: "What's the current time? Then calculate 15 \* 23 + 100"
Basic Usage
Dynamic Agent per Request

Sometimes your Agent must be created **per request** (for example: different
prompt, model, tools, sandbox instance). In that case, you can let Runner build
a fresh Agent for every Run(...):
Stop / Cancel a Run

If you want to interrupt a running agent, **cancel the context** you passed to
Runner.Run (recommended). This stops model calls and tool calls safely and
lets the runner clean up.

Important: **do not** just “break” your event loop and walk away — the agent
goroutine may keep running and can block on channel writes. Always cancel, then
keep draining the event channel until it is closed.
Option A: Ctrl+C (terminal programs)

Convert Ctrl+C into context cancellation:
Option B: Cancel from your code
Option C: Cancel by requestID (for servers / background runs)

For more details (including detached cancellation, resume, and server cancel
routes), see docs/mkdocs/en/runner.md and docs/mkdocs/en/agui.md.
Examples

The examples directory contains runnable demos covering every major feature.
Tool Usage
examples/agenttool – Wrap agents as callable tools.
examples/multitools – Multiple tools orchestration.
examples/duckduckgo – Web search tool integration.
examples/filetoolset – File operations as tools.
examples/fileinput – Provide files as inputs.
examples/agenttool shows streaming and non-streaming
 patterns.
LLM-Only Agent

Example: examples/llmagent
Wrap any chat-completion model as an LLMAgent.
Configure system instructions, temperature, max tokens, etc.
Receive incremental event.Event updates while the model streams.
Multi-Agent Runners

Example: examples/multiagent
**ChainAgent** – linear pipeline of sub-agents.
**ParallelAgent** – run sub-agents concurrently and merge results.
**CycleAgent** – iterate until a termination condition is met.
Graph Agent

Example: examples/graph
**GraphAgent** – demonstrates building and executing complex, conditional
 workflow…