trinity-agent 0.3.0

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    │
           └───────────────┘
  1. Shared Context — All agents read/write to a shared markdown file
  2. Round-based Deliberation — Agents discuss in rounds until consensus
  3. Consensus Detection — Keyword-based agreement detection
  4. Task Distribution — Assign tasks based on agent strengths

Commands

CommandDescription
trinity initInitialize .trinity/ in current directory
trinity ask "question"Run deliberation on a prompt
trinity statusShow agent status
trinity contextDisplay shared context
trinity config [key]Show configuration
trinity logsView orchestrator logs
trinity reset --keep-contextReset session (preserve context)
trinity attachAttach to tmux session
trinity status-watchLive 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

ModuleDescription
trinity.orchestratorTop-level coordinator
trinity.agentsProvider-specific agent wrappers (Claude, Codex, Gemini)
trinity.deliberationProtocol, consensus, task distribution
trinity.completionCompletion detection (Hook, PromptReturn, Idle)
trinity.contextShared context engine, monitor, session rotation
trinity.healthAgent health monitoring
trinity.workspaceWorkspace isolation (git worktree), managed home
trinity.retryRetry with exponential backoff
trinity.error_handlerCrash recovery and agent respawn

Requirements

Development

git clone https://github.com/hongdangmoo49/Trinity.git
cd Trinity
uv sync
uv run pytest tests/ -v

License

MIT

Hello friends, my name is Sohit Arya. I share information about upcoming trends and developments in various fields such as Technology, Automobiles, Movie Reviews, and News. My content helps people stay informed, and I receive immense support from my readers. I have been working on various websites for the past five years, and recently, I launched my own website, on which I have been actively working for the last two years.

Sharing Is Caring:

Leave a Comment