Case study · Operator cockpit
Ana Concierge OS
A local-first cockpit for case work, in which an assistant can draft, cite and propose, and a person approves every action.
- Role
- Sole developer
- Built with
- TypeScript, React, Fastify, PostgreSQL, zod, Vitest
- Status
- Working local foundation; outbound actions deliberately out of scope
- Layers
- Interfaces, systems, models, data and evaluation
- Built by me
- A person, or an external model
- OperatorA person
- Ana serverBuilt by me
- ModelVia a bounded runner
- Operator to Ana server: Asks about a case
- Ana server: Rebuilds context from PostgreSQL
- Ana server: Retrieves passages within scope
- Ana server to model: Prompt and passages; no shell, no general tools
- Model: Drafts an answer
- Model to Ana server: Schema-valid JSON: answer, citations, proposed action
- Ana server: Rejects unretrieved citations and out-of-scope actions
- Ana server: Hashes the proposal and queues it
- Ana server to operator: Answer with sources; proposal awaiting approval
- Operator: Approves or rejects
- Operator to Ana server: Decision
- Ana server: Records it in the audit trail
The boundary belongs in the architecture
Concierge-style work is a stream of cases: people, requests, follow-ups, documents, and the knowledge needed to answer well. An assistant can help with all of it, provided it never invents a source and never acts on its own.
Ana Concierge OS is my attempt to build that boundary into the architecture rather than into a prompt. It runs locally, keeps its state in PostgreSQL, and treats the model as a drafting tool whose output the server checks and a person approves.
Six decisions that keep the assistant honest
- 01 · Systems
Cases with rules and a record
Cases, relations, tasks and follow-ups live in PostgreSQL behind a typed Fastify API, with deterministic case rules, daily work queues and an audit trail.
I built the Fastify API on Node.js, with zod validation of route parameters, query strings and request bodies. The /v1/* routes require a bearer token.
- 02 · Systems
Context rebuilt on the server
Every assistant turn starts from canonical state rebuilt from the database, not from whatever the conversation happened to remember.
- 03 · Data
Retrieval with a scope
Knowledge sources are normalized, chunked and reviewed before they are activated. Search uses PostgreSQL full-text, filtered by workspace, case, review state, date and classification, and every retrieval leaves a trace.
- 04 · Models
A model on a short leash
The local runner starts the model client without a shell, passes the prompt on standard input, disables general tools, requires schema-valid JSON and stops on timeout.
- 05 · Systems
Checked citations, human approval
The server rejects a citation to any passage that was not retrieved, and any action outside the conversation’s scope. Proposals are hashed and wait in an approval queue for a person to decide.
- 06 · Data
Imports that stay local
Document imports are local, bounded, verified by hash and staged until reviewed, with no model call involved.
A cockpit that shows its uncertainty
A responsive React interface with a today view of priorities, plus cases, relations, knowledge, imports, approvals and a persistent assistant. The assistant’s answers show their citations, uncertainty and suggested actions instead of hiding them.
A synthetic discovery mode lets someone explore the whole product without any operational data.
Tests where the boundary is
Unit and integration tests cover approvals, assistant safety, knowledge retrieval, document-import privacy and acceptance, and isolation of the model runner. Smoke scripts exercise the API and the assistant end to end.
What it is, and isn’t
Status. A working local foundation for case work; I don’t quote usage or adoption figures for it.
Scope. Outbound connectors for messaging, email and calendars, and any autonomous action, are deliberately outside it. Retrieval is lexical PostgreSQL search; embeddings may come later.
