trinity
Self-hosted AI Agents Platform supporting Claude Code, Codex, Gemini agents. Apache 2.0.
Install / Use
claude mcp add Abilityai -- npx -y github:Abilityai/trinityIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Tags
Skill content
View source on GitHub<p align="center"> <a href="https://youtu.be/fia2qa4YcLg"> <img src="https://img.youtube.com/vi/fia2qa4YcLg/maxresdefault.jpg" alt="Trinity v0.9.0 release review — live workshop video" width="640" /> </a> <br/> <em>🎬 <a href="https://youtu.be/fia2qa4YcLg">Trinity v0.9.0 — release review</a> — a live walkthrough of everything new in v0.9.0, from the "How to Build a Second Brain for Your AI Agents" workshop.</em> </p>[!NOTE] 📦 Just released — v0.9.0 (August 17, 2026): Workspace — the client-facing surface, now in every build — plus fresh-install provisioning (remote template registry, GitHub import wizard, manifest install UI, guided credentials), the multi-source skills library and Library page, bidirectional A2A, dashboard List view + grid data tiles, automatic database backups, and a large reliability & security sweep. Watch the release review → · What's new overview → · Full release notes →
The Sovereign AI Agents Platform
Trinity is a sovereign AI agents platform — build and run proprietary systems, from fully (or semi-) autonomous businesses to self-improving cognitive systems, all governed, auditable, and on infrastructure you control.
Claude Code writes the agent. Trinity runs it in production.
Each agent runs in its own isolated Docker container with real-time observability, fleet-wide scheduling, agent-to-agent delegation, and a tamper-evident audit trail. Self-host it, or run it on any cloud you control.
Open source · Apache 2.0 — free for any use, commercial included, and deploys anywhere you run it · Independently pentested — UnderDefense Grade A · We run Trinity in production ourselves — and so do our customers.
🤖 AI agent reading this repo? Start at AGENTS.md — a task router with exact commands, key facts, and verification steps. Detailed docs index: docs/user-docs/README.md.
[!IMPORTANT] PostgreSQL is the recommended database for production. SQLite stays the zero-config default for local development and evaluation, but production instances should run on PostgreSQL — opt in with a single
DATABASE_URL(setup guide, #300). Already on SQLite? Migrate with the Trinity Ops Agent's/migrate-to-postgresskill — a gated, validate-then-cutover flow that leaves your SQLite file untouched for instant rollback.
Why Trinity?
The problem: Everyone wants autonomous AI agents. But your options are terrible — SaaS platforms where data leaves your security perimeter, custom builds that take 6-12 months, or frameworks that don't handle governance and audit trails.
The solution: Trinity is autonomous agent orchestration infrastructure. Each agent runs in its own isolated Docker container. You get real-time observability, fleet-wide health monitoring, cron-based scheduling, agent-to-agent delegation, and cost tracking — all on your own hardware.
| Option | Problem | Trinity | |--------|---------|---------| | SaaS Platforms | Data leaves your perimeter, vendor lock-in | Your infrastructure, data never leaves | | Build Custom | 6-12 months, $500K+ engineering | Deploy in minutes | | Frameworks | No observability, no fleet management | Real-time monitoring, scheduling, audit trails |
See it move
<!-- TODO (asset): record a 30–60s interface walkthrough (e.g. fleet graph → a schedule firing), drag-drop the .mp4 into a GitHub PR/issue comment to mint a user-attachments URL, then uncomment the <video> block below and delete the interim image + this comment. --> <p align="center"> <a href="https://youtu.be/ivljtZqsxeo"> <img src="docs/assets/trinity-explainer.gif" alt="Trinity in motion — watch the full demo" width="720"/> </a> </p> <!-- <div align="center"> <video src="https://github.com/user-attachments/assets/REPLACE-AFTER-UPLOAD" width="720" controls poster="docs/screenshots/dashboard-grid.png"></video> </div> -->A short teaser of the live interface — the full, zoomable detail is in the screenshots below.
Watch more:
- Trinity v0.9.0 Release Review — everything new in v0.9.0, reviewed live in the "How to Build a Second Brain for Your AI Agents" workshop
- Trinity Demo — full platform walkthrough
- Trinity Architecture Explained — animated explainer (4:44): one scheduled task followed end to end through the container, gate, delegation, approval, audit, and breaker machinery
- Trinity v0.8.0 Release Tour — agents that speak, the Brain Orb, and the Grid dashboard
- From Zero to Deployed AI Agent — your first Trinity agent in 30 minutes
- Plugins + Trinity: Build and Deploy Agents in Cursor — the plugin workflow end-to-end
- Loops Engineering with Trinity — bounded autonomous work loops in practice
- The Multi-Agent Platform I Run My Company On — live fleet tour: delegation, memory, observability
- Autonomous Cornelius on Trinity — a real second-brain agent running autonomously (Cornelius on GitHub)
More recordings — agent dev pipelines, GitHub-backed agents, an ops agent that deploys other agents — in the workshop archive. Live and free, every Thursday.
Up and running in minutes, not months
| | | |---|---| | 01 · Deploy an instance | Self-host with one command, or run a managed instance on any cloud you control. | | 02 · Connect Claude Code | Install the abilities plugins — scaffold, connect, and deploy agents over MCP. | | 03 · Run in production | Scheduled, multi-user, audited — inside your own perimeter. |
Quick Start
Two phases: stand up an instance (Phase A), then build and deploy agents to it from Claude Code (Phase B).
Phase A — Stand up a Trinity instance
Prerequisites
- Docker and Docker Compose v2+
- Anthropic API key (for Claude-powered agents) OR Google API key (for Gemini-powered agents)
Recommended: let your agent install it (one shot)
Tell your Claude (or any capable coding agent) to install Trinity and follow the agent-facing runbook — it verifies Docker, installs unattended, confirms the stack is serving, surfaces the generated admin password, and hands you a next-steps card:
Install Trinity on my computer. Follow the runbook at
https://raw.githubusercontent.com/abilityai/trinity/main/docs/AGENT_INSTALL_GUIDE.md
The runbook (docs/AGENT_INSTALL_GUIDE.md) is a
deterministic verify → install → confirm → report-next-steps loop that any
capable agent can execute and explain to you as it goes.
Install it yourself
# 1. Clone the repository
git clone https://github.com/abilityai/trinity.git
cd trinity
# 2. Configure environment
cp .env.example .env
# Edit .env and set ADMIN_PASSWORD (12+ characters) — the only required edit.
# start.sh generates SECRET_KEY, the encryption keys and the Redis
# passwords for you on first run.
# 3. Build the base agent image
./scripts/deploy/build-base-image.sh
# 4. Start all services
./scripts/deploy/start.sh
For a fully non-interactive bring-up, run ./scripts/deploy/start.sh --unattended (or set TRINITY_UNATTENDED=1) and skip the .env edit entirely — an admin password is generated and printed in the final summary.
Note: the repo's git submodules are private and optional — cloning (even with
--recurse-submodules) needs no credentials; they're skipped automatically. See docs/ENTERPRISE.md.
First-time setup
- Open http://localhost — you'll be redirected to the setup wizard
- Enter your admin email — this becomes your sign-in identity — and an admin password (minimum 12 characters, with upper- and lowercase, a digit, and a special character)
- Log in with that email (or the username
admin) and your password - Go to Settings → Integrations → API Keys to configure your Anthropic API key
Access
- Web UI: http://localhost
- API Docs: http://localhost:8000/docs
- MCP Server: http://localhost:8080/mcp
Don't want to self-host? Trinity also runs as a managed instance on any cloud you control. Talk to an engineer → — an engineer reads this, not a CRM. Reply in one business day, your time zone.
Deploying to a remote server?
/trinity:deploy-new-instancefrom the abilities marketplace provisions Trinity on any server you can SSH into — and scaffolds the Trinity Ops Agent to manage it (health, logs, updates, rollback, and SQLite→PostgreSQL migration).
Phase B — Build & deploy agents from Claude Code
Most of the Trinity workflow lives in the abilities plugin marketplace — Claude Code plugins covering the full agent lifecycle: scaffold, develop, deploy, iterate. You need the instance from Phase A (localhost or remote) and Claude Code.
# 1. Add the marketplace and install the core plugins (one-time)
/plugin marketplace add abilityai/abilities
/plugin install trinity@abilityai
/plugin install create-agent@abilityai
# 2. Connect to your Trinity instance (one-time)
/trinity:connect
# → Instance URL + email verification code
# → MCP API key auto-provisioned, .mcp.json written
# 3. Scaffold an agent — or start from any existing Claude Code agent directory
/create-agent:create
# → Pick a wizard (prospector, chief-of-staff, recon, ghostwriter, kb-agent, …)
# or /create-agent:custom for a blank canvas
# 4. Deploy it to Trinity
/trinity:onboard
# → Compatibility check, creates the Trinity files, deploys + starts the container
# 5. Operate and iterate
/trinity:sync # push/pull changes between local and remote
/trinity:loop @my-agent "work the backlog" 10 times # bounded server-side task loops
/trinity:create-dashboard # scaffold a metrics dashboard for the agent
Once con
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
93.3kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Understand-Anything
81.6kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
Agent-Reach
78.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ruflo
70.6k🌊 The original agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
