CodeTether: A2A Protocol v0.3 compliant agent orchestration platform with MCP + OpenCode integration
Project description
๐ CodeTether
Turn AI Agents into Production Systems
The open-source platform for building, deploying, and orchestrating AI agent systems at scale.
๐ v1.2.0 Production Release - Battle-tested and running in production at api.codetether.run
๐ Quick Start โข ๐ Documentation โข ๐ฌ Discord โข ๐ฆ Twitter
๐ฏ What is CodeTether?
CodeTether is a production-ready Agent-to-Agent (A2A) platform that is officially A2A Protocol v0.3 compliant. Build AI agent systems that actually work in the real worldโconnect any LLM to any tool, orchestrate complex multi-agent workflows, and deploy with confidence. Our implementation uses the official a2a-sdk from Google, ensuring full interoperability with any A2A-compliant client or agent.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CodeTether โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ Claude โ โ GPT-4 โ โ Gemini โ LLMs โ
โ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโ โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ A2A Protocol v0.3 Layer โ โ
โ โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ โ
โ โ โ /.well-known/ โ โ /a2a/jsonrpcโ โ /a2a/rest/* โ โ โ
โ โ โ agent-card.json โ โ (RPC) โ โ (REST API) โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Message Broker โ Standard Communication โ
โ โ (Redis/Memory) โ โ
โ โโโโโโโโโโโโโฌโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโ โ
โ โผ โผ โผ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ OpenCode โ โ MCP Tools โ โ Your APIs โ Actions โ
โ โ (Coding) โ โ (100+) โ โ โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โจ Why CodeTether?
๐ค Multi-Agent OrchestrationBuild systems where agents collaborate, delegate tasks, and share contextโall through the standardized A2A protocol. ๐ ๏ธ MCP Tool IntegrationConnect to 100+ tools via Model Context Protocol. File systems, databases, APIs, and more. ๐ป AI Coding at ScaleDeploy AI coding agents across your infrastructure using our maintained OpenCode fork. Automated code generation, refactoring, and testing. ๐ RLM (Recursive Language Models)Process arbitrarily long contexts through recursive LLM calls in a Python REPL. Analyze entire monorepos without context limits using programmatic sub-LLM queries. ๐ง Email Reply to Continue TasksWorkers send email notifications when tasks complete. Reply directly to the email to continue the conversationโthe agent picks up right where it left off. No dashboard needed. |
๐ค Voice AgentReal-time voice interactions with AI agents through LiveKit integration. Multi-model support and session playback. ๐ก Real-Time StreamingWatch agents think in real-time. SSE streaming for instant feedback and human intervention. ๐ Production ReadyConnect workers to ๐ Enterprise ReadyKeycloak SSO, RBAC, audit logs, and network policies. Security that enterprises demand. โธ๏ธ Deploy AnywhereHelm charts, horizontal scaling, blue-green deployments. Production from day one on any cloud or on-premise infrastructure. |
๐ A2A Protocol Compliance
CodeTether implements the A2A Protocol v0.3 specification using the official a2a-sdk from Google, ensuring full interoperability with any A2A-compliant client or agent.
Standard Endpoints
| Endpoint | Description |
|---|---|
/.well-known/agent-card.json |
Agent capability discovery and metadata |
/a2a/jsonrpc |
JSON-RPC 2.0 endpoint for A2A protocol messages |
/a2a/rest/* |
RESTful API endpoints for task and agent management |
Interoperability
- Any A2A Client: Connect using standard A2A protocol clients from any language or platform
- Agent Discovery: Automatic capability discovery via well-known endpoint
- Cross-Platform: Seamlessly communicate with other A2A-compliant agents
- SDK Support: Built on Google's official
a2a-sdkfor guaranteed compatibility
# Discover agent capabilities
curl https://api.codetether.run/.well-known/agent-card.json
# Send A2A message via JSON-RPC
curl -X POST https://api.codetether.run/a2a/jsonrpc \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "message/send", "params": {...}, "id": 1}'
๐ Quick Start
Install from PyPI
pip install codetether
Or Install from Source
git clone https://github.com/rileyseaburg/codetether.git
cd A2A-Server-MCP && pip install -e .
# For production (PostgreSQL persistence):
export DATABASE_URL=postgresql://user:password@host:5432/a2a_server
# Start the server (defaults to `run`)
codetether --port 8000
Docker
docker run -p 8000:8000 registry.quantum-forge.net/library/a2a-server-mcp:latest
Kubernetes (Production)
helm install codetether oci://registry.quantum-forge.net/library/a2a-server \
--namespace codetether --create-namespace
Distributed Workers (Scale Anywhere)
Run agents on any machine with the CodeTether Worker:
git clone https://github.com/rileyseaburg/codetether.git
cd codetether && sudo ./agent_worker/install.sh
Learn more in the Distributed Workers Guide.
๐ Production Worker Setup
To connect a local worker to the production CodeTether service:
-
Install the worker:
sudo ./agent_worker/install.sh -
Configure for production: Edit
/etc/a2a-worker/env:A2A_SERVER_URL=https://api.codetether.run
-
Authenticate models: Ensure your models are authenticated in
~/.local/share/opencode/auth.json. The worker will only register models it has credentials for. -
Restart the service:
sudo systemctl restart a2a-agent-worker
# Or use the makefile shortcut: make local-worker-restart
How it works:
- Worker discovers local OpenCode sessions from
~/.local/share/opencode/storage/ - Worker syncs sessions to PostgreSQL via
/v1/opencode/codebases/{id}/sessions/sync - Worker syncs session messages via
/v1/opencode/codebases/{id}/sessions/{id}/messages/sync - Monitor UI and production API read sessions from PostgreSQL
- Use
make local-worker-restartto restart the worker service
That's it. Your agent platform is running at http://localhost:8000
๐ฌ See It In Action
Talk to Your Agents
curl -X POST http://localhost:8000/ \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "message/send",
"params": {"message": {"parts": [{"type": "text", "content": "Calculate 25 * 4"}]}}
}'
Deploy AI Coding Agents
# Register a codebase
curl -X POST http://localhost:8000/v1/opencode/codebases \
-H "Content-Type: application/json" \
-d '{"name": "my-app", "path": "/home/user/my-app"}'
# Trigger an agent task
curl -X POST http://localhost:8000/v1/opencode/codebases/{id}/trigger \
-d '{"prompt": "Add unit tests for the auth module", "agent": "build"}'
Stream Real-Time Output
curl http://localhost:8000/v1/opencode/codebases/{id}/events
๐ง Email Reply to Continue Tasks
When a task completes, workers send you an email. Just reply to continue the conversationโno dashboard, no CLI, just email.
From: noreply@codetether.run
To: you@example.com
Subject: [A2A] Task completed: Add unit tests
Reply-To: task+sess_abc123@inbound.codetether.run
โ COMPLETED
Your task "Add unit tests" finished successfully.
Reply to this email to continue the conversation.
---
You: "Great, now add integration tests too"
โ Agent picks up and continues working
How it works:
- Worker completes task โ sends email with special
reply-toaddress - You reply to the email with follow-up instructions
- SendGrid forwards your reply to CodeTether
- Server creates a continuation task with your message
- Worker resumes the same session and keeps working
Zero friction. Check your email, reply, done.
๐๏ธ Architecture
CodeTether is built on five core pillars:
| Component | Purpose | Technology |
|---|---|---|
| A2A Protocol Server | Agent communication & orchestration | Python, FastAPI, Redis |
| Distributed Workers | Scale agent execution across machines | Python, Redis, Systemd/K8s |
| MCP Integration | Tool access & resource management | Model Context Protocol |
| PostgreSQL Database | Durable storage for sessions, codebases, tasks | PostgreSQL, asyncpg |
| OpenCode Bridge | AI-powered code generation | Local OpenCode fork, Claude/GPT-4 |
| RLM Engine | Recursive context processing | Python REPL, sub-LLM calls |
Platform Components
codetether/
โโโ ๐ API Server # A2A protocol + REST APIs
โโโ ๐ฅ๏ธ Monitor UI # Real-time agent dashboard
โโโ ๐ท [Agent Workers](https://docs.codetether.run/features/distributed-workers/) # Distributed task execution
โโโ ๐ค OpenCode Fork # Maintained AI coding agent
โโโ ๐ Documentation # MkDocs Material site
โโโ ๐ Marketing Site # Next.js landing page
Data Flow:
OpenCode Storage (local) โ Worker โ PostgreSQL โ Bridge/API โ Monitor UI
Workers sync sessions from local OpenCode storage to PostgreSQL. The OpenCode bridge and Monitor UI read from PostgreSQL, providing a consistent view across server replicas and restarts.
๐ฆ What's Included
Core Platform
- โ Full A2A Protocol implementation
- โ MCP tool integration
- โ Redis message broker
- โ PostgreSQL durable storage (sessions, codebases, tasks)
- โ SSE real-time streaming
- โ Worker sync to PostgreSQL from OpenCode storage
Enterprise Features
- โ Keycloak SSO integration
- โ Role-based access control
- โ Audit logging
- โ Network policies
DevOps Ready
- โ Unified Helm chart (server + marketing + docs)
- โ Blue-green deployments
- โ Horizontal pod autoscaling
- โ Health checks & metrics
Developer Experience
- โ Real-time Monitor UI
- โ Swift iOS/macOS app
- โ CLI tools
- โ Comprehensive API docs
- โ Voice agent with LiveKit
- โ Marketing coordinator for task orchestration
- โ Worker SSE push notifications
- โ 27 marketing MCP tools (creative, campaigns, analytics)
- โ Email reply continuation - reply to task emails to keep working
๐ ๏ธ Deployment Options
| Environment | Command | Description |
|---|---|---|
| Local | python run_server.py or make run |
Development mode |
| Production | DATABASE_URL=... make k8s-prod |
Full PostgreSQL persistence |
| Docker | docker-compose up |
Single container |
| Kubernetes | make k8s-prod |
Full production stack |
Production Deployment
# Build and deploy everything
make k8s-prod
# This builds & deploys:
# โ
API Server (api.codetether.run)
# โ
Marketing Site (codetether.run)
# โ
Documentation (docs.codetether.run)
# โ
Redis cluster
๐ง Environment Variables
| Variable | Description | Default | Required |
|---|---|---|---|
DATABASE_URL |
PostgreSQL connection string | postgresql://user:pass@host:5432/db |
Yes (production) |
A2A_REDIS_URL |
Redis URL for message broker | redis://localhost:6379 |
No |
A2A_AUTH_TOKENS |
Comma-separated auth tokens (format: name:token,name2:token2) |
"" |
No |
OPENCODE_HOST |
Host where OpenCode API is running (containerโhost) | localhost |
No |
OPENCODE_PORT |
Default OpenCode server port | 9777 |
No |
A2A_SERVER_URL |
Production server URL (for workers) | http://localhost:8000 |
No |
Setting DATABASE_URL:
# Local development (with PostgreSQL):
export DATABASE_URL=postgresql://a2a:a2a_password@localhost:5432/a2a_server
# Production:
export DATABASE_URL=postgresql://user:password@prod-db:5432/a2a_server
๐ Troubleshooting
Sessions Not Appearing in UI?
If you don't see sessions in the production API for a codebase (like "spotlessbinco"):
-
Check worker is running:
sudo systemctl status a2a-agent-worker
-
Check worker logs for sync errors:
sudo journalctl -fu a2a-agent-worker | grep -i "session\|sync"
-
Verify sessions are in PostgreSQL:
# Via API: curl http://localhost:8000/v1/opencode/database/sessions # Or via psql: psql -d a2a_server -c "SELECT id, codebase_id, title FROM sessions ORDER BY updated_at DESC LIMIT 10;"
-
Restart worker to force re-sync:
make local-worker-restart
How it works:
- Workers read local OpenCode storage from
~/.local/share/opencode/ - Workers POST sessions to
/v1/opencode/codebases/{id}/sessions/sync - Server persists to PostgreSQL via
db_upsert_session() - Monitor UI reads from PostgreSQL via
db_list_sessions() - No SQLite involved! All data goes through PostgreSQL
Worker Not Connecting?
-
Check
DATABASE_URLin worker env:cat /etc/a2a-worker/env # Should contain: DATABASE_URL=postgresql://...
-
Check network connectivity:
curl -v https://api.codetether.run/v1/health
-
Verify worker is registered:
curl http://localhost:8000/v1/opencode/database/workers
For more troubleshooting, see docs.codetether.run/troubleshooting
Production Deployment
๐ Integrations
| LLMs | Tools | Infrastructure |
|
|
|
๐ Documentation
| Resource | Link |
|---|---|
| ๐ Full Documentation | docs.codetether.run |
| ๐ Quick Start Guide | Getting Started |
| ๐ง API Reference | API Docs |
| ๐ท Agent Worker Guide | Agent Worker |
| ๐ RLM Guide | RLM (Recursive Language Models) |
| ๐ค Voice Agent | Voice Agent |
| ๐ Marketing Tools | Marketing Tools |
| ๐ค Marketing Coordinator | Marketing Coordinator |
| ๐ Worker SSE | Worker SSE |
| โธ๏ธ Kubernetes Deployment | Helm Charts |
| ๐ Authentication | Keycloak Setup |
For detailed technical documentation, see DEVELOPMENT.md.
๐ค Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
# Setup development environment
git clone https://github.com/rileyseaburg/codetether.git
cd A2A-Server-MCP
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt -r requirements-test.txt
# Run tests
pytest tests/
# Start development server (Python + Next.js)
make dev
๐ License
Apache License 2.0 - See LICENSE for details.
Built with โค๏ธ by the CodeTether Team
Website โข Documentation โข GitHub
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codetether-1.4.0.tar.gz.
File metadata
- Download URL: codetether-1.4.0.tar.gz
- Upload date:
- Size: 402.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e82d45629d913b45f48d355134fa88882914b35d5c29c03bef6e7399256c5e0b
|
|
| MD5 |
025ccf0983bac310cd84a32abd42ba7b
|
|
| BLAKE2b-256 |
0ba97c345821f6e2d42f939369bc11f713400cb83495379ba992b0f8b4c2f36f
|
Provenance
The following attestation bundles were made for codetether-1.4.0.tar.gz:
Publisher:
publish-pypi.yml on rileyseaburg/codetether
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codetether-1.4.0.tar.gz -
Subject digest:
e82d45629d913b45f48d355134fa88882914b35d5c29c03bef6e7399256c5e0b - Sigstore transparency entry: 844598399
- Sigstore integration time:
-
Permalink:
rileyseaburg/codetether@7442a2581aca9a2f7e81da2f3c5ef8294b94980d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rileyseaburg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7442a2581aca9a2f7e81da2f3c5ef8294b94980d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file codetether-1.4.0-py3-none-any.whl.
File metadata
- Download URL: codetether-1.4.0-py3-none-any.whl
- Upload date:
- Size: 409.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff91eb5e14f7f507c61083f4cf981f2263b0eec3ad2f6b2e3e004c5cf1c6e6ab
|
|
| MD5 |
907c9a1b08a9ee986e58f9a078495a9f
|
|
| BLAKE2b-256 |
78cf978a0f5cfb4ac7c4b9028a1df8419a8a122fb79d09a6b07390a4d1991fa0
|
Provenance
The following attestation bundles were made for codetether-1.4.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on rileyseaburg/codetether
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codetether-1.4.0-py3-none-any.whl -
Subject digest:
ff91eb5e14f7f507c61083f4cf981f2263b0eec3ad2f6b2e3e004c5cf1c6e6ab - Sigstore transparency entry: 844598403
- Sigstore integration time:
-
Permalink:
rileyseaburg/codetether@7442a2581aca9a2f7e81da2f3c5ef8294b94980d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rileyseaburg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7442a2581aca9a2f7e81da2f3c5ef8294b94980d -
Trigger Event:
workflow_dispatch
-
Statement type: