Source:
docs/manual/architecture.mdThis page is generated by
site/scripts/sync-manual-docs.mjs.
Architecture
Cruvero is structured around Temporal workflows and deterministic workflow code. All nondeterministic I/O (LLM calls, tools, storage, events) runs in activities.
System Diagram
Runtime Components
- Temporal cluster: source of truth for workflow state and orchestration.
- Worker process: executes all workflow activities and integration I/O.
- Postgres: primary durable store for registry, memory, traces, audit, quotas, and tenancy metadata.
- Dragonfly: optional fast KV and counter store.
- Qdrant/pgvector: embedding vector storage for semantic retrieval/search paths.
- NATS JetStream: event transport for runtime signals, MCP discovery, and buffered async pipelines.
Core Workflows
- Agent workflow:
internal/agent/workflow.go - Graph workflow:
internal/graph/workflow.go - Supervisor workflow:
internal/supervisor/workflow.go
Data Flow
- A client starts a run via API/CLI into Temporal.
- Worker loads immutable tool registry and memory context.
- LLM decision is produced through configured provider/failover chain.
- Tool execution routes through built-in, MCP, or composite tools.
- Semantic retrieval/indexing uses Qdrant or pgvector.
- Runtime/audit/discovery events are published/consumed via NATS when enabled.
- Observations, traces, and audit records persist to Postgres.
- Quota and tenant policy checks gate continued execution.
Design Guarantees
- Workflow determinism: no side effects in workflow code.
- Immutable registries: content-hashed tool versions for replay integrity.
- Tenant isolation: namespace separation + Postgres RLS boundaries.
- Audit integrity: hash-chained audit records per tenant.
- Degraded-mode operation: event/vector backends can fall back based on config.