The graph engine for AI agents

One graph for everything.

Trellis is an open substrate, query language, and protocol for machine-readable knowledge.

$npx trellis studio

Opens Trellis Studio in your browser. Local-first by default.

The problem

Modern software is full of vines.

Code grows fast, branches in every direction, and would happily eat a hard drive if you let it. It doesn't hold its own shape. What keeps it standing is the structure around it: a filesystem, version control, a build pipeline.

Project history is a vine too. Every change has a reason. Most of those reasons live in PR comments, Slack threads, or somebody's memory. Pick any line of code in a six-month-old codebase and ask why it's there. Most of the time, the answer is on the dirt. Eaten.

AI agents are the newest vine, and the fastest-growing. They generate code, make decisions, take actions. Almost none of that reasoning survives the session. RAG-over-chat-history is what happens when you try to grow a vine across the dirt and pretend it's a garden.

The substrate

Trellis is a structural grid for the things that grow but can't hold their own weight.

Technically: a local-first, AI-native graph engine. Code lives in the graph as entities. Every change is an op: immutable, content-addressed, causally chained. Every decision (human or AI) is a record with a reason. History is a query, not a scroll. The whole thing lives in a .trellis/ folder you can back up with cp -r.

The substrate doesn't care whether the vine is code or notes or agent reasoning. It just holds it up.

Studio

One workspace. Six surfaces over one graph.

The engine runs by itself. The Studio is where you tend the vines. Six tools that used to live in five different apps, on the same substrate.

Graph view

Graph view

Entities, ops, and links as a living graph. Click to inspect anything.

Code editor

Code editor

Code entities in a tree. Every change becomes a causal step in the op stream.

History and diffing

History and diffing

View history as a graph, with semantic diffing that understands structure, not lines.

Embedded agents

Agents run inside the workspace. Every tool call is an op, not a chat log.

Decision traces

Decision traces

Capture the why behind every change. Search precedent across past runs.

Issues and milestones

Issues and milestones

Task tracking in the same graph as the code it ships with.

Architecture

How the trellis is built

Three parts. Each does one job. Together they let one graph hold code, reasoning, and history in the same shape.

Part 1

The Graph Engine

Trellis is an EAV store (entities, attributes, values) plus a link index. Files, decisions, issues, and agent runs are all entities with stable IDs.

A fact

{ e: "decision:DEC-42", a: "rationale", v: "SEV-1 precedent + finance exception" }

A link

{ e1: "decision:DEC-42", a: "affects", e2: "file:src/auth/session.ts" }

Mutations produce immutable ops, content-addressed and causally chained. Reading the history of a file isn't git log. It's a graph query: what decisions affected this file, made by which agents, against what alternatives?

Trellis graph engine architecture

Part 2

The Agent Harness

When an agent runs inside the Studio, every tool call emits an op. The chat is the user-facing surface; the op log is the durable record. Asking why did the agent do that? becomes a graph traversal, not an archaeological dig through scrollback.

This is the part that breaks the "RAG over chat history" pattern. The agent doesn't have to remember its reasoning by searching its own logs. The reasoning is structured data in the same graph as the code it changed. Two composable steps from question to answer. No hallucination. No black box.

Part 3

The Filesystem

The whole engine fits in a .trellis/ folder. SQLite for kernel state, JSON for entity collections, content-addressed blobs for ops. The filesystem is the source of truth; the graph is a materialized view, rebuilt on startup.

Backup is cp -r. Sync is optional. There's a server you can run for collaboration, but it's the second-best mode. The first-best mode is your machine.

Agent memory

One graph the agent can query and the human can read.

The biggest unsolved problem in AI tooling right now is memory: not the model's context window, but durable structure an agent can return to in a week and act on. Every team building AI products is hitting the same wall. Their agents are brilliant in the moment and amnesiac five minutes later.

The current answers are all RAG over the agent's own output. Store the chat log, embed it, retrieve relevant fragments. This works for vibes-level recall. It fails the moment you need anything causal: which decisions affected the auth subsystem last quarter and were later reversed? That's a graph query, not a similarity search.

The way through is a structure that's legible to both the agent and you. If those are different systems, they desync. If they're the same graph, the agent's reasoning is in the same shape as the codebase it's modifying. One garden, two gardeners.

Get started

Try it out

No account. No cloud. No signup. Your project, your machine, your data.

Requires Node 18+ and git.