Deep Agent Orchestration Platform — Sovereign infrastructure for deploying, orchestrating, and governing autonomous AI systems that plan, reason, and execute independently.
Unlike reactive chatbots ("System 1" AI), Deep Agents operate with deliberative reasoning ("System 2" AI): they decompose goals into task graphs, persist memory across sessions, delegate to specialized sub-agents, and recover from failures autonomously.
Trinity implements four foundational capabilities that transform simple AI assistants into autonomous agents:
- Explicit Planning — Workplans that persist outside the context window
- Hierarchical Delegation — Orchestrator-Worker pattern with context quarantine
- Persistent Memory — Virtual filesystems, memory folding, episodic memory
- Extreme Context Engineering — High-Order Prompts defining reasoning processes
- Isolated Agent Containers — Each agent runs in its own Docker container with dedicated resources
- Template-Based Deployment — Create agents from pre-configured templates or custom configurations
- Real-Time Monitoring — WebSocket-based activity streaming, telemetry, and context tracking
- MCP Integration — 12 tools for external agent orchestration via Model Context Protocol
- Agent-to-Agent Communication — Hierarchical delegation with permission controls
- Workplan System — Visual task graphs with dependencies and progress tracking
- Credential Management — Redis-backed secrets with hot-reload capability
- Scheduling — Cron-based automation for recurring agent tasks
- File Browser — Browse and download agent workspace files via web UI
- Docker and Docker Compose v2+
- Anthropic API key (for Claude-powered agents)
# 1. Clone the repository
git clone https://github.com/abilityai/trinity.git
cd trinity
# 2. Configure environment
cp .env.example .env
# Edit .env - at minimum set:
# SECRET_KEY (generate with: openssl rand -hex 32)
# ADMIN_PASSWORD
# ANTHROPIC_API_KEY
# 3. Build the base agent image
./scripts/deploy/build-base-image.sh
# 4. Start all services
./scripts/deploy/start.sh- Web UI: http://localhost:3000
- API Docs: http://localhost:8000/docs
- MCP Server: http://localhost:8080/mcp
Default login (dev mode): admin / your configured ADMIN_PASSWORD
- Open http://localhost:3000
- Click Create Agent
- Enter a name and select a template (or leave blank for a basic agent)
- Click Create
Your agent will start automatically. Use the Chat tab to interact with it.
┌─────────────────────────────────────────────────────────────┐
│ Trinity Platform │
├─────────────────────────────────────────────────────────────┤
│ Frontend (Vue.js) │ Backend (FastAPI) │ MCP Server │
│ Port 3000 │ Port 8000 │ Port 8080 │
├─────────────────────────────────────────────────────────────┤
│ Redis (secrets) │ SQLite (data) │ Audit Logger │
│ Internal only │ /data volume │ Port 8001 │
├─────────────────────────────────────────────────────────────┤
│ Agent Containers │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Agent 1 │ │ Agent 2 │ │ Agent N │ ... │
│ └─────────┘ └─────────┘ └─────────┘ │
└─────────────────────────────────────────────────────────────┘
trinity/
├── src/
│ ├── backend/ # FastAPI backend API
│ ├── frontend/ # Vue.js 3 + Tailwind CSS web UI
│ ├── mcp-server/ # Trinity MCP server (12 tools)
│ └── audit-logger/ # Security audit service
├── docker/
│ ├── base-image/ # Universal agent base image
│ ├── backend/ # Backend Dockerfile
│ └── frontend/ # Frontend Dockerfile
├── config/
│ └── agent-templates/ # Pre-configured agent templates
├── scripts/
│ └── deploy/ # Deployment and management scripts
└── docs/ # Documentation
Trinity deploys agents from templates. Templates define agent behavior, resources, and credential requirements.
my-template/
├── template.yaml # Metadata, resources, credentials
├── CLAUDE.md # Agent instructions
├── .claude/ # Claude Code configuration
│ ├── agents/ # Sub-agents (optional)
│ ├── commands/ # Slash commands (optional)
│ └── skills/ # Custom skills (optional)
├── .mcp.json.template # MCP config with ${VAR} placeholders
└── .env.example # Documents required env vars
See docs/AGENT_TEMPLATE_SPEC.md for the complete specification.
Trinity includes an MCP server for external orchestration of agents:
{
"mcpServers": {
"trinity": {
"type": "http",
"url": "http://localhost:8080/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}| Tool | Description |
|---|---|
list_agents |
List all agents with status |
get_agent |
Get detailed agent information |
create_agent |
Create a new agent |
start_agent |
Start a stopped agent |
stop_agent |
Stop a running agent |
delete_agent |
Delete an agent |
chat_with_agent |
Send a message and get response |
get_chat_history |
Retrieve conversation history |
list_templates |
List available templates |
reload_credentials |
Hot-reload agent credentials |
get_credential_status |
Check credential files |
get_agent_logs |
View container logs |
| Variable | Required | Description |
|---|---|---|
SECRET_KEY |
Yes | JWT signing key |
ADMIN_PASSWORD |
Yes | Admin user password |
ANTHROPIC_API_KEY |
Yes | For Claude-powered agents |
DEV_MODE_ENABLED |
No | Enable local login (default: true) |
AUTH0_DOMAIN |
No | Auth0 tenant for OAuth |
EXTRA_CORS_ORIGINS |
No | Additional CORS origins |
See .env.example for the complete list.
Development Mode (default): Username/password login
DEV_MODE_ENABLED=trueProduction Mode: Auth0 OAuth
DEV_MODE_ENABLED=false
AUTH0_DOMAIN=your-tenant.us.auth0.com- Deployment Guide — Production deployment instructions
- Agent Template Spec — Creating custom agent templates
- Testing Guide — Testing approach and standards
- Known Issues — Current limitations and workarounds
# Start in development mode (hot reload)
./scripts/deploy/start.sh
# View logs
docker compose logs -f backend
docker compose logs -f frontend
# Rebuild after changes
docker compose build backend
docker compose up -d backendThis project is licensed under the Polyform Noncommercial License 1.0.0.
Free for:
- Personal use
- Research and education
- Non-profit organizations
- Hobby projects
Commercial use requires a separate license. Contact hello@ability.ai for commercial licensing.
See CONTRIBUTING.md for guidelines.
- Issues: GitHub Issues
- Commercial inquiries: hello@ability.ai
Built by Ability AI