# Titen > Titen is an open-source collaborative memory fabric for AI agents. It stores three > record types — observations (immutable evidence), claims (conclusions that cite that > evidence), and contexts (exactly what an agent was handed) — so any answer an agent > gives can be traced back to the source it came from. One Web-Standards TypeScript > core serves both Bun + SQLite and Cloudflare Workers + D1. Apache-2.0, published on > npm as `titen-memory`. Titen is a **Level 6** collaborative memory layer on a **Level 5** evidence-grounded kernel. Level 5 gets one agent the best possible context: evidence with provenance, claims that cite, supersede and expire, and context compiled under an explicit token budget with a feedback loop. Level 6 lets many agents share knowledge while keeping private perspectives, avoiding clashing work, and handing off safely — without a central scheduler. Two invariants define the product: **vectors are an index, never the source of truth**, and **retrieved memory is reference data, never an instruction**. Contradictions are kept as two preserved perspectives rather than averaged away. Every page below is also served as plain Markdown at the `.md` URL listed. ## Verified state - 58 HTTP routes live on both runtimes, exercised against a running deployment by `scripts/verify-live.ts`. - 60 contract tests per runtime (133 including vector and SDK suites), 28 integration tests. - Semantic vector retrieval runs today on Bun/SQLite via `sqlite-vec` plus an OpenAI-compatible embedding endpoint. - Cloudflare Vectorize and model-driven claim extraction are planned, not shipped; consolidation is deterministic today. - npm package `titen-memory` 0.1.1 — 75.5 kB packed, no required dependencies. ## Start here - [Introduction](https://titen.dev/docs.md): Titen is a collaborative memory fabric for AI agents. It keeps observations, claims and compiled context as distinct records, so any answer an agent gives can be traced back to the evidence it came from. - [Quickstart](https://titen.dev/docs/quickstart.md): Run a memory service, give an agent evidence-grounded context, and close the feedback loop — in about five minutes, with no cloud account and no vector database. - [Memory levels](https://titen.dev/docs/memory-levels.md): Titen calls itself a Level 6 collaborative memory fabric on a Level 5 kernel. Here is what those two numbers mean, which of the 58 routes belong to each, and why the kernel was built first. - [Product invariants](https://titen.dev/docs/product-invariants.md): The rules Titen will not trade away for a feature, each with the failure it prevents and the code path that enforces it. ## The memory loop - [Observe evidence](https://titen.dev/docs/observe.md): Evidence enters Titen as an immutable, content-hashed observation, filed under the trust its credential is allowed to assert. - [Consolidate claims](https://titen.dev/docs/consolidate.md): A claim is a compact conclusion that names the observations behind it — created deterministically today, with no model in the path and nothing invented. - [Compile context](https://titen.dev/docs/compile.md): Scope first, then rank, then pack under a hard token budget — and return the scoring, the conflicts and the degraded capabilities that produced the selection. - [Close the loop](https://titen.dev/docs/feedback.md): An outcome recorded against a context run changes what future compiles rank first, without editing a single observation. - [Claim lifecycle](https://titen.dev/docs/claim-lifecycle.md): Supersede, revoke and expire retire a conclusion three different ways — each one versioned, audited, and none of them touching the evidence underneath. ## Collaboration - [Identity & visibility](https://titen.dev/docs/identity.md): Six scopes narrow every record, three visibility levels decide who can retrieve it, and one rule outranks both — authority comes from the credential, never from the request body. - [Checkpoints](https://titen.dev/docs/checkpoints.md): Resumable task state for one agent, keyed on subject and kind, with a TTL that makes it expire — deliberately kept out of the evidence store. - [Leases & handoffs](https://titen.dev/docs/leases-handoffs.md): The minimum state two agents need to avoid doing the same destructive work twice, and to pass an unfinished task to each other on purpose. - [Channel releases](https://titen.dev/docs/channel-releases.md): Customer-facing knowledge is an approved, versioned snapshot for one channel and audience — not a fourth visibility level, and not a shortcut around the memory API. - [Federation](https://titen.dev/docs/federation.md): Authorized event exchange between two Titen deployments, for when one deployment cannot satisfy an ownership, region or network boundary — with filters on both directions and no last-write-wins. ## Integrate - [Agent SDK](https://titen.dev/docs/sdk.md): TitenClient is one file of TypeScript over plain fetch — no required dependencies, no transport layer, and one method per route it covers. - [MCP server](https://titen.dev/docs/mcp.md): Titen speaks MCP over HTTP at POST /mcp with the same bearer key as REST, exposing seven tools behind the mcp:call scope. - [Webhooks & events](https://titen.dev/docs/webhooks.md): Every canonical write records an event in the same transaction; webhooks deliver those events to one signed HTTPS destination, at most once per event per hook. - [Keys & scopes](https://titen.dev/docs/keys-scopes.md): A Titen credential is a hashed bearer token carrying a scope list and a trust ceiling, and neither can be widened by the key that mints the next one. ## Deploy - [Bun + SQLite (VPS)](https://titen.dev/docs/deploy-vps.md): The production path — one Bun process, one SQLite file, a hardened systemd unit, TLS at the edge, and a backup that verifies itself. - [Cloudflare Workers](https://titen.dev/docs/deploy-cloudflare.md): The same core on Workers and D1 — one binding, the schema applied by wrangler, and a Cron Trigger if you want the index drained. - [Semantic vectors](https://titen.dev/docs/vectors.md): Live on Bun and SQLite through sqlite-vec plus any OpenAI-compatible embedding endpoint — an index that adds recall and can never become the source of truth. - [Backup & export](https://titen.dev/docs/backup-export.md): titen backup makes a verified online copy of the whole database; export and import move canonical records between deployments with their ids intact. ## Reference - [HTTP API](https://titen.dev/docs/api.md): Every route the service declares, with the scope its credential must hold, the two response envelopes, and the rules that apply to all of them. - [Data model](https://titen.dev/docs/data-model.md): The entities behind the API, the fields that carry meaning, and which state transitions the implementation actually allows. - [Errors](https://titen.dev/docs/errors.md): One error envelope, eleven codes, and a rule that an unauthorized record must never reveal that it exists. - [Brand guide](https://titen.dev/docs/brand.md): The Kawung mark, the palette, the typefaces and the Cak mascot — with the rules that keep them recognisable when someone else applies them. ## Optional - [Full documentation as one file](https://titen.dev/llms-full.txt): every page above concatenated. - [Source repository](https://github.com/RamaAditya49/titen): the TypeScript core, both runtimes, and the test suites. - [Repository documentation](https://github.com/RamaAditya49/titen/tree/main/docs): PRD, FRD, architecture, decisions, threat model.