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