Introduction
Discover the Agentic State Engine — an event-sourced causal graph with branching, decision traces, and realtime sync.
Trellis is an event-sourced, causal graph engine for building stateful, auditable, branchable applications. Use it as version control for code, a runtime for AI agents, or a reactive backend for collaborative apps.
Why Trellis?
Traditional engines and version control treat your state as snapshots or disjointed logs. Trellis treats it as an Agentic State Engine — where everything is a living graph entity with relationships, an immutable history, and full auditability.
| Use Case | How |
|---|---|
| AI agent runtime | Tool registry + decision traces + branching |
| Collaborative app backend | CRDT sync + multi-tenancy + realtime subscriptions |
| Version control for code | Semantic patching + milestones + Idea Garden |
| Auditable data platform | Immutable op log + time travel + governance |
| TrellisDB content apps | Schema-aware collections + references + computed formula fields |
The Five Pillars
Trellis is built on five architectural pillars:
- Causal Stream — A fine-grained, immutable ledger of every semantic change
- Semantic Patching — Understanding code as a tree (AST) rather than lines of text
- Narrative Milestones — Human-curated stories that sit on top of the stream
- Governance Subgraph — Identity and permissions built into the data structure
- Idea Garden — A permanent, searchable archive of all exploration
How It Differs from Git
| Git Concept | Trellis Equivalent |
|---|---|
git add + commit | Automatic — every file change creates ops in real time |
git log | trellis log — causal op stream with content-addressed hashes |
| Tag / release | trellis milestone create — narrative checkpoint |
| Branch | trellis branch — same concept, with CRDT support |
git diff | trellis sdiff — AST-level semantic diff |
git merge | trellis merge — three-way with semantic conflict resolution |
| Stash / abandoned | trellis garden — discovers and revives abandoned work |
| Issues (external) | trellis issue — first-class task tracking |
Key Differences
- No staging area. Ops are created automatically when files change.
- Ops are immutable. They are never rewritten, rebased, or deleted.
- Three-tier ops: File-level (Tier 0), structural (Tier 1), semantic/AST (Tier 2).
- Milestones ≠ commits. A milestone spans a range of ops and carries a narrative message.
- Idea Garden. Automatically detects abandoned work and lets you revive it.
Project Surfaces
Trellis exposes multiple integrated surfaces:
trellisnpm package — all platform APIs through modular subpathstrellisCLI — command-line interface for repository management and automationtrellis/cmsSDK — collection-oriented TrellisDB client for websites and apps- VS Code extension — visual interface for timeline, issues, and knowledge navigation
- MCP server — Model Context Protocol integration for AI agent workflows