Trinity runs your agents 24/7 with scheduling, monitoring, and multi-agent coordination. Choose cloud-hosted for simplicity or self-hosted for complete control.
📺 Watch: I Built a DevOps Agent That Deploys Other Agents (Apr 2026) · Control My DGX Spark From Anywhere (Jan 2026) · all videos
| Cloud Hosted (ability.ai) | Self Hosted | |
|---|---|---|
| Infrastructure | Zero to manage | You manage |
| Setup time | 30 seconds | 10-15 minutes |
| Data location | ability.ai servers | Your perimeter |
| Pricing | Pay-per-agent | Free forever |
| Best for | Teams focused on building | Enterprises with compliance requirements |
Sign up at ability.ai.
After signup, go to Settings > API Keys and copy your MCP server URL.
/trinity:connectThe skill asks for your connection URL and saves it to your config.
/trinity:onboardDone. Your agent is now running on ability.ai.
Tip: the local install can run one-shot with
./scripts/deploy/start.sh --unattended(auto-generates and prints the admin password), or be driven end to end by an AI coding agent via the runbook atdocs/AGENT_INSTALL_GUIDE.md.
- Docker Desktop (or Docker + Docker Compose)
- Git
- 8GB RAM minimum
- Modern web browser
git clone https://github.com/abilityai/trinity.git
cd trinitycp .env.example .envFour variables are security-critical and must be set before first boot:
| Variable | How to set |
|---|---|
SECRET_KEY |
openssl rand -hex 32 |
INTERNAL_API_SECRET |
openssl rand -hex 32 |
CREDENTIAL_ENCRYPTION_KEY |
Auto-generated on first start if blank. Once set, do not change — encrypted credentials become unrecoverable. |
ADMIN_PASSWORD |
Choose a strong password (minimum 12 characters). This is the password you use to log in as admin. |
Port conflicts: The frontend binds :80 by default. If another process already holds :80, add FRONTEND_PORT=8090 (or any free port) to .env.
./scripts/deploy/build-base-image.shThis builds trinity-agent-base:latest — the Docker image every agent container inherits. This step is required before you can create any agents. It takes 5-10 minutes on first run.
start.shwill detect a missing base image and build it automatically. You can skip this step if you prefer.
./scripts/deploy/start.shStarts all platform services (backend, frontend, MCP server, Redis, scheduler, Vector). If CREDENTIAL_ENCRYPTION_KEY was blank, the script generates it and writes it back to .env.
Open http://localhost (or http://localhost:$FRONTEND_PORT if you remapped) and log in with admin + the password you set in .env.
Create an MCP API key first:
- Log in to the web UI
- Go to Settings → Platform API Keys
- Create a new key and copy it
Then connect:
/trinity:connect
# When prompted, enter:
# URL: http://localhost:8080/mcp
# API Key: (your MCP API key from Settings → Platform API Keys)Alternatively, for email-verified login: when prompted, enter your email and follow the verification code flow.
/trinity:onboard| Service | URL |
|---|---|
| Web UI | http://localhost |
| Backend API docs | http://localhost:8000/docs |
| MCP Server | http://localhost:8080/mcp |
# Stop all services (preserves agent containers)
docker compose stop
# Start all services
./scripts/deploy/start.sh
# View backend logs
docker compose logs -f backend
# Rebuild platform services after code changes
docker compose build --no-cache backend frontend mcp-serverDo not use
docker compose downto stop a running instance — it destroys agent containers and the agent network. Usedocker compose stopinstead.
# 1. Back up the database first
docker run --rm -v trinity_trinity-data:/data -v $(pwd):/backup alpine \
cp /data/trinity.db /backup/trinity.db.backup-$(date +%Y%m%d)
# 2. Pull latest changes
git pull origin main
# 3. Rebuild platform services (NOT the base image — separate step)
docker compose build --no-cache backend frontend mcp-server
# 4. Restart platform services
docker compose restart backend frontend mcp-server scheduler
# 5. Verify health
./scripts/deploy/verify-platform.shTo roll back: restore the DB backup → git checkout <previous-sha> → rebuild → restart.
Run after any change to confirm all six services are healthy:
./scripts/deploy/verify-platform.shOr check manually:
| Probe | Command |
|---|---|
| Backend | curl -sf http://localhost:8000/health |
| Scheduler | curl -sf http://localhost:8001/health |
| Frontend | curl -sf http://localhost |
| Redis | docker exec trinity-redis redis-cli ping |
| MCP Server | curl -sf http://localhost:8080/health |
| Vector | curl -sf http://localhost:8686/health |
Monitor these metrics to catch problems before they cascade:
| Metric | Warning | Critical | Action |
|---|---|---|---|
| Agent context usage | >70% | >90% | Restart the agent |
| Host CPU | >70% | >90% | Scale down active agents |
| Host memory | >80% | >95% | Restart idle agents |
| Disk usage | >70% | >85% | Archive or prune logs |
| Container restarts | >3/hour | >10/hour | Check logs for crash loop |
| DB size | >500 MB | >1 GB | Run log archival |
Agent stuck at >90% context → Restart the agent container:
docker restart <agent-container-name>"network not found" error when starting an agent → Backend lost track of the agent network:
docker rm <agent-container-name>
docker restart trinity-backendDatabase locked → Multiple writers contending. Check for duplicate backend processes:
docker ps | grep trinity-backendThere should be exactly one.
Daily backup (run via cron or manually before upgrades):
docker run --rm -v trinity_trinity-data:/data -v /your/backup/path:/backup alpine \
sh -c "cp /data/trinity.db /backup/trinity-$(date +%Y%m%d-%H%M%S).db"Retain 14 daily backups. The DB contains agent state, schedules, chat history, and credentials metadata.
Once Trinity is running — locally or on a server — the trinity-ops-public repo gives you a Claude Code ops agent for day-to-day operations.
git clone https://github.com/abilityai/trinity-ops-public.git
cd trinity-ops-public
cp .env.example .env
# Set SSH_HOST (leave blank if Trinity runs on this machine)
claude # launch the ops agent| Skill | What it does |
|---|---|
/status |
Health check — backend, containers, Redis, version |
/logs <service> |
View logs for any service or agent |
/restart [service|all] |
Restart services with health verification |
/update |
Pull latest, rebuild, restart, verify |
/diagnose |
Full error scan — logs, restarts, disk, DB integrity |
/rollback |
Rollback to previous commit + optional DB restore |
/cleanup |
Prune Docker images, build cache, old backups |
Provisioning guides (for new server setup): Hetzner, GCP, AWS, DigitalOcean, and localhost — all in provision/.
Step-by-step guides for each deployment scenario:
| Guide | What it covers |
|---|---|
| Local Development | Docker Desktop, dev compose, hot reload, auto-generated secrets |
| Single Server | Linux VPS, prod compose, all required env vars, Redis dual-password setup |
| Public Access | Cloudflare Tunnel, webhook surface, Slack/Telegram/WhatsApp integrations |
| Upgrading | Pre-flight → backup → rebuild → restart → verify → rollback |
| Backup and Restore | SQLite backup pattern, daily cron, restore procedure |
| Monitoring | Six-probe health check, resource thresholds, recovery patterns |
| Ops Agent | Automated day-to-day operations via trinity-ops-public |
- Building Agents — Create and deploy with Claude Code + abilities
- Using Trinity — Dashboard, agent management, monitoring
- Quick Start — 5-minute agent creation
- Trinity CLI — Command-line deployment
- trinity-ops-public — Ops agent for managing instances