remote-agent-protocol
Remote Agent Protocol is a local-first desktop voice switchboard for
conversations and background agent work. It combines live speech, Ollama,
selectable personas (the default assistant is Jess), persistent memory, and
deterministic routing to Hermes, Code Puppy, OpenClaw, or any command-line
agent configured by the operator.
The application lives in the remote_agent_protocol/
package and uses the vendored Pipecat framework under src/pipecat for its
real-time audio pipeline.
Features
- The conversation streams speaker-labeled text, groups agent progress and
consultations by task, and preserves full results alongside spoken relays.
Reloading recovers recent conversation independently of telemetry; external
playback remains unconfirmed until acknowledged. See
conversation and playback.
- Voice and typed input share one brain: STT → delegation routing → memory →
Ollama → TTS, with live persona/voice/model switching from the local web UI.
- The persona, the intent classifier, and the orchestrator's reasoning each run
locally or against any OpenAI-compatible cloud endpoint, chosen per model. A
cloud failure falls back to the local model, so the machine keeps working
offline; see the
CLOUD_LLM_* settings in env.example.
- Local / Cloud / Hybrid persona orchestration scores each routed turn and either
resolves it locally or escalates the reasoning to a cloud model, with global
and per-harness concurrency caps, duplicate-task rejection, JSONL telemetry,
and a Status-view panel showing recent routing decisions.
- Conversation text is speaker-attributed and streamed, with task cards that
group an agent's progress and consultations, explicit failure and cancellation
outcomes, and snapshots that survive a reload.
- The composer can bundle held voice, typed notes, links, images, and files into
one reviewed prompt before the assistant or a delegated agent sees it.
- Voice modes cover Free Talk, Wake Word, and Push To Talk, with the selected
mode persisted across restarts.
- Agent jobs run as background subprocesses, stream output without blocking
voice, follow a normalized lifecycle (started / in progress / tool running /
waiting / blocked / completed / failed), and are announced out loud.
- The live agent control plane directly probes each configured harness for
current evidence, keeps one unavailable harness from blocking the others,
and projects RAP-owned task progress without claiming control of external
sessions it cannot safely inspect or cancel.
- Destructive or elevated delegations are held for spoken or clicked
confirmation before they run. If a one-shot backend asks for permission and
exits, approval safely relaunches the same task instead of reporting success.
- Rapid corrections such as “wait, actually use httpx” cancel and replace the
newest agent job; delegated prompts carry a bounded, explicitly untrusted
conversation snapshot so contextual references survive the handoff.
- Every spoken update about agent work -- start, progress, and result -- is
written fresh each time instead of repeating a stock sentence, on the small
model already resident for intent routing (no extra VRAM, no added
latency). Each delegated backend speaks in its own voice, so which agent
finished is audible before the words register, while live tool, step, and
last-completed fields continue advancing in the Agents panel.
- Agents share a commons: a workspace folder where finished jobs leave
findings for each other and lessons for their own next run, and can ask
each other one question mid-task and hear the answer read back. A
consulted agent can't consult in turn, gets a fixed question budget, and
a harness running with tool approval disabled is never handed another
agent's text.
- The selected tool user is the default for unnamed work, not the only agent:
address Hermes, Code Puppy, Codex, or Claude Code explicitly for one request,
then unnamed work returns to the persisted default automatically.
- The companion avatar is a locally rendered holographic butler with expressive
gaze, phrase-shaped lip sync, state-aware scanlines/glitches, quality tiers,
reduced-motion behavior, and no CDN dependency.
- Optional multi-wake persona routing (
WAKE_WORD_ENABLED=true in .env or
Wake Word mode in the UI): locally installed openwakeword models are matched
to personas, repo-local models under remote_agent_protocol/wake_word/wake_models are discovered,
the highest-confidence trigger wins, and persona/model/voice settings are
queued before command audio reaches STT. Missing secondary models are skipped.
- External dashboards can subscribe to future agent lifecycle events at
ws://127.0.0.1:8765/events. The v1 stream is loopback-only and excludes raw
agent output; see the lifecycle API.