Shared context substrate for AI agents. Retrieval that learns what's useful. Runs local or cloud.
Trellis
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**A memory system for AI agents — personal and shared.** Agents save memories, experiences, and knowledge from flexible sources. Trellis deduplicates and embeds them on ingest for semantic retrieval, builds a cross-agent graph, attributes outcomes back to the **exact context items** that produced them, and tunes retrieval under statistical governance. Multi-backend (SQLite, Postgres + pgvector, ArcadeDB, Neo4j, S3). Four interfaces (CLI, MCP, REST, Python SDK). One install.
Most "agent memory" attributes feedback to a session or a user. Trellis attributes it to the **specific items served** in the pack. That's the seam that lets noise suppression, advisory fitness, and parameter promotion all work from the same signal — and lets multiple agents share a substrate where institutional knowledge compounds instead of evaporating at the end of each session.
Why Trellis vs rolling your own?
A useful cross-agent knowledge layer means assembling, at minimum:
- an **immutable trace store** with schema validation and an audit log
- a **graph store with temporal versioning** (SCD-2) so "what did we know at time T?" is answerable
- a **vector + keyword search** wired into the same query layer
- a **retrieval engine** that combines them, dedupes by item id, and enforces a token budget
- **feedback attribution to the specific items** served (not just the session or the user)
- a **statistical-gating mechanism** so noisy feedback doesn't destroy your weights
- a **governed mutation pipeline** that won't let agents corrupt the graph
- an **MCP server, REST API, Python SDK, and CLI** around all of it
- a **tiered extractor** that graduates from LLM-driven to deterministic as patterns stabilize
- a **plugin contract** so adopters can swap any backend without forking core
Trellis ships all of that as one install. Started from a vector DB plus glue code, the list above is months of yak-shaving — most of which doesn't surface until something breaks.
What Trellis is NOT
- **Not a vector DB.** Vectors are one of six stores. Pluggable behind the same API (SQLite, pgvector, ArcadeDB, Neo4j HNSW).
- **Not a session blob.** Trellis *is* agent memory — personal-agent or cross-agent — but feedback attributes to the *specific items served*, not to a session or user, and multiple agents can share the same substrate.
- **Not a RAG framework.** RAG is one access pattern; Trellis adds attribution, statistical governance, and an audit log around it.
- **Not a managed service.** Self-hosted: local SQLite, or your Postgres / ArcadeDB / Neo4j. One pip install (or one Docker image).
- **Not a prompt library.** Trellis stores *what happened* (traces) and *what was learned* (precedents + advisories) — not what to say.
When *not* to use Trellis
- You're building a single-session chatbot. The overhead is unjustified — prompt engineering is enough.
- You only need vector similarity. A bare vector DB is simpler.
- Your agent has no need to learn from past work. Pure tool-call agents don't benefit.
- You're at **Wiring an external agent system into Trellis?** Start at the one-page
> decision tree:
> docs/getting-started/integrate-your-agent.md.
> For MCP-speaking agents, trellis admin quickstart --with-skills user sets
> up the stores and the drop-in skills, then prints the claude mcp add
> command that registers the MCP server with Claude Code.
> **Setting up for a team, a data platform, or production?** Local single-user
> needs no decisions. Beyond that, a few choices are yours to make and easy to
> miss — domains & ontology, domain ownership, and API security. They're laid
> out as a checklist in
> docs/getting-started/setup-decisions.md.
Architecture at a glance
What's in the substrate
> Every node carries valid_from / valid_to — query any past state with as_of.
- **Traces** — what agents did: steps, tool calls, reasoning, outcomes. Immutable.
- **Entities + edges** — the graph of services, teams, tools, datasets, and how they relate. Temporally versioned.
- **Evidence** — documents and snippets agents read, with URIs to local files or S3.
- **Precedents** — distilled patterns promoted from successful (and failed) traces.