Projections
The Markdown files are the record. A projection feeds them into a store that can answer questions: a keyword index, a graph, a vector memory. Each is disposable, and rebuilt from the files whenever you like.
docket sync and docket watch push every change into each adapter instance with the projection role. docket search, docket ask, docket open and the MCP server
ask each instance with the query role, and show every adapter's answer side by side, with its evidence.
| Adapter | For | Needs |
|---|---|---|
| jsonl | The default keyword index, in the repository | Nothing |
| Neo4j | A graph: paths, owners, dependencies, counts | A Neo4j server and neo4j-driver |
| mem0 | Semantic memory, hosted or on your own vector store such as Qdrant | mem0 and mem0ai |
| cognee | Semantic chunks and a model-built knowledge graph | A cognee 1.6.8 server |
| memvid | A single-file BM25 memory | The memvid CLI and a docket checkout |
| MemPalace | A local semantic palace | MemPalace and a docket checkout |
| Docket Cloud | A team workspace's answers, beside your own | A Cloud workspace |
| Postgres | A server's own store | Coming soon |
jsonl, Neo4j, mem0, cognee and Cloud come with the @chrisjowen/docket package. Neo4j and mem0 load an optional
driver you install beside docket.
Configuring adapters
.docket.yaml lists adapter instances. An instance's id is separate from its module, so one package can
serve several instances, such as two Neo4j databases. Everything under config belongs to the adapter, which refuses
a field it does not know.
version: 2
adapters:
- id: local # unique; names the instance in answers and errors
module: "@docket/adapter-jsonl" # a package, or ./a/file.mjs relative to .docket.yaml
roles: [projection, query] # default: both
config: # the adapter's own settings
output: .docket/.index
- id: graph
module: "@docket/adapter-neo4j"
roles: [query] # asked questions, never synced into
config:
uri: neo4j+s://graph.example.com
passwordEnv: DOCKET_GRAPH_PASSWORD # the variable's name, never its value
query:
defaultAdapters: [local, graph] # default: every adapter with the query role
timeoutMs: 30000
maxConcurrentAdapters: 3
synthesis: trueSecrets never go in the file. An adapter takes the name of the environment variable holding one
(passwordEnv, apiKeyEnv, tokenEnv) and reads the value itself.
docket adapter add <provider> writes an entry for you. It asks what the adapter needs, shows the plan (the
entry, any Compose file, the variables to set, the driver and what to run next) and applies it once you confirm. It never
overwrites a file, never writes a secret, and never pulls an image or starts a container. In scripts, pass the answers as
options with --yes; --check connects afterwards and reports, and docket adapter add --help lists every option.
docket adapter add neo4j --dry-run # show the plan, change nothing
docket adapters list # what is configured, and whether each module and driver loads
docket adapters status # connect to each and report its health and how far it lags the files
docket sync --adapter graph # sync one instance (repeatable)
docket rebuild --adapter graph # reset one instance and reproject it, in its own namespaceEach instance keeps its own sync manifest, so one that fails or is unreachable is reported and retried without holding up the others. Changing an instance's endpoint, scope or any setting resets that instance alone on its next sync.
jsonl @docket/adapter-jsonl
The default, and the only adapter a new docket has. It writes documents.jsonl, nodes.jsonl and edges.jsonl under .docket/.index: a readable, diffable view of exactly what projections receive. It
answers with a lexical keyword search over titles, ids, tags and bodies.
Setup: nothing; docket init configures it as local. Add another with docket adapter add jsonl --output <dir>.
Neo4j @docket/adapter-neo4j
A graph of your docket: one node per exhibit and one relationship per link, each carrying its confidence, evidence count and
sources, with a full-text index over the documents. A question is answered with the full-text matches and the best paths from
each, up to traverse.hops relationships, ranked by confidence. Use it for who owns what, what depends on what, and
how two things connect.
Needs: a running Neo4j server, local or hosted, and the optional neo4j-driver package installed
where docket runs (pnpm add neo4j-driver, or --install on adapter add).
An existing or hosted server
docket adapter add neo4j --url bolt://localhost:7687 --password-env NEO4J_PASSWORD
export NEO4J_PASSWORD=...
docket syncA local container
--mode local adds a runtime group and writes a Compose file you then own, ./infra/docket-graph-dev.compose.yaml, with Bolt bound to 127.0.0.1:17687. docket never picks an image:
give one with --image. Its pull policy is never by default, so pull the image yourself first.
docker pull neo4j:5.26 # the image you approve; docket never picks or pulls one by default
docket adapter add neo4j --mode local --image neo4j:5.26
export DOCKET_NEO4J_PASSWORD=... # at least 8 characters; read by the container and the adapter
docket runtime plan graph-dev # check the Compose file; starts nothing
docket runtime up graph-dev
docket runtime status graph-dev
docket syncdocket runtime down graph-dev stops it and keeps its volume; --destroy-volumes deletes that too. No
other docket command calls Docker.
Config
adapters:
- id: graph
module: "@docket/adapter-neo4j"
config:
uri: bolt://localhost:7687 # default; any driver scheme, e.g. neo4j+s://
username: neo4j # default
passwordEnv: NEO4J_PASSWORD # unset: connect without auth
# database: neo4j
# scope: payments-project # default: one unique to the checkout
# traverse: # how far a search reaches from each match
# hops: 2 # default; 1 to 3
# minConfidence: 0 # follow only relationships this well supported
# rels: [depends_on, owned_by] # default: every relationship
# cypher:
# model: "qwen2.5:7b" # a local Ollama model picks a query templateWith cypher.model set, a local Ollama model first chooses one of the adapter's query templates (what depends on
what, who owns something, how two things connect, how many) and fills it in; when none fits, it writes a read-only query that
must stay inside the instance's scope. Without it, the adapter's own query answers.
mem0 and Qdrant @docket/adapter-mem0
Semantic memory: each exhibit is stored as one verbatim memory, its id, type, confidence and evidence count as metadata, so a question finds exhibits by meaning rather than keyword. Rebuilds reproduce it exactly and make no LLM calls.
Needs: the optional mem0ai package where docket runs, and one of three modes. Set MEM0_TELEMETRY=false to turn off the mem0 SDK's telemetry.
Hosted mem0 (platform)
docket adapter add mem0 --mode platform --api-key-env MEM0_API_KEY --install
export MEM0_API_KEY=...
docket syncA self-hosted mem0 server
docket adapter add mem0 --mode server --url http://localhost:8888
docket syncapiKeyEnv is optional here: the server can run without auth.
In process, on Qdrant (oss)
The oss mode runs mem0 inside docket with any embedder, vector store and LLM mem0 supports. This one keeps vectors
in a local Qdrant, with Ollama models for embeddings and the LLM. adapter add does not write this mode, so write
the entry by hand.
docker run -d -p 127.0.0.1:6333:6333 qdrant/qdrant
ollama pull nomic-embed-text && ollama pull qwen2.5:7b
pnpm add mem0ai # or npm install mem0ai, where docket runsadapters:
- id: memories
module: "@docket/adapter-mem0"
config:
mode: oss
config: # passed to mem0's Memory constructor as-is
embedder: { provider: ollama, config: { model: nomic-embed-text } }
vectorStore: { provider: qdrant, config: { host: localhost, port: 6333 } }
llm: { provider: ollama, config: { model: "qwen2.5:7b" } }
prefixes: # what nomic-embed-text expects before each text
document: "search_document: "
query: "search_query: "
# minScore: 0.3 # drop hits below this similarityEvery mode also takes scope (by default one unique to the checkout's path) and minScore. Run docket rebuild after changing prefixes: stored memories keep the text they were stored with. If
several machines share one mem0 or Qdrant at the same checkout path, give each its own scope.
cognee @docket/adapter-cognee
Exhibits are added to one cognee dataset and cognified into cognee's knowledge graph. Questions are answered with cognee's chunk
search, as passages citing their exhibits, and, with completion set, with cognee's own cited answer.
Needs: a cognee 1.6.8 server you run; docket talks to its REST API and never starts it. Each sync cognifies what it added, so the first sync of a large docket takes a while and costs model calls on the cognee server.
Run cognee locally
The docket repository has a Compose file for cognee 1.6.8 on 127.0.0.1:8000, using Ollama on your machine:
git clone https://github.com/chrisjowen/docket.git && cd docket
ollama pull qwen2.5:7b && ollama pull nomic-embed-text
export COGNEE_DEFAULT_PASSWORD=... # choose one
docker compose -f packages/adapter-cognee/dev/compose.yaml up -d
curl -s localhost:8000/healthAccess control stays on, so every request needs an API key. Log in as cognee's default user once and make one:
TOKEN=$(curl -s -X POST localhost:8000/api/v1/auth/login \
-d "username=default_user@example.com&password=$COGNEE_DEFAULT_PASSWORD" | jq -r .access_token)
export COGNEE_API_KEY=$(curl -s -X POST localhost:8000/api/v1/auth/api-keys \
-H "Authorization: Bearer $TOKEN" -H 'content-type: application/json' -d '{"name":"docket"}' | jq -r .key)Add it
docket adapter add cognee --url http://localhost:8000
docket syncadapters:
- id: cognee
module: "@docket/adapter-cognee"
roles: [projection, query]
config:
url: http://localhost:8000
# apiKeyEnv: COGNEE_API_KEY # default
# dataset: payments # default: one unique to the checkout
# inputs: [entity] # default; also observation, document
# completion: GRAPH_COMPLETION # also ask cognee for a cited answerFor better graphs, set COGNEE_LLM_MODEL=llama3.1:8b before starting the server; chunk search does not depend on
the graph. Any other cognee 1.6.8 deployment works the same way: point url at it.
memvid @docket/adapter-memvid
Exhibits, observations and documents as frames of one memvid .mv2 file, searched with memvid's BM25. Embedded: no
service, no Docker, no network.
Needs: the memvid CLI, and the adapter package itself. It is not bundled with docket or published to npm, so
add it from a docket checkout as a workspace or file: dependency.
npm install -g memvid-cli@2.0.160
docket adapter add memvid --namespace payments
docket sync--file picks the .mv2 file; by default it lives in the adapter's state directory.
MemPalace @docket/adapter-mempalace
Exhibits, observations and documents filed verbatim as drawers in one wing of a MemPalace palace, answered with MemPalace's own semantic search. docket drives MemPalace's MCP server over stdio, so Python stays out of process.
Needs: MemPalace 3.10.0, its embedding model downloaded beforehand (docket never lets it download one), and the adapter package from a docket checkout, as for memvid.
pip install mempalace==3.10.0
python -c "from chromadb.utils.embedding_functions import ONNXMiniLM_L6_V2 as M; M()(['warm up'])"
docket adapter add mempalace --wing payments
docket sync--palace points at a palace directory to share. --embedding-model embeddinggemma uses that model
instead of the default minilm; it must already be in the Hugging Face cache.
Docket Cloud @docket/adapter-cloud
Answers from a Docket Cloud workspace, beside your local adapters. It is query-only and projects nothing. docket cloud link <org>/<workspace> sets it up, and docket cloud login signs in; when the
cloud cannot be reached, it is reported unavailable and the local answers stand. See Docket Cloud and MCP.
Postgres Coming soon
A Postgres adapter is planned, for a self-hosted Docket server that runs on Postgres alone. It is not built yet, and there is nothing to configure today. Its setup will be documented here when it ships.