Login

Tortoise Documentation

A graph database for agent memory: claims are Points, relationships are edges, and belief scores are computed by propagating evidence through the graph.

What is Tortoise? How it works Quickstart (5 minutes) Connect your agent (MCP) API reference Next steps

What is Tortoise?

Tortoise is a graph database for agent memory. Data is stored as Points (nodes) connected by labeled edges that express how beliefs relate. It keeps the structure of what an agent learned — which claims support which, and which contradict each other — and computes a belief score for every Point by propagating evidence through the graph.

It is used via a REST API or an MCP server (see below). A team gets an isolated graph; all writes carry provenance back to the source session.

How it works

The data model

Everything is a Point: an atomic claim with an id, content (text), pointKind, and a status. The core kind vocabulary (ontology v3.1 §5) is: statement, decision, vision, strategy, plan, goal, target, observation, hypothesis — plus evidence and domain kinds registered by expansion packs.

The hosted API currently accepts a subset: statement, decision, evidence, observation, hypothesis (tracked in issue #7881). The graph and SDK accept the full vocabulary.

A content hash (SHA-256 of content) is stored on every Point; creating the same content twice returns the existing Point (dedup) instead of duplicating.

Edges (operators)

Points are connected by operators. The two epistemic edge types are:

Part/whole edges (composedOf, decomposesInto, contains, wraps) and provenance edges (wasDerivedFrom, aboutSubject, …) also exist and are transferred on supersede.

Confidence (EP)

Each live Point carries a belief score. Tortoise computes it by solving the linear system

(I − λM)g = a

where M is the row-normalized adjacency of IMPL/NAND edges, a is a seed vector (1.0 for resolution-event Points, 0 otherwise), and λ = 0.6 is the propagation dampening. The solution g is each Point's grounding — the steady-state belief given the graph's evidence. Adding a supporting edge raises a Point's score; adding a NAND edge lowers it. Grounding is computed via the SDK (projection.compute_grounding()); the hosted API exposes per-Point confidence values on search/read results.

Sessions & provenance

Agent conversations are captured as Session nodes (with turn counts and metadata). Points created from a session are linked to it, so every insight traces back to the conversation that produced it. Listing sessions and their linked Points is a first-class API operation.

The ontology defines a richer episodic Event model (eventKind, startedAt/endedAt, produces/uses edges). The hosted API currently produces :Session nodes; alignment is tracked in issue #7882.

Search

Search fuses three strategies with RRF (Reciprocal Rank Fusion): full-text search (FTS) on content/title/name, vector similarity (embeddings, when available), and structural matches. Results are ranked by fused relevance, not recency.

Quickstart (5 minutes)

1. Create an account

Sign up at tortoise.premiselabs.co/signup. You'll get an API key on the welcome page — copy it. It's shown once.

2. Write your first Point

curl -X POST https://api.premiselabs.co/v1/points \
  -H "Authorization: Bearer tt_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content": "the production port is 16379", "kind": "statement"}'

Response includes the Point's id.

3. Search

curl "https://api.premiselabs.co/v1/search?q=port" \
  -H "Authorization: Bearer tt_YOUR_KEY"

Returns ranked results (FTS + vector + structural, RRF-fused).

4. Manage in the dashboard

Open app.premiselabs.co, paste your key, and you can create/revoke API keys and view sessions.

Connect your agent (MCP)

The fastest way to give an agent Tortoise memory is the MCP server — no code required. Your agent (Claude Code, Cursor, Claude Desktop, or any MCP client) reads and writes your Tortoise graph automatically.

Setup — hosted (no install)

Add this to your MCP config (replace tt_YOUR_KEY with your API key):

{
  "mcpServers": {
    "tortoise": {
      "type": "streamable-http",
      "url": "https://api.premiselabs.co/mcp",
      "headers": {
        "Authorization": "Bearer tt_YOUR_KEY"
      }
    }
  }
}

Paste into .mcp.json (Claude Code), .cursor/mcp.json (Cursor), or claude_desktop_config.json (Claude Desktop). Restart your client.

The hosted MCP server runs on our infrastructure over Streamable HTTP — no Python or tortoise install needed. Your client just needs network access to https://api.premiselabs.co/mcp.

Setup — self-hosted (stdio)

Running Tortoise on your own infrastructure? Point the MCP client at a local process over stdio instead (see the self-hosted guide):

{
  "mcpServers": {
    "tortoise": {
      "command": "python3",
      "args": ["-m", "tortoise.mcp_server"],
      "env": {
        "TORTOISE_API_KEY": "tt_YOUR_KEY",
        "TORTOISE_API_URL": "https://api.premiselabs.co"
      }
    }
  }
}

Need python3 and tortoise installed where the client runs? pip install tortoise-graph — the MCP server ships with the package.

What your agent can do

Your welcome page includes a ready-to-copy MCP config with your key pre-filled.

API reference

Base URL: https://api.premiselabs.co. All endpoints require Authorization: Bearer tt_<key>.

EndpointMethodPurpose
/v1/teamGETTeam info: tier, limits, point count
/v1/pointsPOSTCreate a Point
/v1/pointsGETList Points
/v1/points/{id}GETGet one Point
/v1/searchGETHybrid search (query param q)
/v1/team/keysGETList API keys
/v1/team/keysPOSTCreate API key (plaintext shown once)
/v1/team/keys/{id}DELETERevoke API key
/v1/sessionsGETList captured sessions
/v1/sessionsPOSTRecord a session
Note: The context field is deprecated (removed from Point metadata). Use kind to classify content.

Next steps