Formicaio
A team of specialised agents for your everyday goals — they remember the context, cite their sources and measure progress
Formicaio started from a question I asked myself every morning: 'what can I eat this morning?'. Answering it well takes the training plan, the day of the week, what is in the cupboard and the goal — and with a generic AI chat all of it had to be explained from scratch, every single time: a quarter of an hour to decide on a meal, only to get advice that knew nothing about me. Formicaio starts from the opposite assumption: context is structured data, not text to be rewritten. It is a personal assistant made of specialised agents, grouped in teams — athletics, study, any other area — that answer in a few seconds with your context, say which source each piece of advice comes from, and keep count of what you actually do.
## Teams, agents and sources
A team is an area with its own shared state: goals, metrics, recurring commitments, observation types. Inside it there are one or more agents, each with its own instructions, principles and documents. Before every answer, a structured reading of the question picks the agent that should answer and recognises what needs to be recorded; then the agent answers, citing the passages its advice comes from.
## A core that knows nothing about athletics
The strictest requirement was agnosticism: a new area has to be added through configuration alone, without touching the code. The core knows neither the track nor the exams, and a CI check fails if a pilot term shows up in its modules. A team's configuration is described by a versioned JSON Schema and validated with Ajv; every save publishes a new immutable version, and every turn records the one it used. The second team, study, was born that way: one configuration file, zero lines of code. Today teams, agents, metrics and observation types are created and edited straight from the app, starting from templates.
## The turn, from question to answer
Every question is a turn with a complete trace: the configuration version, the context sent to the model, the attempts, the rule checks, the tokens and the cost. The context is assembled by reading the core in the same process, because within a turn the system has to read its own writes: that is the main reason the architecture is a modular monolith and not a set of services.
## Your key, your model
Formicaio has no key of its own. Each user picks the provider in Settings — Anthropic, OpenAI or DeepSeek — and pastes their own key, which is sealed with AES-256-GCM in a separate schema. There is one model per provider, behind a common adapter with its own retry loop inside the turn's latency budget. Every answer is paid for by whoever asks, and before choosing, the app states plainly how each provider treats data.
## Measure, don't guess
The project has a weekly gate with two numbers: adherence, the share of commitment days on which the advice is actually followed (the target is at least 80%), and the time from question to answer shown (p95 under two minutes, against the quarter of an hour it started from). Answer quality is evaluated on a frozen set of questions, on a throwaway copy of the database, never in production.
## Design and visual identity
The app is an installable PWA, built for the phone but comfortable on the desktop too, with a soft look and a single blue as its primary colour. The mark is an anthill in section: the mound on top, the chambers inside, the galleries cut out down to the entrance, so the ground shows through on any surface. In the name, the 'AI' of FORMICAIO is in the accent colour.
## Tech stack
A TypeScript monorepo managed with pnpm: the backend, the PWA and an API client generated from the backend's OpenAPI contract, so front end and back end cannot drift apart silently.
## In production
It runs in Docker containers on a server in the European Union. CI builds the images, tagged with the commit SHA, and every commit on main goes to production on its own: from CI the server accepts one thing only, deploying a commit of main, always with a database backup before the migrations. The database lives on a LUKS2-encrypted volume, and the nightly backups leave the server already encrypted with age, bound for Cloudflare R2.
Formicaio is a personal project, conceived, designed and developed alone, and I am its first user. The project documents — discovery, estimate, domain model, architecture, implementation plan and test plan — were written by donumAI and approved by me stage by stage. The criterion I judge it by is written in the gate: four weeks of daily use, with adherence of at least 80%. Everything else is intention.