Skip to content
Pages of the documentation

How the agent works

One agent for the whole household. Its parts, a turn step by step, its tools, and how its instructions are built.

The parts

People reach it through
SatellitesSpeakers, robots, screens, a browser tab. In writing, aloud or both.
TelegramIn writing, from anywhere.
WhatsApp, Signal, MatrixOther messaging services, same contract., planned
The core
The conversation agentA fast model per medium, direct tools, streamed answers.
MemoryWhat it was told, and what each past conversation was about.
InitiativeReminders, watches, messages, and the courier that delivers them.
TasksLong work handed to an executor, followed to the end.
HouseholdPeople, rooms, presence, quiet hours.
Plugged in
ModelsProfiles you name, used by role. Any OpenAI-compatible API, cloud or local.
Home AssistantDevices, rooms, who is home.
ConnectorsGoogle, Microsoft 365, CalDAV, IMAP, any MCP server.
ExecutorsHermes, Codex, Claude Code: research, paperwork, code.
The journalEvery turn, tool call, memory, message and decision, as events in one SQLite file. The admin reads it; a restart rebuilds from it.
Figure 1One agent, reachable from anywhere, and a journal of everything it does. The core knows no vendor: the rest are adapters.

The core depends on no vendor; everything else is an adapter behind a contract. A restart rebuilds open conversations, tasks, reminders and undelivered messages from the journal.

A turn

  1. 1
    A message arrivesSaid to a satellite or typed in Telegram. The account tells Nestor who speaks, when it knows.
    conversation.turn.user
  2. 2
    It joins a conversationTurns close in time form one: five minutes aloud, four hours in writing, by default. Each event carries its id.
  3. 3
    The instructions are builtIn layers, most stable first, so the provider's cache keeps most of them.
  4. 4
    The model answers and actsIt streams its answer and calls tools: home, memory, reminders, messages, tasks.
    agent.tool.calledagent.tool.completed
  5. 5
    The answer goes back the way it cameSpoken or written. If interrupted, only what was heard is kept.
    conversation.turn.assistantconversation.turn.cut
  6. 6
    Long work leaves the conversationResearch or paperwork becomes an executor's task. Its result is announced once, even after a restart.
    task.startedtask.ended
Figure 2A turn, from message to answer. On the right, the events journaled at each step.

A conversation groups turns close in time. Once it ends, the model no longer rereads it; memories stay. Messages sent together are answered in order.

Aloud, Nestor speaks while the model still writes. Any word stops it, or 1.2 s of speech, except an acknowledgement (“mm-hmm”, “yeah”, “ouais”, “ok”, in English or French). When the model or a voice service fails, Nestor says so (conversation.fallback).

Tools

A tool slower than the turn’s wait goes on in the background, and Nestor tells the result later. A long result is stored aside, read with read_result and search_result. Work of minutes goes to an executor.

Setting Default What it does
agent.spoken_tool_wait_s 3 seconds a spoken turn waits for a tool
agent.written_tool_wait_s 20 seconds a written turn waits for a tool
agent.tool_result_chars 8000 longer results are stored aside
conversation_ends_after_s, per channel 5 min aloud, 4 h in writing silence that ends a conversation

The instructions

StableWho it is, its rules, its tools, the executors it can call.
changes with the configurationcache point
HouseholdMemories, watches, reminders.
changes now and thencache point
TurnThe time, who speaks, what their words find in memory and past conversations, open questions, running tasks.
changes every turn
ConversationThe open conversation's turns, with their tool calls.
grows with each turn
Figure 3A turn's instructions, most stable first. Everything before a cache point is read from the cache: a new turn pays in full only for what changed.

The household layer also says how the agent runs right now (a web search on free tiers, say), from each component’s notes(). The agent mentions it when it bears on the request.

Models by role

Point roles at profiles in models. A single model needs nothing more.

models:
  quick:
    type: language
    provider: openai-compatible
    base_url: https://openrouter.ai/api/v1
    api_key: ${MODEL_API_KEY}
    model: anthropic/claude-haiku-5.5
  careful:
    type: language
    provider: openai-compatible
    base_url: https://openrouter.ai/api/v1
    api_key: ${MODEL_API_KEY}
    model: anthropic/claude-sonnet-5.5

agent:
  spoken: quick
  written: careful
Role Does When left out
agent.spoken answers aloud agent.written
agent.written answers in writing agent.spoken
agent.titles titles each chat agent.written
watches.model sorts incoming items against the watches agent.written
memory.consolidation summarises each finished conversation agent.written

All roles: Models.