Developer

TECHNICAL DEVELOPMENT

LaplaceMate Bridge: Connect LaplaceMate to a PC Agent

Turn on Engineering Mode, then connect LaplaceMate to OpenClaw, Hermes, Claude, or a custom agent running on your computer. This guide explains the system architecture, connection options, and message flow—from the first heartbeat to the final response.

LaplaceMate developer notesBridge / PC Agent
INTERACTIVE SYSTEM MAP

LaplaceMate PC Agent: A Two-Way Interaction System

Click any module or select an example flow to explore how data moves through the system.

VoiceInput AudioOutput VisionInput Local Vision ModelOn-device inference Avatar /Device Actions Cloud Speech &Conversation ServicesASR → LLM → TTS LaplaceMate ASR · TTS · Vision · Avatar ▣ PC / Computer PC BridgeConnectivity& ProtocolManagementTCP :18792 OpenClaw / PC AgentToolsSkillsKnowledge BaseAutomation Scripts Voice request / recognized text Speech, status, alerts, actions Proactive events
Voice Input

The microphone captures the user's request and routes it to LaplaceMate.

WHAT CAN I BUILD?

Explore what you can build with LaplaceMate

Select a use case to view compatible software and a reference architecture.

MARKET MONITOR

Bitcoin & market monitoring

Track prices, volatility, news, or portfolio thresholds and let LaplaceMate announce important changes without opening an app.

SoftwareCoinGecko APIBinance APITradingView WebhooksPython
Reference architecture
  1. 01Market dataExchange API or webhook
  2. 02Monitor scriptRules, thresholds, scheduling
  3. 03PC Agent + BridgeFormat and route the alert
  4. 04LaplaceMateVoice, display and avatar action
LM
LaplaceMate × PC Agent Bridge

A lightweight TCP JSON Lines bridge: LaplaceMate handles voice and expression while the computer agent handles richer tasks.

Connect to a PC Agent

Once Engineering Mode is turned on, LaplaceMate can establish a persistent TCP connection to the Bridge running on your computer. Use USB for the simplest and most secure local setup, or connect over your local network when the device and computer need to communicate wirelessly.

RECOMMENDED FOR DEVELOPMENT

USB with ADB reverse

Keep the Bridge bound to 127.0.0.1. USB is private by default and does not require opening a port on your network.

adb devices
adb reverse tcp:18792 tcp:18792
cd pc_agent_tools
./start-pc-agent-tools.sh --open
01 · The connection path after Engineering Mode is turned on
LaplaceMateASR / TTS / UnityEngineering Mode PC BridgeTCP :18792JSON Linesheartbeat + routing PC AgentOpenClaw / HermesClaude / custom agent_requestrun taskagent_responsesend_tts / send_text

What is the Bridge?

LaplaceAgentClient is the open-source connection layer between LaplaceMate and a computer-side agent. It includes the Bridge, an optional Watcher, startup scripts, protocol documentation, and test code.

The device handles speech recognition, playback, and presentation. The PC Agent can perform longer or more capable tasks, then return a clean natural-language result to LaplaceMate for playback or display.

Protocol flow

The Bridge uses a persistent TCP connection with UTF-8 JSON Lines: one JSON object per line, ending with \n. Every task carries a requestId so staged responses can be correlated correctly.

  1. ping → pongLaplaceMate sends a heartbeat immediately after connecting and repeats it about once per second.
  2. agent_requestThe device sends the recognized text, device ID, request ID, and optional capability information.
  3. thinking / progressA long-running task can send intermediate states. An empty thinking message should not trigger TTS.
  4. final: trueThe agent returns the final result with send_tts or send_text as the delivery mode.
{"type":"agent_response","requestId":"…","phase":"final","final":true,"delivery":"send_tts","text":"The task is complete."}

Quick Start

USB keeps the Bridge on the loopback interface and is the simplest development setup. Verify the mapping with:

adb reverse --list
lsof -nP -iTCP:18792 -sTCP:LISTEN

For LAN testing, make sure the device and computer are on the same network, and configure LaplaceMate with the computer's LAN IP and port 18792.

Security Note

The reference protocol uses unauthenticated plain-text TCP. Never expose it directly to the internet. Restrict LAN access with a firewall, or place an authenticated TLS proxy in front of the Bridge.