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 CaseHow
AI agent runtimeTool registry + decision traces + branching
Collaborative app backendCRDT sync + multi-tenancy + realtime subscriptions
Version control for codeSemantic patching + milestones + Idea Garden
Auditable data platformImmutable op log + time travel + governance
TrellisDB content appsSchema-aware collections + references + computed formula fields

The Five Pillars

Trellis is built on five architectural pillars:

  1. Causal Stream — A fine-grained, immutable ledger of every semantic change
  2. Semantic Patching — Understanding code as a tree (AST) rather than lines of text
  3. Narrative Milestones — Human-curated stories that sit on top of the stream
  4. Governance Subgraph — Identity and permissions built into the data structure
  5. Idea Garden — A permanent, searchable archive of all exploration

How It Differs from Git

Git ConceptTrellis Equivalent
git add + commitAutomatic — every file change creates ops in real time
git logtrellis log — causal op stream with content-addressed hashes
Tag / releasetrellis milestone create — narrative checkpoint
Branchtrellis branch — same concept, with CRDT support
git difftrellis sdiff — AST-level semantic diff
git mergetrellis merge — three-way with semantic conflict resolution
Stash / abandonedtrellis 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:

  • trellis npm package — all platform APIs through modular subpaths
  • trellis CLI — command-line interface for repository management and automation
  • trellis/cms SDK — 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