Trellis

AI Context

Your agent has a task. Give it context.

Connect compatible AI tools to the code, knowledge and relationships in Trellis. Follow the evidence from a question back to its sources.

“Before changing this field, find what depends on it.”

Your AI toolThe question you ask
TrellisRead-only MCP tools
Your sourcesCode · documents · data

Source codeTable definitionDesign decision

Illustrative retrieval: inspect the sources in the example below.

From question to source

“Add a preferred name without breaking history.”

Follow one change through its caller, its implementation, the table definition you search for, and the design decision. Each step adds a concrete item to the review.
  1. Find the starting point

    The field has to reach the function.

    The route selects which request fields it passes on. Adding preferredName to the function alone would leave this entry point unchanged.

    Add to the review

    Add preferredName to the request validation and route mapping.

    The caller passes an explicit field list; the new field would otherwise be dropped.

    See the MCP tools for this step
    • kg_code_search
    • kg_callers
    • kg_code_source
    Function src/profile.ts · lines 18–23
    async function updateCustomer(id, patch) {
      const before = await customers.get(id);
      const after = await customers.update(id, patch);
      await recordProfileChange(before, after);
      return after;
    }
    Caller src/routes/profile.ts · lines 31–35
    router.patch('/customers/:id', async (req) => {
      return updateCustomer(req.params.id, {
        displayName: req.body.displayName
      });
    });
  2. Follow the relationships

    The write has a second responsibility.

    The profile update calls a change recorder. Its field list determines what reaches customer_history; search for that table to read its definition.

    Add to the review

    Include preferredName in trackedFields and verify the history record.

    The existing table stores field names and values; inspect the recorder before assuming a new history column is needed.

    See the MCP tools for this step
    • kg_callees
    • kg_code_source
    • kg_sql_catalog
    Change recorder src/history.ts · lines 8–15
    const trackedFields = ['displayName'];
    
    async function recordProfileChange(before, after) {
      for (const field of trackedFields) {
        if (before[field] !== after[field]) {
          await history.insert(after.id, field, before[field], after[field]);
        }
      }
    }
    Database definition db/customer_history.sql · lines 1–7
    CREATE TABLE customer_history (
      customer_id bigint NOT NULL,
      field_name text NOT NULL,
      old_value text,
      new_value text,
      changed_at timestamptz NOT NULL
    );
  3. Inspect the source

    The decision tells you what to preserve.

    The implementation and the design note agree: a saved profile change needs a traceable history. The earlier session points to a test worth keeping.

    Add to the review

    Test both the saved value and its previous/new-value history entry.

    A successful profile update alone would not verify the behavior described in the decision.

    See the MCP tools for this step
    • kg_prose_refs_to_code
    • kg_search
    • kg_code_source
    Design decision Profile change history · “Requirements”
    Every saved profile-field change must retain the
    previous and new value. Customers use this history
    to review what changed in their account.
    
    Implementation reference: src/history.ts
    Imported session Profile history investigation · message 12
    The first fix added the field to the request path,
    but the history test still failed. The recorder
    uses trackedFields. Keep an assertion for both
    the saved profile and the history entry.

Authored examples with synthetic source locations. Expand each source to inspect the evidence.

Illustrative walkthrough, not a live retrieval or generated answer. The checklist is authored for this example. Actual results depend on your sources, resolved relationships and agent workflow.

GraphRAG

One call, the connected answer.

Your agent asks once and gets the documents, code and decisions that answer it, each with its source.

Your workflow, your settings

Connect the tools you already use.

Choose your coding environment. Expand a tool to see how it connects.
  • Claude CodeTrellis setup

    Set up Trellis with the built-in Claude Code configuration. Claude Desktop can also connect as an MCP client.

  • CodexTrellis setup

    Set up Trellis with the built-in Codex configuration for your agent workflow.

  • ZedTrellis setup

    Use the built-in Zed configuration to connect its agent to Trellis.

  • CursorTrellis setup

    Use the built-in Cursor configuration to make read-only graph tools available.

  • WindsurfTrellis setup

    Use the built-in Windsurf configuration.

  • Gemini CLITrellis setup

    Use the built-in Gemini CLI configuration for its MCP client.

  • ClineTrellis setup

    Use the built-in Cline configuration in your coding environment.

  • Trellis setup

    Use the built-in OpenCode configuration.

About these connection labels

Trellis setup means Trellis includes a ready-made configuration for that client. Protocol compatibility is a configuration path, not a claim that every client version has been tested.

Trellis also includes a setup configuration for Continue.

MCPRead-only graph tools for compatible clients
CLIRun Trellis from the command line

Choose your agent

Configure the Trellis MCP connection for a compatible client. Retrieval tools read from your connected graph.

Choose your models

DeepSeek & other providers

Choose a model such as DeepSeek in a client that supports it. Your agent controls that choice; the models Trellis itself uses to process your content are configured separately in Trellis.

Inspect the evidence

Check the original code and documents behind a result. Retrieved context gives you material to evaluate.

Useful context from earlier work

Find the explanation from a previous session.

Import the coding-agent session files or databases you select, from thirteen tools (Aider, Claude Code, Cline, Codex, Copilot sessions, Cursor, Gemini CLI, Hermes Agent, OpenClaw, OpenCode, Pi, Roo Code and Session export), into a private store. Nothing reaches the shared graph until you choose individual items, preview exactly what will be copied, and confirm. Import needs supported private storage on your machine, and is included on every plan: Free includes Claude Code, Codex and Cursor sessions, and the paid plans include every tool.

Then search earlier discussions for attempted fixes, decisions and useful explanations.

Learn from Agent Sessions

Illustrative imported session

“The profile saved. The history was still missing.”

Attempted fix
Added the new field to the request path.
What the investigation found
The history recorder maintained its own tracked-field list.
Useful next time
Check both paths and keep a test for the history entry.

A past session is a lead to verify against current code. Selected imports make that explanation retrievable; they do not make every past conclusion current.

For the people doing the work

AI tools are part of a team’s working day.

Illustrative engineer checking source material beside a colleague.
AI-generated working scene · illustrative

Give a colleague—or an agent—the source material they need to examine a question. The original code, documents and decisions stay part of the conversation.

Try it on your own codebase.

Bring a repository, a few useful documents and the agent workflow you want to improve.