Sleeptalk

Agent integrations

OpenClaw

Talk to OpenClaw through its gateway, with openclaw acp as a fallback; support is in preview.

Setup

  1. Install OpenClaw on the runtime host: npm install -g openclaw@2026.10.2. Then run openclaw onboard once.
  2. Run sleeptalk and choose OpenClaw (preview), or let your agent run sleeptalk host ensure --agent openclaw.
  3. Give Sleeptalk the gateway token, and choose what a call continues.

For a fresh installation, the 0.1.0 inventory recommends OpenClaw 2026.10.2, which requires Node.js >=24.16.0 <25 or >=26.1.0. Existing gateways are retained; upgrading one is a separate operator decision. The integration remains preview.

The setup wizard asks how to get the gateway token:

  • Read it from ~/.openclaw/openclaw.json (recommended when that file exists). Sleeptalk reads gateway.auth.token.
  • Paste the gateway token.
  • Skip. Sleeptalk uses openclaw acp, and each call starts a fresh conversation.

The token is kept in Sleeptalk's private store as OPENCLAW_GATEWAY_TOKEN, and the profile references it. An older copy in Sleeptalk's .env still works, and moves to the store the next time you save this profile's agent. OPENCLAW_GATEWAY_PASSWORD also works at runtime.

With a token, the wizard asks what a call should continue: your main OpenClaw conversation (gateway_session_id = "agent:main:main"), which remembers what you talked about, or a fresh conversation each call.

If OpenClaw already uses OpenRouter, Venice, Groq, or Together, setup can offer that key for speech. It is used only if you say yes. It looks in ~/.openclaw/.env and ~/.openclaw/openclaw.json.

Connection and session

The gateway adapter connects to ws://127.0.0.1:18789 unless the profile sets gateway_url. A gateway on another machine needs TLS (wss:// or https://), unless it is on your tailnet (a 100.64.0.0/10 address or a *.ts.net name), so the token never crosses a network unencrypted. OPENCLAW_GATEWAY_CA_FILE names a custom certificate authority. The adapter completes OpenClaw's challenge and connect handshake, resolves the selected session key or creates a session, and filters events by session and run.

If the gateway is missing or the handshake fails, the adapter falls back to openclaw acp. That fallback starts a fresh conversation and loses gateway steering. The call log records a warning with the reason. type = "openclaw_acp" selects ACP directly.

Event mapping

Upstream eventSleeptalk handlingCaller experience
chat with deltaTextAssistantDelta and sentence streaming. Replacement snapshots are not spoken again.Incremental reply.
session.tool or agent tool streamToolEvent phases and narration detail.Tool activity.
exec.approval.requestedPermissionRequested, scoped to the current turn.Command approval.
chat final, aborted, or errorEnds the stream or reports a gateway error.Completion, interruption, or failure.
ACP fallback updatesThe shared ACP message and tool mapping.ACP behavior without gateway extras.

Permissions and sub-agents

permission_modeGateway command approvals
auto (used when the field is empty)Answered allow-once.
pendingThe caller decides.
denyAnswered deny.

Command approvals are the gateway's approval events. That does not prove every OpenClaw tool sits behind a permission gate. The setup probe gets read-only gateway access; it does not check the model login or bind the workspace to a conversation, which is why OpenClaw remains a preview.

The gateway adapter does not report OpenClaw's own agents or sessions as Sleeptalk workers.

Voice and interruption

Assistant text passes through the shared sentence streamer before speech. Tool activity follows your narration setting; a tool result is not read aloud in full.

Abort sends chat.abort for a selected session, or sessions.abort otherwise. Steering works only when the handshake advertises sessions.steer. The ACP fallback uses its own cancel path. A cancel does not undo completed work.

Limits and troubleshooting

  • "openclaw binary not found." Install it with npm install -g openclaw@2026.10.2, then run openclaw onboard once.
  • No token found in openclaw.json. Paste the token instead. openclaw config get shows a redacted placeholder, so copy gateway.auth.token from the file on the gateway host.
  • The call does not remember earlier conversation. The gateway fell back to ACP (look for the warning in the call log), or the profile has no gateway_session_id.
  • "Use TLS for a remote OpenClaw gateway." Use a wss:// address, a loopback address on the same host, or a tailnet address.

Implementation: gateway adapter, runtime selection, ACP client.