Agent Runtime š¤
Kurahi runs a single embedded agent runtime derived from pi-mono.
Workspace (required)
Section titled āWorkspace (required)āKurahi uses a single agent workspace directory (agents.defaults.workspace) as the agentās only working directory (cwd) for tools and context.
Recommended: use kurahi setup to create ~/.kolo/kolo.json if missing and initialize the workspace files.
Full workspace layout + backup guide: Agent workspace
If agents.defaults.sandbox is enabled, non-main sessions can override this with
per-session workspaces under agents.defaults.sandbox.workspaceRoot (see
Gateway configuration).
Bootstrap files (injected)
Section titled āBootstrap files (injected)āInside agents.defaults.workspace, Kurahi expects these user-editable files:
AGENTS.mdā operating instructions + āmemoryāSOUL.mdā persona, boundaries, toneTOOLS.mdā user-maintained tool notes (e.g.imsg,sag, conventions)BOOTSTRAP.mdā one-time first-run ritual (deleted after completion)IDENTITY.mdā agent name/vibe/emojiUSER.mdā user profile + preferred address
On the first turn of a new session, Kurahi injects the contents of these files directly into the agent context.
Blank files are skipped. Large files are trimmed and truncated with a marker so prompts stay lean (read the file for full content).
If a file is missing, Kurahi injects a single āmissing fileā marker line (and kurahi setup will create a safe default template).
BOOTSTRAP.md is only created for a brand new workspace (no other bootstrap files present). If you delete it after completing the ritual, it should not be recreated on later restarts.
To disable bootstrap file creation entirely (for pre-seeded workspaces), set:
{ agent: { skipBootstrap: true } }Built-in tools
Section titled āBuilt-in toolsāCore tools (read/exec/edit/write and related system tools) are always available,
subject to tool policy. apply_patch is optional and gated by
tools.exec.applyPatch. TOOLS.md does not control which tools exist; itās
guidance for how you want them used.
Kurahi loads skills from three locations (workspace wins on name conflict):
- Bundled (shipped with the install)
- Managed/local:
~/.kolo/skills - Workspace:
<workspace>/skills
Skills can be gated by config/env (see skills in Gateway configuration).
pi-mono integration
Section titled āpi-mono integrationāKurahi reuses pieces of the pi-mono codebase (models/tools), but session management, discovery, and tool wiring are kolo-owned.
- No pi-coding agent runtime.
- No
~/.pi/agentor<workspace>/.pisettings are consulted.
Sessions
Section titled āSessionsāSession transcripts are stored as JSONL at:
~/.kolo/agents/<agentId>/sessions/<SessionId>.jsonl
The session ID is stable and chosen by Kurahi. Legacy Pi/Tau session folders are not read.
Steering while streaming
Section titled āSteering while streamingāWhen queue mode is steer, inbound messages are injected into the current run.
The queue is checked after each tool call; if a queued message is present,
remaining tool calls from the current assistant message are skipped (error tool
results with āSkipped due to queued user message.ā), then the queued user
message is injected before the next assistant response.
When queue mode is followup or collect, inbound messages are held until the
current turn ends, then a new agent turn starts with the queued payloads. See
Queue for mode + debounce/cap behavior.
Block streaming sends completed assistant blocks as soon as they finish; it is
off by default (agents.defaults.blockStreamingDefault: "off").
Tune the boundary via agents.defaults.blockStreamingBreak (text_end vs message_end; defaults to text_end).
Control soft block chunking with agents.defaults.blockStreamingChunk (defaults to
800ā1200 chars; prefers paragraph breaks, then newlines; sentences last).
Coalesce streamed chunks with agents.defaults.blockStreamingCoalesce to reduce
single-line spam (idle-based merging before send). Non-Telegram channels require
explicit *.blockStreaming: true to enable block replies.
Verbose tool summaries are emitted at tool start (no debounce); Control UI
streams tool output via agent events when available.
More details: Streaming + chunking.
Model refs
Section titled āModel refsāModel refs in config (for example agents.defaults.model and agents.defaults.models) are parsed by splitting on the first /.
- Use
provider/modelwhen configuring models. - If the model ID itself contains
/(OpenRouter-style), include the provider prefix (example:openrouter/moonshotai/kimi-k2). - If you omit the provider, Kurahi treats the input as an alias or a model for the default provider (only works when there is no
/in the model ID).
Configuration (minimal)
Section titled āConfiguration (minimal)āAt minimum, set:
agents.defaults.workspacechannels.whatsapp.allowFrom(strongly recommended)
Next: Group Chats š¦