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 →
Shannon open-source platform architecture — multi-agent orchestration with execution strategies, WASI sandboxing, and built-in observability
| 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 dashboard, 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, local models |
- Docker and Docker Compose
- An API key for at least one LLM provider (OpenAI, Anthropic, etc.)
Quick Install:
curl -fsSL https://raw.githubusercontent.com/Kocoro-lab/Shannon/v0.3.1/scripts/install.sh | bashThis downloads config, prompts for API keys, pulls Docker images, and starts services.
Required API Keys (choose one):
- OpenAI:
OPENAI_API_KEY=sk-... - Anthropic:
ANTHROPIC_API_KEY=sk-ant-... - Or any OpenAI-compatible endpoint
Optional but recommended:
- Web Search:
SERPAPI_API_KEY=...(get key at serpapi.com) - Web Fetch:
FIRECRAWL_API_KEY=...(get key at firecrawl.dev)
Setting API keys: The install script prompts you to edit .env during setup. To update keys later:
cd ~/shannon # or your install directory nano .env # edit API keys docker compose -f docker-compose.release.yml down docker compose -f docker-compose.release.yml up -dBuilding from source? See Development below.
Platform-specific guides: Ubuntu · Rocky Linux · Windows · Windows (中文)
Shannon provides multiple ways to interact with AI agents. Choose the option that works best for you:
Use Shannon's HTTP REST API directly. For complete API documentation, see docs.shannon.run.
# 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-session" }' # Response: {"task_id":"task-dev-123","status":"running"} # Stream events in real-time curl -N "http://localhost:8080/api/v1/stream/sse?workflow_id=task-dev-123" # Get final result curl "http://localhost:8080/api/v1/tasks/task-dev-123"Perfect for:
- Integrating Shannon into existing applications
- Automation scripts and workflows
- Language-agnostic integration
Install the official Shannon Python SDK:
pip install shannon-sdkfrom shannon import ShannonClient # Create client with ShannonClient(base_url="http://localhost:8080") as client: # Submit task handle = client.submit_task( "What is the capital of France?", session_id="demo-session" ) # Wait for completion result = client.wait(handle.task_id) print(result.result)Perfect for:
- Python-based applications and notebooks
- Data science workflows
- Batch processing and automation
See Python SDK Documentation for the full API reference.
Download pre-built desktop applications from GitHub Releases:
- macOS (Universal) — Intel & Apple Silicon
- Windows (x64) — MSI or EXE installer
- Linux (x64) — AppImage or DEB package
Or build from source:
cd desktop npm install npm run tauri:build # Builds for your platformNative app benefits:
- System tray integration and native notifications
- Offline task history (Dexie.js local database)
- Better performance and lower memory usage
- Auto-updates from GitHub releases
See Desktop App Guide for more details.
Run the desktop app as a local web server for development:
# In a new terminal (backend should already be running) cd desktop npm install npm run dev # Open http://localhost:3000 in your browserPerfect for:
- Quick testing and exploration
- Development and debugging
- Real-time event streaming visualization
Add these to your .env file based on which tools you need:
# Web Search (choose one provider) WEB_SEARCH_PROVIDER=serpapi # serpapi | searchapi | google | bing | exa SERPAPI_API_KEY=your-serpapi-key # serpapi.com # OR SEARCHAPI_API_KEY=your-searchapi-key # searchapi.io # OR GOOGLE_SEARCH_API_KEY=your-google-key # Google Custom Search GOOGLE_SEARCH_ENGINE_ID=your-engine-id # Web Fetch/Crawl (for deep research) WEB_FETCH_PROVIDER=firecrawl # firecrawl | exa | python FIRECRAWL_API_KEY=your-firecrawl-key # firecrawl.dev (recommended for production)Tip: For quick setup, just add
SERPAPI_API_KEY. Get a key at serpapi.com.
| Service | Port | Endpoint | Purpose |
|---|---|---|---|
| Gateway | 8080 | http://localhost:8080 | REST API, OpenAI-compatible /v1 |
| Admin/Events | 8081 | http://localhost:8081 | SSE/WebSocket streaming, health |
| Orchestrator | 50052 | localhost:50052 | gRPC (internal) |
| Temporal UI | 8088 | http://localhost:8088 | Workflow debugging |
| Grafana | 3030 | http://localhost:3030 | Metrics dashboard |
Daemon & Real-time Messaging:
GET /api/v1/daemon/status— Daemon connection statusWebSocket /v1/ws/messages— Real-time message delivery to connected CLI daemons
Channels (Messaging Integrations):
POST/GET/PUT/DELETE /api/v1/channels— CRUD for messaging channel integrations (Slack, LINE)POST /api/v1/channels/{channel_id}/webhook— Inbound webhook endpoint
Workspace Files:
GET /api/v1/sessions/{sessionId}/files— List session workspace filesGET /api/v1/sessions/{sessionId}/files/{path}— Download a workspace file
See the architecture diagram above for the full platform overview including execution strategies, sandbox isolation, and tool ecosystem.
Components:
- Orchestrator (Go) — Task routing, budget enforcement, session management, OPA policies
- Agent Core (Rust) — WASI sandbox, policy enforcement, session workspaces, file operations
- LLM Service (Python) — Provider abstraction (15+ LLMs), MCP tools, skills system
- Data Layer — PostgreSQL (state), Redis (sessions), Qdrant (vector memory)
# Drop-in replacement for OpenAI API export OPENAI_API_BASE=http://localhost:8080/v1 # Your existing OpenAI code works unchanged# Monitor agent execution in real-time (SSE) curl -N "http://localhost:8080/api/v1/stream/sse?workflow_id=task-dev-123" # Events include: # - WORKFLOW_STARTED, WORKFLOW_COMPLETED # - AGENT_STARTED, AGENT_COMPLETED # - TOOL_INVOKED, TOOL_OBSERVATION # - LLM_PARTIAL, LLM_OUTPUT# List available skills curl http://localhost:8080/api/v1/skills # Execute task with a skill (skill becomes system prompt) curl -X POST http://localhost:8080/api/v1/tasks \ -H "Content-Type: application/json" \ -d '{ "query": "Review the auth module for security issues", "skill": "code-review", "session_id": "review-123" }'Create custom skills in config/skills/user/. See Skills System.
# Agents execute code in isolated WASI sandboxes — no network, read-only FS # Each session gets its own workspace at /tmp/shannon-sessions/{session_id}/ curl -X POST http://localhost:8080/api/v1/tasks \ -H "Content-Type: application/json" \ -d '{ "query": "Run this Python script and save the output", "session_id": "my-workspace" }'WASI sandbox provides secure code execution with no system call access. See Session Workspaces.
# Multi-agent research with automatic synthesis 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" } }' # Orchestrates multiple research agents and synthesizes findings with citations# Multi-agent collaboration with P2P message passing 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 } }' # Lead Agent plans and coordinates; worker agents execute via shared workspace# Tasks can pause for human approval before sensitive operations curl -X POST http://localhost:8080/api/v1/tasks \ -H "Content-Type: application/json" \ -d '{ "query": "Update the production database schema", "context": { "require_approval": true } }' # Workflow pauses and waits for explicit human approval before proceeding# Multi-turn conversations with context memory 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 previous context (within history window) 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"}' # Agent recalls recent conversation history from the same session# Run tasks on a schedule (cron syntax) curl -X POST http://localhost:8080/api/v1/schedules \ -H "Content-Type: application/json" \ -d '{ "name": "Daily Market Analysis", "cron_expression": "0 9 * * *", "task_query": "Analyze market trends", "max_budget_per_run_usd": 0.50 }'- OpenAI: GPT-5.1, GPT-5 mini, GPT-5 nano
- Anthropic: Claude Opus 4.6, Opus 4.5, Opus 4.1, Sonnet 4.6, Sonnet 4.5, Haiku 4.5
- Google: Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 3 Pro Preview
- xAI: Grok 4 (reasoning & non-reasoning)
- DeepSeek: DeepSeek V3.2, DeepSeek R1
- Others: Qwen, Mistral, Meta (Llama 4), Zhipu (GLM-4.6), Cohere
- Open-Source / Local: Ollama (Llama, Mistral, Phi, etc.), LM Studio, vLLM — any OpenAI-compatible endpoint
- Automatic failover between providers
Note: OpenAI, Anthropic, xAI, and Google providers are battle-tested. Others are supported but less extensively validated.
Native support for Model Context Protocol:
- Custom tool registration
- OAuth2 server authentication
- Rate limiting and circuit breakers
- Cost tracking for MCP tool usage
# Production agent failed? Replay it locally step-by-step ./scripts/replay_workflow.sh task-prod-failure-123 # Output shows every decision, tool call, and state changecurl -X POST http://localhost:8080/api/v1/tasks \ -H "Content-Type: application/json" \ -d '{ "query": "Generate a market analysis report", "config": { "budget": { "max_tokens": 5000, "fallback_model": "gpt-5-mini" } } }' # Automatically switches to cheaper model when 80% budget consumed# config/opa/policies/teams.rego package shannon.teams allow { input.team == "data-science" input.model in ["gpt-5", "claude-sonnet-4-5-20250929"] } deny_tool["database_write"] { input.team == "support" }# Python runs in isolated WASI sandbox — no network, read-only FS ./scripts/submit_task.sh "Execute Python: import os; os.system('rm -rf /')" # Result: OSError - system calls blocked by WASI sandbox- Multi-Tenant Isolation — Separate memory, budgets, and policies per tenant
- Human-in-the-Loop — Approval middleware pauses workflows for human review before sensitive operations
- Audit Trail — Complete trace of every decision and data access
- On-Premise Ready — No cloud dependencies, runs entirely in your infrastructure
Shannon uses layered configuration:
- Environment Variables (
.env) — API keys, secrets - YAML Files (
config/) — Feature flags, model pricing, policies
Key files:
config/models.yaml— LLM providers, pricing, tier configurationconfig/features.yaml— Feature toggles, workflow settingsconfig/opa/policies/— Access control rules
See Configuration Guide for details.
# Check all services docker compose -f deploy/compose/docker-compose.release.yml ps # Gateway health curl http://localhost:8080/health # Admin health curl http://localhost:8081/health# All services docker compose -f deploy/compose/docker-compose.release.yml logs -f # Specific service docker compose -f deploy/compose/docker-compose.release.yml logs -f orchestrator docker compose -f deploy/compose/docker-compose.release.yml logs -f gateway docker compose -f deploy/compose/docker-compose.release.yml logs -f llm-serviceServices not starting:
- Check
.envhas required API keys (OPENAI_API_KEYorANTHROPIC_API_KEY) - Ensure ports 8080, 8081, 50052 are not in use
- Run
docker compose -f deploy/compose/docker-compose.release.yml down && docker compose -f deploy/compose/docker-compose.release.yml up -dto recreate
Task execution fails:
- Verify LLM API key is valid:
echo $OPENAI_API_KEY - Check orchestrator logs for errors
- Ensure config files exist in
./config/directory
Out of memory:
- Reduce
WASI_MEMORY_LIMIT_MB(default: 512) - Lower
HISTORY_WINDOW_MESSAGES(default: 50) - Check Docker memory limits
| Resource | Description |
|---|---|
| Official Docs | Full documentation site |
| Architecture | System design deep-dive |
| API Reference | Agent Core API |
| Streaming APIs | SSE and WebSocket streaming |
| Python Execution | WASI sandbox guide |
| Adding Tools | Custom tool development |
For contributors who want to build and run Shannon locally:
# Clone the repository git clone https://github.com/Kocoro-lab/Shannon.git cd Shannon # Setup development environment make setup # Creates .env, generates proto files echo "OPENAI_API_KEY=sk-..." >> .env # Add your API key ./scripts/setup_python_wasi.sh # Download Python WASI interpreter (~20MB) # Start all services (builds locally) make dev # Run tests make smoke # E2E smoke tests make ci # Full CI suiteIf you cloned the repo but want to use pre-built images instead of building:
cd Shannon cp .env.example .env nano .env # Add your API keys docker compose -f deploy/compose/docker-compose.release.yml up -dmake lint # Run linters (Go, Rust, Python) make fmt # Format code make proto # Regenerate proto files make logs # View service logs make ps # Service status make down # Stop all servicesSee CONTRIBUTING.md for full development guidelines.
We welcome contributions! See CONTRIBUTING.md for guidelines.
- Open an issue — Bug reports and questions
- View roadmap — What's coming next
MIT License — Use it anywhere, modify anything. See LICENSE.
Stop debugging AI failures. Start shipping reliable agents.
GitHub · Docs · X

