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.
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 --openLocal Network connection
Run the Bridge on your computer's LAN address, then configure LaplaceMate to use that address and port 18792.
python3 pc_agent_tools/bridge.py \
--host 0.0.0.0 \
--port 18792 \
--use-cliWhat 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.
ping → pongLaplaceMate sends a heartbeat immediately after connecting and repeats it about once per second.agent_requestThe device sends the recognized text, device ID, request ID, and optional capability information.thinking / progressA long-running task can send intermediate states. An empty thinking message should not trigger TTS.final: trueThe agent returns the final result withsend_ttsorsend_textas 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.
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.