How gamurigm/trama-platform works
TRAMA coordinates independent AI-agent projects: users register projects, define requirements, plan phases and tasks, approve work, then track execution, results, and operational status. The Python platform provides the API, durable state, coordination and worker runtime; the terminal UI is a user-facing client. Distributed deployments add a Go admission gateway and outbox. README-documented MCP/Hermes, CCCC, and optional knowledge integrations are preserved, but unsampled implementation details limit their edges; dashed edges indicate documented but unverified wiring.
Main entry points: runtime.py Task runtime · App.tsx Terminal console · client.ts API client · worker.py Python worker
Components 29
User interfaces
- Terminal console
tui/src/App.tsx - API client
tui/src/api/client.ts - Projects view
tui/src/components/ProjectsView.tsx - Planning view
tui/src/components/PlanningView.tsx - Tasks view
tui/src/components/TasksView.tsx - Observability view
tui/src/components/ObservabilityView.tsx - Integrations view
tui/src/components/IntegrationsView.tsx
Platform core
- Platform API
src/trama_platform/api.py - Domain contracts
src/trama_platform/contracts.py - Configuration
src/trama_platform/settings.py - State store
src/trama_platform/state_store.py - Store selection
src/trama_platform/storage.py
Execution and coordination
- Task runtime
src/trama_platform/runtime.py - Dispatch queue
src/trama_platform/queueing.py - Task leases
src/trama_platform/leases.py - Python worker
src/trama_platform/worker.py - Coordination adapter
src/trama_platform/coordination.py
Distributed services
- Admission gateway
gateway/cmd/trama-gateway/main.go - Admission service
gateway/internal/admission/service.go - Admission store
gateway/internal/admission/postgres.go - Outbox worker
gateway/internal/outbox/worker.go - NATS events
gateway/internal/outbox/nats.go - PostgreSQL
Agent and knowledge integrations
- MCP tools
src/trama_platform/mcp_server.py - Hermes agent
src/trama_platform/hermes.py - CCCC execution
src/trama_platform/coordination.py - Knowledge adapters
src/trama_platform/semantica_adapter.py - Utopia MCP
src/trama_platform/utopia_mcp.py
Other components
- Operator
Connections 36
- Operator → Terminal console: operates
- Terminal console → Projects view: renders
tui/src/App.tsx - Terminal console → Planning view: renders
tui/src/App.tsx - Terminal console → Tasks view: renders
tui/src/App.tsx - Terminal console → Observability view: renders
tui/src/App.tsx - Terminal console → Integrations view: renders
tui/src/App.tsx - Projects view → API client: uses API
- Planning view → API client: uses API
- Tasks view → API client: uses API
- Observability view → API client: uses API
- Integrations view → API client: uses API
- API client → Platform API: HTTP requests
- Operator → Platform API: uses API
- Platform API → State store: reads and writes
- Platform API → Task runtime: coordinates work
- Platform API → Domain contracts: uses contracts
- Store selection → Configuration: reads settings
src/trama_platform/storage.py - Store selection → State store: selects backend
src/trama_platform/storage.py - Python worker → Task runtime: runs tasks
src/trama_platform/worker.py - Python worker → Coordination adapter: selects coordination
src/trama_platform/worker.py - Python worker → State store: uses state
src/trama_platform/worker.py - Python worker → Dispatch queue: consumes events
src/trama_platform/worker.py - Task runtime → Dispatch queue: dispatches work
src/trama_platform/runtime.py - Task runtime → Task leases: uses leases
src/trama_platform/runtime.py - Task runtime → State store: persists state
src/trama_platform/runtime.py - Task runtime → Domain contracts: uses contracts
src/trama_platform/runtime.py - Coordination adapter → CCCC execution: bridges tasks
src/trama_platform/coordination.py - Admission gateway → Admission service: routes requests
gateway/cmd/trama-gateway/main.go - Admission gateway → PostgreSQL: opens connection
gateway/cmd/trama-gateway/main.go - Admission service → Admission store: uses store
- Admission store → PostgreSQL: persists admissions
- Outbox worker → NATS events: publishes events
- Operator → MCP tools: uses tools
- Python worker → Hermes agent: supervises agent
- Task runtime → Knowledge adapters: optional memory
- Task runtime → Utopia MCP: optional knowledge