# 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 traces 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, on one local SQLite file. - [Memory levels](https://titen.dev/docs/memory-levels.md): What Level 5 and Level 6 mean in Titen, 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. - [Compile context](https://titen.dev/docs/compile.md): Scope first, then rank, then pack under a hard token budget, and return the scores, conflicts and degraded capabilities behind 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 versioned and audited, none of them touching the evidence underneath. ## Collaboration - [Identity & visibility](https://titen.dev/docs/identity.md): Six dimensions narrow every record, three visibility levels decide who can retrieve it, and authority comes from the credential, not the request body. - [Checkpoints](https://titen.dev/docs/checkpoints.md): Resumable task state for one agent, keyed on subject and kind, with a TTL, and 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. - [Channel releases](https://titen.dev/docs/channel-releases.md): Customer-facing knowledge is an approved, versioned snapshot for one channel and audience, published only by an explicit call under the releases:write scope. - [Federation](https://titen.dev/docs/federation.md): Authorized event exchange between two Titen deployments, with filters in 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, with no required dependencies 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: 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): One Bun process, one SQLite file, a hardened systemd unit, 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; the index adds recall and is never 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 and the two response envelopes. - [Data model](https://titen.dev/docs/data-model.md): The entities behind the API, their fields, and which state transitions the implementation 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. ## 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.