// configure · 03

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.

channelstate
terminalfull-screen TUI + concurrent REPL
telegramDM + group + voice (local Whisper → Edge TTS)
slack · discord · mattermostadapters over the same Channel interface
paperclipcontrol 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 agent

Slash 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:

  1. GET /api/agents/me and list assigned issues.
  2. Check out the issue (409 = another agent's; never repeats).
  3. Build the context and run it in the harness (run_task).
  4. PATCH the 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.

Open this page in the interactive docs