THE OPEN-SOURCE EMBODIMENT STACK

KINPOD SYSTEM ARCHITECTURE & DEVELOPER GUIDE

KinPod is an open-source wearable physical body designed for autonomous AI agents (OpenClaw, Claude Code, Gemini, Hermes). Worn on the chest via a magnetic harness, it provides physical eyes, ears, voice, and an unforgeable hardware approval boundary.

01

Architecture Overview

The KinPod ecosystem operates across three decoupled layers:

SYSTEM TOPOLOGY: THREE-TIER PIPELINE
┌────────────────────────────────┐ WebSocket Stream (16kHz PCM) ┌───────────────────────────────┐ │ KinPod Physical Body │ ◄─────────────────────────────────────► │ KinBridge Hub │ │ (ESP32-S3 Touch AMOLED 2.06") │ JSON Telemetry & Approvals │ (FastAPI / Python 3.11+) │ │ - CST9220 Capacitive Screen │ │ - Google STT / Whisper STT │ │ - ES7210 PTT Microphone │ │ - Edge-TTS Voice Synthesis │ │ - ES8311 + NS4150 Speaker │ │ - Cloudflare Roaming Tunnel │ └────────────────────────────────┘ └───────────────┬───────────────┘ │ Model Context Protocol │ (HTTP / SSE / stdio) REST chatCompletions ▼ ┌───────────────────────────────┐ │ Autonomous Agent Host │ │ (OpenClaw / Claude / Gemini) │ │ - Tool Calls & Reasoning │ │ - HITL Sternum Approval │ └───────────────────────────────┘

Real-Time Duplex Audio

Pressing the physical BOOT button (GPIO 0) engages the ES7210 microphone, streaming binary 16kHz PCM frames over WebSocket. KinBridge transcribes with zero-latency streaming and replies via neural Edge-TTS through the chest speaker.

The Tribe of Kin

Support for 6 distinct agent avatars: Crab (OpenClaw), Astro (Gemini), Octo (Claude Code), Hermes (Nous Research), Muse (GPT-4o), and Dots (Local Ollama).

02

Hardware Specifications & Pinouts

KinPod is built on top of the Waveshare ESP32-S3 Touch AMOLED 2.06" development board, featuring an ESP32-S3R8 dual-core Xtensa LX7 SoC with 32MB Flash and 8MB Octal PSRAM.

Peripheral SubsystemPins / GPIO BusTechnical Description
Shared I2C0 BusSCL=14, SDA=15400kHz shared peripheral bus managed with FreeRTOS mutex.
PMU AXP2101I2C `0x34`Critical ALDO2 power rail set to 3.3V for AMOLED display. CC 500mA charging.
AMOLED 2.06"CS=12, SCLK=38, D0-D3=4-7, RST=39410×502 px high-density curved display, CO5300 QSPI controller.
Capacitive TouchINT=11, RST=40 (I2C `0x5A`)CST9220 multi-touch controller. Powers the sternum HITL approval boundary.
I2S0 Audio CodecMCLK=42, BCLK=9, LRCK=45, DOUT=8, DIN=1016 kHz 16-bit Duplex: ES7210 microphone ADC + ES8311 speaker DAC.
Power AmplifierGPIO 46NS4150 Class-D 3W audio amplifier (Active-High enable).
PTT ButtonGPIO 0 (BOOT)Push-To-Talk tactile active-low button with 300ms short-tap rejection.
Haptic FeedbackGPIO 18Miniature ERM tactile vibration motor for physical touch feedback.
PMU AXP2101 Power Rail Requirement: The AMOLED display is powered via the ALDO2 power rail. If ALDO2 is not enabled at 3.3V during power-on initialization, the CO5300 display controller will not respond to QSPI commands.
03

Model Context Protocol (MCP)

KinPod exposes an official Model Context Protocol (MCP) server conforming to the open Anthropic specification. This enables OpenClaw, Claude Code, Cursor, Windsurf, and Antigravity to treat the physical wearable as a standard peripheral toolset.

mcp_config.json — AGENT REGISTRATION
{
  "mcpServers": {
    "kinpod": {
      "command": "python",
      "args": ["-m", "kinpod_mcp.server"]
    }
  }
}

EXPOSED MCP TOOLS REFERENCE

Tool NameParametersDescriptionScope
`kinpod_status`NoneReturns battery voltage (mV), Wi-Fi RSSI, link state, and active visual theme.Read-Only
`kinpod_connect`agent_id, avatar_id, titleInhabits the wearable, switching the AMOLED display to your agent's avatar.Telemetry
`kinpod_speak`text, voiceSynthesizes audio via neural TTS and streams speech through chest speaker.Audio Out
`kinpod_listen`timeout_secBlocks and waits for wearer to press BOOT button, speaks, and returns transcribed text.Audio In
`kinpod_get_last_speech`NoneReturns the most recent transcribed speech without blocking execution.Read-Only
`kinpod_request_approval`action, details, risk, timeout_secHITL Guardian: Displays modal on chest; pauses agent until human taps screen.Security
`kinpod_expose_tunnel`portSpawns a Cloudflare tunnel for zero-configuration cellular hotspot roaming.Network
04

Human-In-The-Loop (HITL) Guardian

As AI agents become autonomous developers capable of executing shell commands, deleting databases, or conducting financial transactions, software confirmation prompts inside chat interfaces are insufficient. KinPod enforces a physical sternum killswitch.

agent_script.py — HARDWARE APPROVAL ENFORCEMENT
# Synchronously pause for physical human confirmation on chest screen
result = await kinpod_request_approval(
    action="deploy_prod",
    details="Deploying commit 7a8b9c to production server.",
    risk="HIGH",
    timeout_sec=60
)
if "APPROVAL GRANTED" in result:
    print("Wearer tapped APPROVE on chest screen. Proceeding.")
    run_deploy()
else:
    print("Action REJECTED or timed out. Aborting gracefully.")
    abort_deploy()
05

KinBridge & WebSocket Protocol

KinBridge is a high-performance Python FastAPI daemon that handles the bidirectional WebSocket connection with the ESP32-S3 wearable, local Speech-To-Text (STT), Neural TTS synthesis, and routing to OpenClaw Gateway or Gemini.

TERMINAL — START KINBRIDGE ON PORT 8005
cd kinpod/server
pip install -r requirements.txt

# Configure language & OpenClaw Gateway token
export KIN_LANG="en"
export OPENCLAW_TOKEN="your_gateway_token"

# Start hub listening on port 8005
python -m uvicorn kin_bridge:app --host 0.0.0.0 --port 8005

WEBSOCKET EVENT SCHEMA (/ws/kinpod)

1. Audio Inbound (PTT)

Wearer presses BOOT (GPIO 0). Wearable sends text `ptt_start`, streams binary 16kHz PCM chunks, and finishes with `ptt_stop`.

// 1. Text control frame
{"event": "ptt_start", "kin": "crab"}

// 2. Binary frames (OpCode 0x02)
[16kHz 16-bit Mono PCM chunks]

// 3. Text control frame
{"event": "ptt_stop"}
2. Audio Outbound (TTS)

KinBridge generates TTS response, sends text `reply`, streams binary 2048-byte PCM audio chunks, and signals `tts_end`.

// 1. Text control frame
{"event": "reply", "kin": "crab", "text": "..."}

// 2. Binary audio stream
[2048-byte chunks every 30ms]

// 3. Completion event
{"event": "tts_end"}
06

Firmware & Flashing Guide

KinPod runs native C firmware built on ESP-IDF v5.4 / v6.0 with FreeRTOS. It utilizes a 32MB custom partition table dividing flash into dual OTA banks and a 12MB SPIFFS partition for character animations.

ESP-IDF COMPILATION & FLASH
# 1. Enter firmware directory
cd kinpod/firmware

# 2. Build binaries with ESP-IDF
idf.py set-target esp32s3
idf.py build

# 3. Flash to board on serial COM port (e.g. COM5 or /dev/ttyUSB0)
idf.py -p COM5 flash monitor

USB SERIAL CONFIGURATION COMMANDS

The firmware exposes a live interactive serial command channel at 115200 baud over the native USB CDC port:

Serial CommandArgumentsDescription
`SET_WS <url>`wss://agent.thekinpod.com/ws/kinpodStores WebSocket URL in NVS and immediately reconnects.
`SET_WIFI <ssid> <pass>`MyNetwork MyPasswordStores Wi-Fi credentials in encrypted NVS partition.
`GET_CONFIG`NoneReturns currently configured SSID and WebSocket URL.
`PAIR`NoneDisplays the 4-digit pairing keypad on the AMOLED display.
07

Hacker Bill of Materials (BOM) & 3D Mount

KinPod is 100% buildable using commercially available off-the-shelf components. Zero custom silicon, zero proprietary connectors.

ComponentPart SpecificationVendor / Source
Core MCU & AMOLEDWaveshare ESP32-S3 Touch AMOLED 2.06"Waveshare / AliExpress / Amazon (~$34 USD)
Battery Cell3.7V 500mAh–1000mAh LiPo Cell (JST 1.25mm)Adafruit / MakerFocus (~$6 USD)
Chest MagnetsNeodymium N52 Disc Magnets (10mm × 2mm, 4×)K&J Magnetics / Amazon (~$5 USD)
3D Printable ChassisPETG / Tough Resin, 0.16mm layer heighthardware/cad/

Have improvements or questions?

KinPod is community-driven. File an issue, submit a PR, or join the discussion on GitHub.

Contribute on GitHub