Channels and gateway
The gateway is channel-agnostic: a Channel abstraction (poll/send/allowed) with one bot per agent, persistent resumable sessions, and per-chat go/no-go. okami gatew…
The gateway model
Each agent has a Channel (its bot) → per-chat sessions (history injected as context = continuity) → run_task in the agent's workspace. Sessions use an append-only 2-layer transcript (OpenClaw style): a small metadata map rewritten atomically + a tree .jsonl, one line per turn. A crash loses at most the last line — and a restart never loses context.
| channel | state |
|---|---|
| terminal | full-screen TUI + concurrent REPL |
| telegram | DM + group + voice (local Whisper → Edge TTS) |
| slack · discord · mattermost | adapters over the same Channel interface |
| paperclip | control plane that wakes the agent on a heartbeat |
Telegram
The bot token goes in each agent's agent.yaml (channels.telegram.token); allow_chats restricts who can talk. With the voice extra, incoming audio is transcribed by local Whisper and the reply comes back as audio via Edge TTS.
uv sync --extra voice # enables STT/TTS
okami gateway # boots one long-poll per agentSlash commands in chat
/new · /reset clear the conversation; /stop cancels for real (checked at every harness step); /yolo · /normal toggle per-session auto-approval. Concurrency: one task per session; a new message while busy queues.
Paperclip (heartbeat)
Paperclip is a control plane that wakes the agent on a pulse. okami heartbeat does ONE beat:
GET /api/agents/meand list assigned issues.- Check out the issue (409 = another agent's; never repeats).
- Build the context and run it in the harness (
run_task). PATCHthe status: done · blocked · in_review.
Go/No-Go becomes a POST .../interactions (request_confirmation): --mode defer defers sensitive actions for human confirmation. Paperclip env is injected per-run — you don't fill it in by hand.

