AgentScope Go is the Go implementation of the AgentScope multi-agent LLM framework. It provides Go-idiomatic APIs — interfaces, context.Context, explicit error returns, functional options — while delivering capabilities that go beyond the Python project.
| Property | What it means for you |
|---|---|
| Single binary deployment | Build a Go executable for your target platform. Static linking depends on CGO and dependencies; optional backends such as Wasmtime or Docker still need their runtime. |
| Concurrent execution | Goroutines and channels support parallel work. AgentPool bounds workers and the queued job count; load-test your workload to size memory and concurrency. |
| Embeddable library | go get and import into any existing Go service. No separate process, no sidecar, no IPC overhead. Your HTTP server, gRPC service, or CLI tool gains agent capabilities in-process. |
| Explicit contracts | Go interfaces catch type mismatches at compile time. Runtime errors, nil values, concurrency bugs, and isolation boundaries still require validation; see stability and limitations. |
These sections describe capabilities provided by this Go repository. They are not a version-by-version comparison with the Python project.
Embedded web interface for agent interaction. Zero external dependencies — the SPA is compiled into the binary via go:embed. Supports streaming chat with thinking blocks, tool call visualization, human-in-the-loop confirmation, session management, and model browsing.
svc := service.New(cfg, cm, factory)
handler := svc.HandlerWithWebUI(service.WebUIConfig{Enable: true})
http.ListenAndServe(":8080", handler)
// Open http://localhost:8080 in your browserRecord model responses and replay them in tape order without calling the model API. The replayer does not validate prompt equality or replay tool side effects; use mock or isolated tools for offline tests. NewUnifiedAgent still requires a non-nil model. The snippet uses agenttest from pkg/agentscope/agenttest.
// cm is an initialized, non-nil ChatModel used for recording.
recorder := replay.NewRecorder()
a := agent.NewUnifiedAgent("bot", "...", cm, agent.WithMiddlewares(recorder))
if _, err := a.Reply(ctx, "plan a trip to Tokyo"); err != nil {
log.Fatal(err)
}
store, err := replay.NewFileStore("testdata")
if err != nil { log.Fatal(err) }
if err := store.Save(ctx, "trip", recorder.Tape()); err != nil { log.Fatal(err) }
// Replay model responses with an offline, non-nil model placeholder.
tape, err := store.Load(ctx, "trip")
if err != nil { log.Fatal(err) }
replayer := replay.NewReplayer(tape)
placeholder := agenttest.NewMockModel()
replayed := agent.NewUnifiedAgent("bot", "...", placeholder, agent.WithMiddlewares(replayer))
if _, err := replayed.Reply(ctx, "plan a trip to Tokyo"); err != nil { log.Fatal(err) }Process N concurrent sessions with bounded worker goroutines and backpressure. Each worker owns its own agent instance. Dependencies captured by the factory, such as a model or toolkit, remain shared unless the factory creates separate instances.
pool := runtime.NewAgentPool(
func() agent.Agent {
return agent.NewUnifiedAgent("worker", "...", cm, agent.WithToolkit(tk))
},
runtime.Workers(16),
runtime.QueueSize(256),
)
defer pool.Close()
resultCh, _ := pool.Submit(ctx, "Summarize this document...")
result := <-resultCh
fmt.Println(result.Output.GetTextContent("\n"))Zero-downtime configuration updates with typed generics. File changes are detected by polling; the new config is atomically swapped in.
type AgentCfg struct {
Model string `json:"model"`
Temperature float64 `json:"temperature"`
MaxTokens int `json:"max_tokens"`
}
watcher := hotreload.NewWatcher(hotreload.WatcherConfig{PollInterval: 2 * time.Second})
reloader, _ := hotreload.NewReloader[AgentCfg](watcher, "config/agent.json",
hotreload.WithOnChange(func(old, new_ *AgentCfg) {
log.Printf("model changed: %s -> %s", old.Model, new_.Model)
}),
)
watcher.Start(ctx)
// Always reads the latest config — no restart needed
cfg := reloader.Get()Run WASM modules with Wasmtime fuel, linear-memory, timeout, directory-grant, and output-capture limits. Wasmer and wasm3 may be discovered, but execution with the default resource limits returns ErrUnsupportedLimits. Startup time and compatibility depend on the installed runtime.
rt, err := wasm.NewCLIRuntime("wasmtime")
if err != nil { log.Fatal(err) }
sandbox := wasm.NewSandbox(wasm.SandboxConfig{
Runtime: rt,
MaxMemory: 64 * 1024 * 1024,
MaxDuration: 5 * time.Second,
MaxOutputBytes: 1024 * 1024,
})
result, err := sandbox.Run(ctx, "tools/transform.wasm", inputJSON)
if err != nil { log.Fatal(err) }
if result.ExitCode != 0 || result.OutputTruncated {
log.Fatalf("WASM exit=%d, output truncated=%v", result.ExitCode, result.OutputTruncated)
}
fmt.Println(string(result.Stdout))Agent communication over TCP with newline-delimited JSON; this package is not the gRPC wire protocol. Responses must preserve the request ID. For Client.Stream, require StreamEnd for success: cancellation, disconnect, or buffer overflow can close the channel without successful completion.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
server, err := grpc.NewServer("127.0.0.1:0")
if err != nil { log.Fatal(err) }
defer server.Close()
server.OnMessage(func(msg *grpc.Message) *grpc.Message {
return &grpc.Message{ID: msg.ID, From: "router", To: msg.From, Payload: msg.Payload}
})
go func() {
if err := server.Listen(ctx); err != nil { log.Print(err) }
}()
client, err := grpc.NewClient(server.Addr())
if err != nil { log.Fatal(err) }
defer client.Close()
resp, err := client.Send(ctx, &grpc.Message{
ID: "request-1", From: "agent-alpha", To: "agent-beta", Method: "analyze",
Payload: json.RawMessage(`{"task":"analyze"}`),
})
if err != nil { log.Fatal(err) }
fmt.Println(string(resp.Payload))Built-in load testing framework with P50/P95/P99 latency reporting. Define scenarios with configurable concurrency, ramp-up, and duration.
runner := bench.NewRunner()
report, _ := runner.Run(ctx, &bench.Scenario{
Name: "rag-query-load",
Concurrency: 20,
Duration: 30 * time.Second,
Run: func(ctx context.Context, iter int) error {
_, err := agent.Reply(ctx, queries[iter%len(queries)])
return err
},
})
fmt.Printf("P50=%v P95=%v P99=%v throughput=%.1f/s\n",
report.Latencies.P50, report.Latencies.P95, report.Latencies.P99, report.Throughput)All providers support Chat, ChatStream (SSE), CountTokens, and native tool calling:
| Provider | Constructor | Example Models |
|---|---|---|
| OpenAI | model.NewOpenAIChatModel |
gpt-4o, gpt-4.1, gpt-5.5, o3, o4-mini |
| OpenAI Responses | model.NewOpenAIResponseModel |
gpt-4.1, o3 (Responses API) |
| Anthropic | model.NewAnthropicChatModel |
claude-opus-4-8, claude-sonnet-4-6 |
| DashScope | model.NewDashScopeChatModel |
qwen3.5-plus, qwen3.7-max |
| DeepSeek | model.NewDeepSeekChatModel |
deepseek-chat, deepseek-v4-pro |
| Google Gemini | model.NewGeminiChatModel |
gemini-2.5-pro, gemini-3.1-pro |
| Ollama | model.NewOllamaChatModel |
llama4, qwen3-14b (local) |
| Moonshot | model.NewMoonshotChatModel |
kimi-k2.6, moonshot-v1-128k |
| xAI | model.NewXAIChatModel |
grok-3, grok-4.3 |
78 model cards with context sizes, capabilities, and status are bundled via //go:embed.
Additional model features: FallbackChatModel (automatic primary→fallback failover), ClientOptions (custom HTTP timeout/headers/transport), extended thinking with budget tokens, audio caption streaming (PCM→WAV).
Isolated execution environments for tool sandboxing:
| Backend | Package | Notes |
|---|---|---|
| Local | workspace/local.go |
Direct filesystem execution |
| Docker | workspace/docker.go |
Container-based isolation |
| E2B | workspace/e2b.go |
Cloud sandbox (e2b.dev) |
| Apple Container | workspace/applecontainer.go |
macOS native lightweight VM |
| Bubblewrap | workspace/bubblewrap.go |
Linux user-namespace sandbox (bwrap) |
| Daytona | workspace/daytona.go |
Daytona workspace API |
| OpenSandbox | workspace/opensandbox.go |
OpenSandbox cloud environment |
| Kubernetes | workspace/k8s.go |
Pod-based execution in K8s clusters |
| Store | File | Notes |
|---|---|---|
| InMemory | rag/rag.go |
Zero-dependency, suitable for small corpora |
| Qdrant | rag/qdrant_index.go |
Production vector DB with filtering |
| Elasticsearch | rag/elasticsearch.go |
Full-text + vector hybrid search |
| MongoDB | rag/mongodb.go |
Atlas Vector Search |
| Milvus | rag/milvus.go |
High-performance vector DB |
| Format | File | Notes |
|---|---|---|
| Plain Text | rag/parser/text.go |
UTF-8 text with configurable chunking |
rag/parser/pdf.go |
Text extraction from PDF documents | |
| Word | rag/parser/word.go |
.docx parsing |
| Excel | rag/parser/excel.go |
.xlsx sheet extraction |
| PowerPoint | rag/parser/ppt.go |
.pptx slide text extraction |
| Backend | File | Notes |
|---|---|---|
| InMemory | storage/storage.go |
Fast, ephemeral |
| File | storage/full_storage.go |
JSON file persistence |
| Redis | storage/redis.go |
Distributed, TTL support |
| SQL | storage/sql.go |
PostgreSQL/MySQL/SQLite via database/sql |
Unified registry for installable components:
| Component | Description |
|---|---|
| MCP Hub | Browse, search, and install MCP servers from a remote registry |
| Skill Hub | Discover and install reusable agent skills |
| Registry | Multi-hub aggregation with unified search across sources |
| GitHub MCP Registry | hub.GitHubMCPRegistry — GitHub's public MCP registry as a Hub source (runtime-hint-driven install commands, auth inputs preserved) |
| ClawHub | hub.ClawHub — the ClawHub skill registry as a Hub source (owner-scoped IDs, zip-slip/zip-bomb-safe install) |
- Per-agent skill partitions (
skill.Store) —skills/<agent_id>/under a workspace with a.seedtemplate equipped once per agent, idempotent migration of the legacy flat layout, content/directory adds,PurgeAgent - Session↔workspace sharing — refcounted bindings
(
WorkspaceManager.Share/BoundWorkspaceID/RefCount), plus read-only artifact endpoints (GET /api/workspace/{id}/list_dir|read_file) with jail enforcement and a pre-read size cap - Workspace-aware agent factories —
app.WorkspaceAgentFactoryhands the session's workspace to the factory (the hook for filesystem-backed middleware such as agentic memory)
Resource sharing across users, groups, and organizations:
- 4 permission levels: None, Read, Write, Admin
- 3 principal types: User, Group, Org
- 4 resource kinds: Credential, Agent, KnowledgeBase, Session
- Policy-based checker with ownership shortcut
ListAccessiblefor permission-filtered resource discovery
Onion-chain architecture — each hook wraps the next in the chain:
| Hook | Purpose |
|---|---|
OnReply |
Wraps the entire reply lifecycle (outermost) |
OnReasoning |
Wraps each reasoning step in the ReAct loop |
OnModelCall |
Wraps each model API call |
OnActing |
Wraps each tool execution |
OnSystemPrompt |
Transforms the system prompt (pipeline mode) |
OnCompressContext |
Wraps context compression |
OnCheckPermission |
Available permission wrapper; requires explicit BuildCheckPermissionChain integration |
Built-in middleware: TracingMiddleware, TTSMiddleware, ReplyBudgetControlMiddleware, LongTermMemoryMiddleware, CostTrackerMiddleware, MetricsMiddleware.
| Provider | Features |
|---|---|
| DashScope | Standard + CosyVoice realtime streaming |
| OpenAI | OpenAI TTS API with streaming WAV output |
| Gemini | Google Gemini TTS |
Production-ready coding agent toolkit:
- Bash / Read / Write / Edit / Glob / Grep — Full filesystem + shell with AST-level injection detection, dangerous path protection, read-only command recognition
- Task Management —
task_create,task_get,task_list,task_updatewith bidirectional dependency tracking - Structured Output —
GenerateStructuredOutputforces JSON Schema-compliant responses via synthetic tool calls with automatic retry - Long-term Memory — Cross-session memory middleware with 3 modes (static, agent-controlled, both), backed by vector similarity search, mem0 REST API, or a JSON Lines
FileStore;AgenticMemoryMiddlewareadds file-based memory (workspaceMEMORY.mdwith a token-budgeted snapshot injected into the system prompt)
- ReAct Loop — Autonomous reasoning-acting with configurable max iterations
- Safe Interruption — Pause execution at any point, preserving full context
- Human-in-the-Loop — Inject corrections via event system (
RequireUserConfirm/RequireExternalExecution) - Permission Engine — 5 permission modes with per-tool rule matching and bypass-immune safety checks
- Context Compression — Automatic structured summarization when context exceeds thresholds
- AST-level Bash Analysis —
mvdan.cc/sh/v3/syntax-based analysis: injection risk, dangerous removal, redirect safety, read-only verification, sed constraints, file path extraction - Interpreter Attack Detection — Blocks dangerous API calls hidden inside
python -c,node -e,perl -e,ruby -e,lua -e,php -r(8 languages, 20+ patterns) - Process-group Cleanup — On Unix, timeout cleanup signals the command's process group. This reduces orphaned children; it does not enforce a process-count limit.
- Sandbox Policy Checks — Selected built-in tool names and inputs are checked. This is not a complete security boundary; custom tools, aliases, and shell/network/resource restrictions need backend enforcement. See current limits.
- Write Hardening — The local Write tool has a 10 MB input cap, atomic replacement, and executable-extension bypass-immune ASK. Other file tools and backend paths have different persistence behavior.
- SSRF Guard — Dial-time IP resolution blocks loopback/private/link-local addresses (covers DNS rebinding + redirects)
- Workspace Jail — Symlink-aware path confinement to workspace root
- Credential Protection — 40+ dangerous file paths protected (.kube/config, .aws/credentials, .docker/config.json, SSH keys, .gnupg/*)
- Output Guardrails —
GuardrailMiddlewarewith Block/Redact/Warn actions for content safety filtering on model responses - Audit Logging — Structured
audit.Loggerrecords every tool execution, permission decision, and policy denial (InMemory/File/Multi/Nop backends)
| Protocol | Description |
|---|---|
| MCP | Full MCP client (Stdio + HTTP/SSE) with automatic tool discovery |
| A2A HTTP | Agent-to-Agent over HTTP via A2AAgent + HTTPClient |
| A2A TCP | Newline-delimited JSON transport; the a2a/grpc package does not implement the gRPC wire protocol |
| AG-UI | Agent service protocol for frontend integration |
| Agent Teams | Leader/Worker coordination with cross-session HITL event projection |
| Pipeline & MsgHub | Sequential Then/If combinators + multi-agent message routing |
- Tracing —
TracingMiddlewarewith OpenTelemetry semantic conventions, nested spans - Metrics —
Counter/Histograminterfaces withInMemoryProvider,Prometheusprovider, andMetricsHook - Audit —
audit.Loggerinterface with InMemory/File(JSON-Lines)/Multi/Nop backends; records tool executions, permission decisions, and sandbox policy denials - Sandbox Events —
tool_exec_start,tool_exec_end,tool_policy_deniedevents for execution-layer visibility - Budget Tracking — Turn/token/duration/concurrency limits with
BudgetTracker - Resilience — Circuit breaker + rate limiter wrappers for
ChatModel - Embedding — 4 providers (OpenAI, DashScope, Gemini, Ollama) with batch processing, caching, multimodal support
- Cross-Platform — Shell detection with PowerShell/Cmd safety analysis, Windows support
Designed for deploying AI agents on edge devices (Jetson, RPi, RISC-V) with intermittent or no connectivity:
| Component | Description |
|---|---|
| ConnectivityAwareModel | Wraps any ChatModel; routes to cloud when online, falls back to local (Ollama) when offline, auto-recovers via circuit breaker |
| PubSub Interface | messagebus.PubSub with QoS/retain semantics for IoT protocols |
| MQTT Adapter | Eclipse Paho-based implementation (build tag mqtt) with auto-reconnect |
| Device Connectors | Serial (UART), GPIO (chardev), CAN (SocketCAN), I2C — all pure Go, no CGO |
| DeviceTool | Wraps hardware as tool.Tool with permission model (sensors auto-allow, actuators require ASK) |
| SensorMiddleware | Injects live sensor readings into system prompt with token budget control |
| Watchdog | Timer-based safety: triggers safe-state if agent loop stalls |
Cross-compiles to arm64/arm/mips64le/riscv64. Stripped binary ~6MB.
Requirements: Go 1.25+
go get github.com/alanfokco/agentscope-go/v2/pkg/agentscopeexport DASHSCOPE_API_KEY=sk-... # or ANTHROPIC_API_KEY / OPENAI_API_KEY
go run ./examples/agent_v2package main
import (
"context"
"encoding/json"
"fmt"
as "github.com/alanfokco/agentscope-go/v2/pkg/agentscope"
"github.com/alanfokco/agentscope-go/v2/pkg/agentscope/agent"
"github.com/alanfokco/agentscope-go/v2/pkg/agentscope/model"
"github.com/alanfokco/agentscope-go/v2/pkg/agentscope/tool"
)
func main() {
as.Init()
cm, _ := model.NewDashScopeChatModel(model.DashScopeConfig{
APIKey: "sk-...", Model: "qwen-plus",
})
weatherTool := tool.NewFunctionTool(
"get_weather", "Get current weather for a city",
json.RawMessage(`{
"type": "object",
"properties": {"location": {"type": "string"}},
"required": ["location"]
}`),
func(ctx context.Context, input map[string]any) (any, error) {
return map[string]any{"temp": "22°C", "condition": "sunny"}, nil
},
)
a := agent.NewUnifiedAgent("assistant", "You are a weather bot.", cm,
agent.WithToolkit(tool.NewToolkit(weatherTool)),
agent.WithReactConfig(agent.ReactConfig{MaxIters: 5}),
)
reply, _ := a.Reply(context.Background(), "What's the weather in Shanghai?")
if txt := reply.GetTextContent("\n"); txt != nil {
fmt.Println(*txt)
}
}ch, _ := a.ReplyStream(ctx, "Tell me a story.")
for evt := range ch {
switch e := evt.(type) {
case event.TextBlockDeltaEvent:
fmt.Print(e.Delta)
case event.ReplyEndEvent:
fmt.Println()
}
}type TimingMiddleware struct { middleware.BaseMiddleware }
func (m *TimingMiddleware) OnModelCall(ctx context.Context, input *middleware.ModelCallInput, next middleware.ModelCallHandler) (*model.ChatResponse, error) {
start := time.Now()
resp, err := next(ctx, input)
log.Printf("[%s] model call: %v", input.ModelName, time.Since(start))
return resp, err
}
a := agent.NewUnifiedAgent("bot", "...", cm,
agent.WithMiddlewares(&TimingMiddleware{
BaseMiddleware: middleware.BaseMiddleware{MiddlewareKey: "timing"},
}),
)pkg/agentscope/
├── agent/ # Agent interface + UnifiedAgent, UserAgent, A2AAgent
├── model/ # ChatModel interface + 9 providers + 78 model cards + price overlay
├── tool/ # Tool interface + FunctionTool + 19 built-in tools + safety analysis
├── message/ # Msg + ContentBlock (text, thinking, tool_call, tool_result, data, hint)
├── event/ # 30 event types for streaming lifecycle
├── middleware/ # 7-hook onion chain + tracing, TTS, budget, memory, metrics, cost, guardrail
├── formatter/ # Per-provider message formatting (9 formatters)
├── permission/ # 5 modes + Engine + Checker + Rule matching
├── pipeline/ # Pipeline (Then/If) + MsgHub (multi-agent routing)
├── credential/ # 9 provider credential types + auto-detect from env
│
├── replay/ # Record/replay + flight recorder + run logs/diff
├── replay/evalkit/ # YAML eval suites: runner, scorers, LLM judge, A/B compare
├── providercontract/ # Test-only provider contract wall (6 providers × up to 6 contracts)
├── runtime/ # AgentPool, SessionEngine, AgentManager, BudgetTracker, Run
├── hotreload/ # Typed generic config reloader with file watching
├── wasm/ # WASM sandbox (Wasmtime limit enforcement)
├── bench/ # Load testing framework with P50/P95/P99 reporting
├── a2a/ # A2A protocol types + HTTP client
├── a2a/grpc/ # TCP transport: bidirectional agent mesh
│
├── hub/ # MCP Hub + Skill Hub + Registry + built-in sources (GitHub MCP registry, ClawHub)
├── access/ # Resource sharing: users/groups/orgs with 4 permission levels
├── workspace/ # 8 backends: Local, Docker, E2B, Apple, Bubblewrap, Daytona, OpenSandbox, K8s
├── rag/ # Index + KnowledgeBase + 5 vector stores
├── rag/parser/ # 5 document parsers: Text, PDF, Word, Excel, PPT
├── storage/ # 4 backends: InMemory, File, Redis, SQL
├── tts/ # 3 providers: DashScope, OpenAI, Gemini
├── embedding/ # 4 providers + batch + cache + multimodal
│
├── audit/ # Structured audit logging (InMemory/File/Multi/Nop)
├── mcp/ # MCP client (Stdio + HTTP) + MCP server
├── team/ # Agent teams with leader/worker coordination
├── service/ # HTTP agent service + SSE + AG-UI protocol
├── webui/ # Embedded web UI (go:embed SPA)
├── tracing/ # Tracer interface + OTel + LoggerTracer
├── metrics/ # Counter/Histogram + InMemoryProvider + MetricsHook
├── resilience/ # Circuit breaker + rate limiter for ChatModel
├── loop/ # Configurable agent loop (model → tool → iterate)
├── memory/ # Conversation memory + compression
├── messagebus/ # InMemory + Redis pub/sub + registry
├── messagebus/mqtt/ # MQTT PubSub adapter for edge/IoT (build tag: mqtt)
├── device/ # Hardware connectors (Serial/GPIO/CAN/I2C) + DeviceTool + Watchdog
├── session/ # Session KV store (memory + JSON file)
├── skill/ # Reusable skill system + SkillManager + per-agent workspace partitions (skill.Store)
├── prompt/ # Composable system prompt assembly
├── schedule/ # InMemoryScheduler for periodic tasks
├── realtime/ # Realtime streaming interface
├── sandbox/ # Execution policies (Allow/Deny/AskUser)
├── platform/ # Cross-platform shell detection + safety
├── logging/ # Structured logging handlers
├── protocol/ # LoopState, ApprovalPolicy, PermissionProfile
├── errors/ # Typed error hierarchy (Retriable, Throttled, PermissionDenied)
├── config/ # Configuration loading
├── app/ # Application bootstrap
├── console/ # Terminal renderer + interactive agent console
├── channel/ # IM channel gateway + DingTalk channel (channel/dingtalk)
├── tune/ # Model tuning utilities
├── types/ # Shared type definitions
├── agenttest/ # Test helpers, mocks, and fault injection (agenttest/faults)
└── internal/ # fsutil (atomic writes), httpsec (SSRF guard), httpx (HTTP+SSE), jsonx (repair)
54 examples in examples/. Run any with go run ./examples/<name>.
| Example | Description |
|---|---|
| Agent Basics | |
simple |
Minimal agent + single chat call |
agent_v2 |
UnifiedAgent with native API tool calling |
streaming |
Real-time streaming via ReplyStream + event channel |
react_tool |
UnifiedAgent with custom FunctionTool |
react_builtin_tools |
UnifiedAgent with enhanced built-in toolkit (bash, read, write, edit, glob, grep) |
console |
Interactive terminal chat with an agent (streamed rendering + tool-call confirmation) |
dingtalk_channel |
Connect an agent to DingTalk (Stream SDK inbound, webhook replies, text-mode confirmations) |
| Model API | |
model_call |
Raw model API: streaming + two-round tool calling + structured output |
structured_output |
Force JSON Schema-compliant output via GenerateStructuredOutput |
multi_provider |
Model card queries + 9-provider switching |
multimodal |
Image input via URL and Base64 DataBlock |
multiagent |
Multi-agent conversation with moderator summary |
multiagent_multimodal |
Multi-agent + shared image input |
openai_response |
OpenAI Responses API (call + tools + structured output) |
| Infrastructure | |
middleware |
Custom logging middleware (model call + tool execution hooks) |
permission |
Permission engine: Explore / Default / Bypass modes |
tracing |
OpenTelemetry-style tracing with nested spans |
agent_loop |
v3 agent loop with MetricsHook and InMemoryProvider |
embedding |
Text embedding + cosine similarity matrix |
long_term_memory |
Cross-session memory middleware (3 modes) |
agentic_memory |
File-based memory: FileStore JSON Lines persistence + MEMORY.md agentic middleware |
rag_react |
RAG with in-memory index + knowledge base |
| Multi-Agent & Orchestration | |
pipeline_multi_agent |
Pipeline + MsgHub orchestration |
agent_team |
Leader/Worker team with message routing |
mcp |
MCP client: tool discovery + remote execution |
a2a_http |
Agent-to-Agent over HTTP |
| Go Runtime | |
replay |
Record LLM calls, replay in CI without API costs |
agent_pool |
Fan-out agent pool with backpressure |
hotreload |
Zero-downtime config updates with typed Reloader[T] |
wasm_sandbox |
WASM tool sandbox with memory/time limits |
grpc_a2a |
TCP agent mesh with bidirectional streaming |
bench |
Agent load testing with P50/P95/P99 latency |
hub_install |
Browse and install MCP servers/skills from hub |
skill_partitions |
Per-agent skill partitions: .seed template, equip-once, migration, purge |
workspace_sharing |
Session-workspace sharing + read-only artifact endpoints (list_dir/read_file) |
access_control |
Resource sharing across users/groups/orgs |
document_parser |
Parse PDF/Word/Excel/PPT into RAG chunks |
audit_logging |
Sandbox policy enforcement + structured audit trail |
guardrail |
Output content filtering with block/redact/warn actions |
eval_harness |
Replay-based agent evaluation with scorers |
replayview |
Terminal viewer for RunJSONL run logs (step through events) |
rundiff |
Align two RunJSONL run logs and print where they diverge |
spend_cap |
USD/CNY spend cap with CostTrackerMiddleware |
| Deployment | |
agent_service |
HTTP Agent Service (REST + SSE streaming) |
webui |
Web UI Studio with streaming chat, tool visualization, HITL |
scheduled_task |
One-shot and recurring task scheduling |
realtime_echo |
Realtime streaming interface demo |
| Edge & IoT | |
edge_offline |
ConnectivityAwareModel — automatic cloud/local fallback |
edge_sensor |
SensorMiddleware + Watchdog for physical sensors |
edge_serial_robot |
DeviceTool with serial robot arm control |
edge_fleet |
Multi-agent PubSub coordination across devices |
| Multi-Agent Games | |
werewolves |
Multi-agent Werewolves game with role-based behavior |
| Tracing | |
tracing_otlp |
OTLP tracing setup pattern (no OTel SDK dependency) |
| Kubernetes | |
k8s_workspace |
K8s workspace sandboxing + cluster read-only tools |
This repository documents its own APIs and limitations. Comparisons with Python need explicit release or commit references; no unversioned feature-absence table is maintained here.
Detailed documentation is available in the docs/ directory:
- Stability and remaining limits — API guarantees and open hardening work
- Execution and session hardening — Behaviors established by PRs #4 and #5
- Getting Started — Installation, first agent, environment setup
- Architecture — Package structure, core concepts, data flow
- Model Providers — Configure 9 LLM providers with examples
- Tools — Built-in tools, custom functions, permissions
- Middleware — 7-hook system, tracing, budget, memory
- Examples — Full catalog of 54 runnable examples
- Deployment — HTTP service, sandboxing, production checklist
- Edge Deployment — Cross-compile, Jetson/RPi quickstart, offline operation
- Device Tools — Serial/GPIO/CAN/I2C connectors, DeviceTool, Watchdog
- Multi-Device — Fleet coordination via MQTT PubSub
- Offline Operation — ConnectivityAwareModel, data buffering, power management
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Apache License 2.0 — see LICENSE for details.
If you find AgentScope helpful, please cite our papers: