A production-oriented multi-agent orchestration framework.
A production-oriented multi-agent orchestration framework.
Ship reliable AI agents to production. Multi-strategy orchestration, swarm collaboration, token budget control, human approval workflows, and time-travel debugging — all built in. Live Demo
| The Problem | Shannon's Solution |
|---|---|
| Agents fail silently? | Temporal workflows with time-travel debugging — replay any execution step-by-step |
| Costs spiral out of control? | Hard token budgets per task/agent with automatic model fallback |
| No visibility into what happened? | Real-time event streaming, Prometheus metrics, OpenTelemetry tracing |
| Security concerns? | WASI sandbox for code execution, OPA policies, multi-tenant isolation |
| Vendor lock-in? | Works with OpenAI, Anthropic, Google, DeepSeek, xAI, local models via Ollama |
curl -fsSL https://raw.githubusercontent.com/Kocoro-lab/Shannon/main/scripts/install.sh | bashThis downloads config, prompts for API keys, pulls Docker images, and starts services.
Required API Keys (choose one):
OPENAI_API_KEY=sk-...ANTHROPIC_API_KEY=sk-ant-...Optional but recommended:
SERPAPI_API_KEY=... (serpapi.com)FIRECRAWL_API_KEY=... (firecrawl.dev)Building from source? See Development below.
Platform-specific guides: Ubuntu | Rocky Linux | Windows | Windows (中文)
Shannon provides multiple ways to interact with AI agents:
# Submit a task
curl -X POST http://localhost:8080/api/v1/tasks \
-H "Content-Type: application/json" \
-d '{"query": "What is the capital of France?", "session_id": "demo"}'
# Stream events in real-time
curl -N "http://localhost:8080/api/v1/stream/sse?workflow_id=<task_id>"pip install shannon-sdkfrom shannon import ShannonClient
with ShannonClient(base_url="http://localhost:8080") as client:
handle = client.submit_task("What is the capital of France?", session_id="demo")
result = client.wait(handle.task_id)
print(result.result)# Drop-in replacement for OpenAI API
export OPENAI_API_BASE=http://localhost:8080/v1
# Your existing OpenAI code works unchangedDownload from GitHub Releases (macOS, Windows, Linux), or build from source:
cd desktop && npm install && npm run tauri:buildSee Desktop App Guide.
…| Service | Language | Port | Role |
|---|---|---|---|
| Gateway | Go | 8080 | REST API, auth (JWT/API key), rate limiting |
| Orchestrator | Go | 50052 | Temporal workflows, task decomposition, budget management |
| Agent Core | Rust | 50051 | Enforcement gateway, WASI sandbox, token counting |
| LLM Service | Python | 8000 | Provider abstraction, MCP tools, agent loop |
| Playwright | Python | 8002 | Browser automation for web scraping |
Tasks are automatically routed based on complexity:
| Strategy | Trigger | Use Case |
|---|---|---|
| Simple | Complexity < 0.3 | Single-agent, direct response |
| DAG | Multi-step tasks (default) | Fan-out/fan-in with dependency tracking |
| ReAct | Iterative reasoning | Reasoning + tool use loops |
| Research | Multi-step research | Tiered models for cost optimization (50-70% reduction) |
| Exploratory | Tree-of-Thoughts | Parallel hypothesis exploration |
| Browser Use | Web interaction tasks | Playwright-backed browsing agent |
| Domain Analysis | Specialized analysis | Domain-specific deep research |
| Swarm | Autonomous teams | Lead-orchestrated multi-agent with convergence detection |
curl -X POST http://localhost:8080/api/v1/tasks \
-H "Content-Type: application/json" \
-d '{
"query": "Compare renewable energy adoption in EU vs US",
"context": {"force_research": true, "research_strategy": "deep"}
}'curl -X POST http://localhost:8080/api/v1/tasks \
-H "Content-Type: application/json" \
-d '{
"query": "Analyze this dataset from multiple perspectives",
"context": {"force_swarm": true}
}'curl http://localhost:8080/api/v1/skills # List skills
curl -X POST http://localhost:8080/api/v1/tasks \
-H "Content-Type: application/json" \
-d '{"query": "Review the auth module", "skill": "code-review", "session_id": "review-123"}'Create custom skills in config/skills/user/ (create the directory if it doesn't exist — it's gitignored). See Skills System.
Enable approval gates via OPA policy or workflow templates with require_approval: true. Approvals route to connected daemon clients via WebSocket.
# Submit an approval decision
curl -X POST http://localhost:8080/api/v1/approvals/decision \
-H "Content-Type: application/json" \
-d '{"workflow_id": "<workflow_id>", "approval_id": "<approval_id>", "approved": true}'curl -X POST http://localhost:8080/api/v1/tasks \
-H "Content-Type: application/json" \
-d '{"query": "What is GDP?", "session_id": "econ-101"}'
# Follow-up remembers context
curl -X POST http://localhost:8080/api/v1/tasks \
-H "Content-Type: application/json" \
-d '{"query": "How does it relate to inflation?", "session_id": "econ-101"}'curl -X POST http://localhost:8080/api/v1/schedules \
-H "Content-Type: application/json" \
-d '{"name": "Daily Analysis", "cron_expression": "0 9 * * *", "task_query": "Analyze market trends"}'curl -X POST http://localhost:8080/api/v1/tasks \
-H "Content-Type: application/json" \
-d '{
"query": "Generate a market report",
"context": {"budget_max": 5000}
}'./scripts/replay_workflow.sh task-prod-failure-123| Endpoint | Orchestrator? | Format | Use Case |
|---|---|---|---|
POST /v1/chat/completions |
Yes | OpenAI-compatible | Apps using OpenAI SDK |
POST /v1/completions |
No (proxy) | OpenAI-compatible | Thin LLM proxy |
POST /api/v1/tasks |
Yes | Shannon native (sync) | Full orchestrator pipeline |
POST /api/v1/tasks/stream |
Yes | Shannon native (SSE) | Streaming orchestration |
Tool Execution: GET /api/v1/tools, POST /api/v1/tools/{name}/execute
Auth: GET /api/v1/auth/me, POST /api/v1/auth/refresh-key, GET/POST/DELETE /api/v1/auth/api-keys
Sessions: GET/PATCH/DELETE /api/v1/sessions/{id}, history, events, files
Task Control: POST /api/v1/tasks/{id}/cancel|pause|resume, GET .../control-state|events|timeline
Schedules: Full CRUD at /api/v1/schedules, plus pause, resume, runs
Real-Time: GET /api/v1/stream/sse, GET /api/v1/stream/ws, WS /v1/ws/messages (daemon)
…| File | Purpose |
|---|---|
.env |
API keys, runtime settings |
config/shannon.yaml |
Feature flags, auth, tracing |
config/models.yaml |
LLM providers, pricing, capabilities |
config/features.yaml |
Workflow settings, execution modes |
config/openai_models.yaml |
Custom shannon-* model names for OpenAI-compatible API |
config/research_strategies.yaml |
Research strategy model tiers |
| Service | Port | Protocol |
|---|---|---|
| Gateway | 8080 | HTTP |
| Orchestrator | 50052 (gRPC), 8081 (health) | gRPC/HTTP |
| Agent Core | 50051 | gRPC |
| LLM Service | 8000 | HTTP |
| Temporal | 7233 (gRPC), 8088 (UI) | gRPC/HTTP |
| PostgreSQL | 5432 | TCP |
| Redis | 6379 | TCP |
git clone https://github.com/Kocoro-lab/Shannon.git
cd Shannon
make setup # Create .env + generate protobuf stubs
vim .env # Add your API key
./scripts/setup_python_wasi.sh # Download Python WASI interpreter
make dev # Start all services
make smoke # Run E2E smoke testsmake dev # Start all services
make smoke # E2E smoke tests
make ci # Full CI suite
make proto # Regenerate protobuf files
make lint # Run linters
make logs # View service logs
make down # Stop all servicesThe Playwright service enables browser automation workflows (3.4GB image with Chromium). It is not started by default. To enable it:
# Development
docker compose -f deploy/compose/docker-compose.yml --profile browser up -d
# Pre-built images
docker compose -f deploy/compose/docker-compose.release.yml --profile browser up -dTest it with:
curl -X POST http://localhost:8080/api/v1/tasks \
-H "Content-Type: application/json" \
-d '{"query":"Go to https://waylandz.com and get the page title","session_id":"test","context":{"role":"browser_use"}}'cd Shannon
cp .env.example .env && vim .env
docker compose -f deploy/compose/docker-compose.release.yml up -ddocker compose -f deploy/compose/docker-compose.yml ps
curl http://localhost:8080/health
curl http://localhost:8081/healthServices not starting:
.env has required API keysdocker compose down && docker compose up -d to recreateTask execution fails:
docker compose logs -f orchestratorOut of memory:
WASI_MEMORY_LIMIT_MB (default: 512)HISTORY_WINDOW_MESSAGES (default: 50)Shannon is a production-oriented multi-agent orchestration framework built with Go, Rust, and Python. It focuses on reliability: Temporal workflows for fault tolerance, time-travel debugging, token budget control, human approval workflows, and WASI sandboxing for secure code execution.
| Framework | Focus | Key Differentiator |
|---|---|---|
| Shannon | Production reliability | Temporal workflows, time-travel debugging, hard token budgets |
| LangChain | LLM chains & RAG | Chain-of-thought composition, retrieval augmentation |
| CrewAI | Role-playing agents | Multi-agent roles, task delegation |
Shannon is designed for production deployment with built-in observability, budget management, and workflow re
No open issues yet, or sync has not completed.