q15-agent
q15-agent is the core of the stack. It owns:
- Prompt assembly — identity files from
/memory/core/, working memory, and conversation history are assembled into the system prompt each turn. - Tool wiring — file operations (read, write, edit), shell command execution via
q15-exec, web search, and embedding search are all agent-owned tools. - Telegram I/O — the agent communicates with users through a Telegram bot via long-polling.
- Memory management — turns are persisted to
/memory/history/, and the agent can update its own semantic and working memory. - Rooted file operations — the agent has read/write access to
/workspace,/memory, and/skills.
Model selection
Section titled “Model selection”The agent uses capability-aware model selection. Each model in the config declares capabilities:
texttool_callingreasoningimage_input
When a request comes in, the agent infers which capabilities are needed and filters out models that cannot satisfy the requirements. The remaining models are tried in the order specified in agent.models.
If agent.cognition.models is set, those models are used for background cognition jobs. When omitted, cognition inherits agent.models.
Memory layers
Section titled “Memory layers”The agent’s memory is structured into layers:
| Layer | Path | Auto-injected? |
|---|---|---|
| Core identity | /memory/core/ |
Yes, every turn |
| Working memory | /memory/working/WORKING_MEMORY.md |
Yes, every turn |
| Semantic memory | /memory/semantic/ |
No (tool-fetched) |
| Episodic history | /memory/history/ |
No (replayed by the agent) |
| Cognition state | /memory/cognition/ |
No (system-owned) |
See the Memory concept page for details.
Conversation history
Section titled “Conversation history”Completed turns are stored as JSON files under /memory/history/turns/YYYY/MM/DD/. The format is schema_version: 2 with canonical ordered messages[].parts[] entries of type text, reasoning, tool_call, and tool_result.
On startup, existing history is eagerly upgraded in place. Unreadable turn files are moved to quarantine. Cross-provider fallback uses portable transcript data first.
The agent can be configured with:
web_search— Brave Search integration (requiresBRAVE_API_KEY)embeddings— Qdrant-backed semantic search (requires Qdrant URL and Gemini API key)
Both are optional. Omit them from the config to disable.