Skip to main content

CodeTether: production-ready Agent-to-Agent (A2A) platform with MCP + OpenCode-compatible integration

Project description

๐Ÿ”— CodeTether

Turn AI Agents into Production Systems

Production Ready Apache License Python 3.12+ Docker Kubernetes

The open-source platform for building, deploying, and orchestrating AI agent systems at scale.

๐ŸŽ‰ v1.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 lets you 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.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         CodeTether                               โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”‚
โ”‚  โ”‚   Claude    โ”‚  โ”‚   GPT-4     โ”‚  โ”‚   Gemini    โ”‚   LLMs       โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚
โ”‚         โ”‚                โ”‚                โ”‚                      โ”‚
โ”‚         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                      โ”‚
โ”‚                          โ–ผ                                       โ”‚
โ”‚              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                           โ”‚
โ”‚              โ”‚    A2A Protocol       โ”‚   Standard Communication  โ”‚
โ”‚              โ”‚    Message Broker     โ”‚                           โ”‚
โ”‚              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                           โ”‚
โ”‚                          โ”‚                                       โ”‚
โ”‚         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                      โ”‚
โ”‚         โ–ผ                โ–ผ                โ–ผ                      โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”‚
โ”‚  โ”‚  OpenCode   โ”‚  โ”‚ MCP Tools   โ”‚  โ”‚  Your APIs  โ”‚   Actions    โ”‚
โ”‚  โ”‚  (Coding)   โ”‚  โ”‚  (100+)     โ”‚  โ”‚             โ”‚              โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Why CodeTether?

๐Ÿค– Multi-Agent Orchestration

Build systems where agents collaborate, delegate tasks, and share contextโ€”all through the standardized A2A protocol.

๐Ÿ› ๏ธ MCP Tool Integration

Connect to 100+ tools via Model Context Protocol. File systems, databases, APIs, and more.

๐Ÿ’ป AI Coding at Scale

Deploy AI coding agents across your infrastructure using our maintained OpenCode fork. Automated code generation, refactoring, and testing.

๐Ÿ“ง Email Reply to Continue Tasks

Workers 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 Agent

Real-time voice interactions with AI agents through LiveKit integration. Multi-model support and session playback.

๐Ÿ“ก Real-Time Streaming

Watch agents think in real-time. SSE streaming for instant feedback and human intervention.

๐Ÿš€ Production Ready

Connect workers to https://api.codetether.run for live task execution. Helm charts and horizontal scaling included.

๐Ÿ” Enterprise Ready

Keycloak SSO, RBAC, audit logs, and network policies. Security that enterprises demand.

โ˜ธ๏ธ Deploy Anywhere

Helm charts, horizontal scaling, blue-green deployments. Production from day one on any cloud or on-premise infrastructure.

๐Ÿš€ Quick Start

One-Line Install

git clone https://github.com/rileyseaburg/codetether.git
cd A2A-Server-MCP && pip install -r requirements.txt
# Optional (recommended): install the package + CLI
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:

  1. Install the worker:

    sudo ./agent_worker/install.sh
    
  2. Configure for production: Edit /etc/a2a-worker/env:

    A2A_SERVER_URL=https://api.codetether.run
    
  3. Authenticate models: Ensure your models are authenticated in ~/.local/share/opencode/auth.json. The worker will only register models it has credentials for.

  4. 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-restart to 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:

  1. Worker completes task โ†’ sends email with special reply-to address
  2. You reply to the email with follow-up instructions
  3. SendGrid forwards your reply to CodeTether
  4. Server creates a continuation task with your message
  5. 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

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"):

  1. Check worker is running:

    sudo systemctl status a2a-agent-worker
    
  2. Check worker logs for sync errors:

    sudo journalctl -fu a2a-agent-worker | grep -i "session\|sync"
    
  3. 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;"
    
  4. 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?

  1. Check DATABASE_URL in worker env:

    cat /etc/a2a-worker/env
    # Should contain: DATABASE_URL=postgresql://...
    
  2. Check network connectivity:

    curl -v https://api.codetether.run/v1/health
    
  3. 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
  • Claude (Anthropic)
  • GPT-4 (OpenAI)
  • Gemini (Google)
  • DeepSeek
  • Grok (xAI)
  • File systems
  • Databases
  • Git repositories
  • REST APIs
  • Custom MCP servers
  • Kubernetes
  • Docker
  • Redis
  • Keycloak
  • Any cloud

๐Ÿ“š Documentation

Resource Link
๐Ÿ“– Full Documentation docs.codetether.run
๐Ÿš€ Quick Start Guide Getting Started
๐Ÿ”ง API Reference API Docs
๐Ÿ‘ท Agent Worker Guide Agent Worker
๐ŸŽค 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

codetether-1.1.0.tar.gz (304.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codetether-1.1.0-py3-none-any.whl (315.3 kB view details)

Uploaded Python 3

File details

Details for the file codetether-1.1.0.tar.gz.

File metadata

  • Download URL: codetether-1.1.0.tar.gz
  • Upload date:
  • Size: 304.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codetether-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5c4a20271c57630c9ee23f0dbea9c5d83875ddc14d3f5f519af7ba897ebb9a58
MD5 54ecb26f3cc0882946a538a01cbadd9a
BLAKE2b-256 237df39f382be4f96c97abedae8378b46c13dee545dfec6edf5fe98e867f0405

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetether-1.1.0.tar.gz:

Publisher: publish-pypi.yml on rileyseaburg/codetether

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codetether-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: codetether-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 315.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for codetether-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c65a41144a73f459fb5056def6c527dc172e702addbd77e5edc86a2751ec121f
MD5 0e65a97aa6c96b6968859978b8097324
BLAKE2b-256 9a682c43f7e7f04c5c06e273b2dd4e36336b71c25bffda8d45869d4f60e2df5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for codetether-1.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on rileyseaburg/codetether

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page