soothe-client (Rust)
Talk to a running soothe-daemon over WebSocket — send prompts, stream agent turns, run jobs.
Requires a local daemon (default ws://127.0.0.1:8765).
Quick start
use ;
use TEXT_COMPLETION;
async
More patterns: examples/ (hello → streaming → multi-turn → pool → jobs).
Route to a specialist with preferred_subagent (canonical ids:
deep_research, academic_research, browser_use, planner):
use ;
# async
What you get
| Need | Use |
|---|---|
| One conversation, stream replies | appkit::DaemonSession |
| Jobs / cron (async) | AsyncCommandClient |
| Jobs / cron (scripts / sync) | CommandClient |
| Raw WebSocket / custom RPCs | Client |
| Many users / HTTP backend | ConnectionPool + TurnRunner (+ optional SseBroadcaster) |
DaemonSession uses a dual-socket layout (stream + RPC sidecar): peels leftover
prior-goal terminals, applies early chunk filtering, ignores premature
soothe.stream.end until the turn has progress, drains a short post-idle window,
and sends delivery_ack on terminal frames.
TurnRunner ends turns via TurnBoundary (gated stream.end / idle / stopped),
with pre-send settle-drain and arm-before-end so pooled leftovers cannot end the
next turn early.
Develop
Compatibility
Same protocol-1 WebSocket contract as soothe-client-python,
soothe-client-go, and @mirasoth/soothe-client.
License
MIT