Three minds, one context — Multi-agent AI orchestrator for Claude Code, Codex, and Gemini CLI.
Project description
Trinity Agent
Three minds, one context. Multi-agent AI orchestrator that unifies Claude Code, Codex, and Gemini CLI through shared context, round-based deliberation, and task distribution.
Quick Start
# Install
pip install trinity-agent
# Initialize in your project
trinity init
# Run a deliberation
trinity ask "인증 시스템 아키텍처를 설계해줘"
# Interactive mode (tmux)
trinity ask "질문" --interactive
How It Works
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Claude │ │ Codex │ │ Gemini │
│ (Architect)│ │(Implementer)│ │ (Reviewer) │
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘
│ │ │
└───────────┬───────┴───────────────────┘
│
┌───────┴───────┐
│ Orchestrator │
│ Shared Context│
│ Consensus │
└───────────────┘
- Shared Context — All agents read/write to a shared markdown file
- Round-based Deliberation — Agents discuss in rounds until consensus
- Consensus Detection — Keyword-based agreement detection
- Task Distribution — Assign tasks based on agent strengths
Commands
| Command | Description |
|---|---|
trinity init |
Initialize .trinity/ in current directory |
trinity ask "question" |
Run deliberation on a prompt |
trinity status |
Show agent status |
trinity context |
Display shared context |
trinity config [key] |
Show configuration |
trinity logs |
View orchestrator logs |
trinity reset --keep-context |
Reset session (preserve context) |
trinity attach |
Attach to tmux session |
trinity status-watch |
Live status dashboard |
Configuration
Edit .trinity/trinity.config:
[general]
session_name = "trinity"
max_deliberation_rounds = 5
consensus_threshold = 0.6
[agents.claude]
provider = "claude-code"
cli_command = "claude"
role_prompt = "You are the Architect..."
enabled = true
[agents.codex]
provider = "codex"
cli_command = "codex"
role_prompt = "You are the Implementer..."
enabled = true
[agents.gemini]
provider = "gemini-cli"
cli_command = "gemini"
role_prompt = "You are the Reviewer..."
enabled = true
Architecture
| Module | Description |
|---|---|
trinity.orchestrator |
Top-level coordinator |
trinity.agents |
Provider-specific agent wrappers (Claude, Codex, Gemini) |
trinity.deliberation |
Protocol, consensus, task distribution |
trinity.completion |
Completion detection (Hook, PromptReturn, Idle) |
trinity.context |
Shared context engine, monitor, session rotation |
trinity.health |
Agent health monitoring |
trinity.workspace |
Workspace isolation (git worktree), managed home |
trinity.retry |
Retry with exponential backoff |
trinity.error_handler |
Crash recovery and agent respawn |
Requirements
- Python 3.10+
- Claude Code CLI (optional)
- Codex CLI (optional)
- Gemini CLI (optional)
- tmux (for interactive mode)
Development
git clone https://github.com/hongdangmoo49/Trinity.git
cd Trinity
uv sync
uv run pytest tests/ -v
License
MIT
Project details
Release history Release notifications | RSS feed
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 trinity_agent-0.2.2.tar.gz.
File metadata
- Download URL: trinity_agent-0.2.2.tar.gz
- Upload date:
- Size: 145.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d401d5cb115c9a94becd88019cc08dd5851e23c1a668696a38b82fe7f1056d2a
|
|
| MD5 |
4c87e4c8436c8e400dc18f6ea234ec99
|
|
| BLAKE2b-256 |
2a2f183576ead2b1a542545529708ab85787fb5b6711b70e89e752862d104794
|
File details
Details for the file trinity_agent-0.2.2-py3-none-any.whl.
File metadata
- Download URL: trinity_agent-0.2.2-py3-none-any.whl
- Upload date:
- Size: 76.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01edd0ff5340c2b938ef47ecb73e10590738bb533b5da0060cee8f10cf416f2f
|
|
| MD5 |
11b4a2bc25bd8c59b12b38fb0de64ce0
|
|
| BLAKE2b-256 |
e40d7dac2f1b2dd20d61bd39dc54e763a9c9a79a56954c1018cb914ce7219e7a
|