Skip to main content
Glama
README.md
<p align="center">
  <picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/dark/hero.webp"><img src="docs/assets/hero.webp" alt="Tulvin. Architecture is recollection. A self-hosted AI operating system with a memory that works like one." width="100%"></picture>
</p>

<div align="center">

[![CI](https://img.shields.io/github/actions/workflow/status/Claudiusvs/Tulvin/ci.yml?branch=main&style=flat&labelColor=0b1626&color=55d5ec&label=CI)](https://github.com/Claudiusvs/Tulvin/actions/workflows/ci.yml)
[![Tests](https://img.shields.io/badge/tests-935_passing-55d5ec?style=flat&labelColor=0b1626)](#engineering)
[![MCP tools](https://img.shields.io/badge/MCP_tools-66-55d5ec?style=flat&labelColor=0b1626)](#connectome)
[![License](https://img.shields.io/badge/license-Apache_2.0-99ebff?style=flat&labelColor=0b1626)](./LICENSE)
[![TypeScript](https://img.shields.io/badge/TypeScript-0b1626?style=flat&logo=typescript&logoColor=55d5ec)](https://www.typescriptlang.org/)
[![Bun](https://img.shields.io/badge/Bun-0b1626?style=flat&logo=bun&logoColor=55d5ec)](https://bun.sh)
[![MCP](https://img.shields.io/badge/Model_Context_Protocol-0b1626?style=flat&logo=modelcontextprotocol&logoColor=55d5ec)](https://modelcontextprotocol.io)
[![Built on Claude](https://img.shields.io/badge/Built_on-Claude-0b1626?style=flat&logo=anthropic&logoColor=55d5ec)](https://claude.com/claude-code)

*Your memory, architected. Recalled in full, and yours alone.*

**[What it does](#what-it-does)** · **[How it fits together](#how-it-fits-together)** · **[Connectome](#connectome)** · **[Quickstart](#quickstart)** · **[Make it yours](#make-it-yours)** · **[Engineering](#engineering)** · **[FAQ](#faq)**

</div>

<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/dark/intro.png"><img src="docs/assets/intro.png" alt="Tulvin is a self-hosted operating system for personal AI agents: a team of Claude agents that works for you around the clock, one you talk to, one that works overnight, and specialists for research, engineering, communications and writing. They share a long-term memory, Connectome, and a written model of who you are and what you are working toward, Soma. Status: released piece by piece. The memory engine, identity layer, agent roles and skills are here and runnable today; the always-on harnesses follow." width="100%"></picture></p>

<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/dark/stats.png"><img src="docs/assets/stats.png" alt="935 tests passing. 0 failures on every push. 66 MCP memory tools. 6 agent roles. 5 memory systems." width="100%"></picture></p>

## What it does

<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/dark/capabilities.png"><img src="docs/assets/capabilities.png" alt="Remembers like a mind: five memory types that decay, consolidate and compete during recall. Knows who it works for: Soma holds your mission, goals and working style, written for agents to read at the start of a session. A team, not a chatbot: an orchestrator delegates to specialists, each with a role, a model and boundaries. Works while you sleep (coming): scheduled stations scan, check and maintain overnight, then leave a morning brief. Speaks MCP: 66 memory tools for Claude Code, Claude Desktop or any MCP client. Yours, end to end: self-hosted, local embeddings, your data on your disk, nothing personal baked in." width="100%"></picture></p>

## How it fits together

<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/dark/architecture.png"><img src="docs/assets/architecture.png" alt="Architecture. You talk to the interactive harness. An autonomous harness runs scheduled stations overnight. Both harnesses are coming to this repository next. Both recall and store through the Connectome MCP server (66 tools, bearer auth), which routes to retrieval (hybrid, graph, decay, rerank) and storage (SQLite with sqlite-vec for engrams, full-text search and vectors; Kùzu for the knowledge graph). Transitions consolidate, automatize and surface memories; local Ollama embeddings feed storage. Soma, the identity layer, is loaded into both harnesses at session start." width="100%"></picture></p>

<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/dark/repo.png"><img src="docs/assets/repo.png" alt="In this repository, and what is next. Here now: Connectome, the memory engine (packages/connectome); folder ingest, to import a folder of markdown notes once or keep it in sync (connectome/ingest); plugin seams, five extension points (connectome/plugin); Soma, the identity layer: blank templates loaded by a session-start hook (packages/soma); six agent roles and the recall, remember and document-session skills (agents/, skills/). Next: the always-on interactive and autonomous harnesses. Designed: a Claude Code plugin marketplace for one-command install. Planned: a reproducible head-to-head on LongMemEval against other memory systems." width="100%"></picture></p>

## Connectome

<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/dark/memory.png"><img src="docs/assets/memory.png" alt="Five memory systems, not one vector store. Episodic: what happened, and when (Tulving, 1972). Semantic: what is true, as subject, predicate and object, versioned in time. Working: what matters now (Baddeley). Implicit: how you like it done. Prospective: what to do later, surfaced when its cue appears." width="100%"></picture></p>

<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/dark/mechanisms.png"><img src="docs/assets/mechanisms.png" alt="Mechanisms, implemented. Forgetting curves (retrieval/decay.ts). Spaced review with SM-2, FSRS or Leitner (retrieval/spacing.ts). Retrieval-induced forgetting (retrieval/forgetting.ts). Pattern separation: a near-duplicate write is linked to the existing memory as a new version (storage/index.ts). Consolidation of related events into lasting facts (transitions/consolidation.ts). Reconsolidation: revisions become new linked versions (retrieval/reconsolidation.ts). Facts with a timeline (connectome_semantic_valid_at). Hybrid recall: keyword and vector search fused, widened through the graph, optionally reranked (retrieval/engine.ts). Hubs and a memory map (integration/, cognitive_map/)." width="100%"></picture></p>

## Quickstart

**With Docker** (memory server plus local models):

```bash
git clone https://github.com/Claudiusvs/Tulvin.git && cd Tulvin
cp .env.example .env      # set CONNECTOME_MCP_TOKEN, e.g. with: openssl rand -hex 32
docker compose up -d      # first run pulls bge-m3 and qwen3:8b (~6 GB)
```

**From source** (needs [Bun](https://bun.sh) ≥ 1.3 and [Ollama](https://ollama.com)):

```bash
git clone https://github.com/Claudiusvs/Tulvin.git && cd Tulvin
bun install && bun run test       # 935 tests, about 20 s, no Ollama needed
ollama pull bge-m3 && ollama pull qwen3:8b
cp .env.example .env              # set CONNECTOME_MCP_TOKEN
bun run connectome:start          # serves http://127.0.0.1:8766/mcp
```

**Connect Claude Code**, then add the agent roles and memory skills:

```bash
set -a; . ./.env; set +a          # load the token into this shell
claude mcp add --transport http --scope user connectome http://127.0.0.1:8766/mcp \
  --header "Authorization: Bearer $CONNECTOME_MCP_TOKEN"
mkdir -p ~/.claude/agents ~/.claude/skills
cp agents/*.md ~/.claude/agents/ && cp -R skills/* ~/.claude/skills/
```

**Give it your identity** (optional): copy the blank templates, fill them in, and have every session load them:

```bash
mkdir -p ~/.tulvin && cp -R templates/soma ~/.tulvin/soma   # then edit the files
```

Add this to `~/.claude/settings.json`, using the absolute path to your clone:

```json
{
  "hooks": {
    "SessionStart": [
      { "hooks": [{ "type": "command", "command": "bun /path/to/Tulvin/packages/soma/session-start.ts" }] }
    ]
  }
}
```

Try it: tell Claude *"remember that we chose Postgres for billing because we need transactions"*, then in a new session ask *"what database did we pick for billing, and why?"*

Prefer to let Claude do the setup? Paste this into Claude Code:

```text
Clone https://github.com/Claudiusvs/Tulvin, follow its README Quickstart with Docker, and connect it to Claude Code.
```

## Make it yours

<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/dark/make-it-yours.png"><img src="docs/assets/make-it-yours.png" alt="Make it yours. Tulvin ships with no names and no personal data. Identity: copy templates/soma/ somewhere private and write your mission, goals and working style; it never goes in the repository. Team: the six roles in agents/ are defined by function; rename them, give them a voice, change their models. Knowledge graph: register your own node and edge kinds; extraction/research-schema.ts is a worked example." width="100%"></picture></p>

## Engineering

<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/dark/engineering.png"><img src="docs/assets/engineering.png" alt="Engineering: built to run unattended. Measured: 935 tests, each file in its own process, about 20 seconds; every push runs the tests and builds the Docker image; recall evaluation with Recall@K, nDCG and MRR, so a retrieval change is measured, not assumed. Hardened: a plugin that throws is skipped and a per-file circuit breaker caps ingest retries; the server refuses to start without a real token and listens on localhost only; Bun is pinned to 1.3.13 with a frozen lockfile, in CI and in the Docker image." width="100%"></picture></p>

## FAQ

<details>
<summary><b>Is Connectome just a vector database?</b></summary>

No. It uses vectors (sqlite-vec) for similarity, but recall also weighs memory type, decay, keyword matches and the knowledge graph. The store also changes as it is used: a contradicted fact is superseded when the new one is written, and recalling one memory weakens its close competitors. Slower processes, such as consolidating related events into facts and applying decay, run when an agent or a scheduled job calls the maintenance tools.
</details>

<details>
<summary><b>Does my data leave my machine?</b></summary>

Not by default. Storage, embeddings and consolidation all run locally (SQLite, Kùzu, Ollama). Using the Claude API for consolidation is opt-in (`CONNECTOME_LLM_PROVIDER=claude` with an `ANTHROPIC_API_KEY`). The agents themselves run on Claude, so anything you say to them goes to Anthropic.
</details>

<details>
<summary><b>Can I use only the memory engine?</b></summary>

Yes. Connectome is a standalone MCP server that any MCP client can use. The agent roles and skills are optional.
</details>

<details>
<summary><b>What does it need?</b></summary>

Docker, or Bun ≥ 1.3 with Ollama: `bge-m3` for embeddings and `qwen3:8b` for consolidation and graph extraction (or the Claude API instead, with an `ANTHROPIC_API_KEY`). Claude Code for the agents, skills and identity hook.
</details>

<br>

<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="docs/assets/dark/footer.png"><img src="docs/assets/footer.png" alt="Tulvin. The seahorse is for the hippocampus, named for its shape: the brain region that encodes new episodic memories. Apache-2.0, © 2026 Claudius von Schröder." width="100%"></picture></p>

<p align="center"><sub><a href="./LICENSE">Apache-2.0</a> · <a href="./NOTICE">NOTICE</a></sub></p>