How it works
What is in the case
Five kinds of thing, one search across them, and one MCP endpoint in front. Each part below says what it stores and the rule that keeps it honest.
To-dos
A queue agents can share
A to-do is a high-level ticket, not a micro-step: a title, a body, a project, tags, who created it and its progress log. An agent claims it, works it with its own task system, posts progress and closes it.
- Claiming is atomic. One coordinator Durable Object per account holds the state, holder, lease expiry and fencing token. A claim is a compare-and-set on that single-threaded object; when two sessions race, exactly one wins.
- Leases expire on their own. The default lease is 30 minutes and an update renews it. When it lapses, the coordinator's alarm returns the ticket to pending, and the progress log stays. Nothing depends on a session-end hook firing.
- Fencing tokens refuse stale writers.
update_todoandcomplete_todoneed the current token. A stale one gets a tool error naming the current holder, so the model can stop instead of overwriting. - Readiness comes from links. Parents organise; prerequisites gate claiming.
list_readyreturns what is unclaimed and unblocked. - Progress is append-only. Findings go on the ticket as they appear, so the next session reads them instead of starting over.
Skills
One version of record
A skill is a SKILL.md (a name, a description and a Markdown body) plus optional bundled files. publish_skill makes a new immutable version and moves the head; old versions stay fetchable.
Every client gets the current version without a reinstall, through whichever door it has:
- SEP-2640
skill://resources, for clients that speak the extension; - one MCP tool per skill, for clients that do not;
list_skills(names and descriptions, cheap) andget_skill(the full body).
Skills can be imported from a Git repository and follow it upstream. A publish that fails validation comes back as a tool error listing what to fix, so the model can repair it and retry.
Memories
Typed, attributed, revised
A memory is an explicit observation, not a transcript and not an automatic profile. The writing agent has to classify it when it saves: a type (decision, insight, fact, preference, reference or episode), tags and a project. Memories are grouped into subjects.
Edits create a new revision; revisions are never updated or deleted. You review what agents wrote in the console, where the current state shows and earlier revisions stay retrievable.
Library
Originals with stable IDs
Two kinds of entry, independent of each other:
- Asset
- An immutable original file with a stable
asset:ID, a checksum and its metadata. Upload is begin, an HTTP transfer outside the model's context, then a verified finalize. Downloads are short-lived URLs issued after an authorization check; saved references use the ID, never the URL. - Source
- A bookmark, document, image or reference with a
source:ID, a URL, your notes and links to assets. Every edit is a revision.
The Chrome extension saves the active tab as an article, a bookmark, a full-page archive or a highlight. Its grant is four scopes: todos:write, assets:read, assets:write and sources:write.
Transcripts
What your agents said
The valise CLI sends conversations from Claude Code, Codex and OpenCode: every existing session once, then each new one as its client writes it. valise import --from reads copies and exports, including claude.ai and ChatGPT account exports.
- Per turn it sends the human message, the assistant text and thinking, each tool call with a one-line summary of its arguments, tool and API errors, and the system text the client put in front of the model. Successful tool results and tool definitions stay on the machine.
- Its OAuth grant is
search:read,transcripts:writeandtranscripts:read, and nothing else. Revoke it on Connections. - Resending adds nothing: the server compares turns hash for hash and the CLI sends from the longest common prefix.
valise installsets up a watcher on macOS; elsewhere, runvalise watchunder your own service manager.
Search
One ranking across everything
Each kind of thing keeps its own tables. Every write that changes searchable text also writes one row into a shared projection in the same database batch, and one SQLite FTS5 index over that projection ranks everything with BM25. One corpus means a skill and a memory are scored on the same scale.
There are no embeddings. Vector search was measured against BM25 and did not earn a second index (ADR-0013). A self-hosted instance can add a reranking pass over the lexical candidates; it is off by default.
search returns ranked snippets with IDs and fetch returns the full item, the pair ChatGPT expects. Typed tools serve every other client.
The surface
Tools that say when to call them
Tool descriptions are written for the model, because for a client without native skills they are the only way to discover what Valise does. Tools are grouped by what you want done, not by API call. Among them:
| For | Tools |
|---|---|
| Finding | search, fetch |
| Work | create_todo, list_ready, claim_todo, update_todo, complete_todo |
| Memory | save_memory |
| Skills | list_skills, get_skill, publish_skill |
| Library | upload_asset, get_asset_download, save_source |
There is no generic write tool and no delete tool. Deletion happens in the console.
Access
OAuth in front, rows per account
- Clients connect to
/mcpwith OAuth: dynamic client registration and S256 PKCE. One consent covers every scope; a client that names narrower scopes, such as the CLI or the extension, gets only those. - Every tool maps to a scope, checked before the call runs. Scripts that cannot do OAuth use bearer tokens minted in the console, each with its own scope set and label.
- There is one endpoint for every account. The credential names the account, and every row carries its owner.
- New accounts come from invites. A deployment with no admin list and no invites admits nobody.
The browser console manages all of the above, plus tokens, OAuth grants, people and invites, and shows what your agents did while you were away.
Runtime
One Worker and its bindings
- Worker
- MCP, OAuth and the console on one origin.
- D1
- Every row, the search projection and its FTS5 index.
- R2
- Skill bundles, original files and transcript mirrors.
- Durable Object
- The to-do coordinator, one per account.
- KV
- OAuth state.
- Workflow
- The daily backup into a separate R2 bucket with Bucket Lock.