Skip to main content

Architecture

Pad-Lattice separates agent integration from hardware ownership.

Agent backend
-> Pad-Lattice socket protocol
-> Pad-Lattice daemon
-> Device profile
-> Hardware LEDs and controls

Components

ModulePurpose
pad_lattice.eventsAgent-agnostic states and control actions.
pad_lattice.protocolJSON-line socket protocol helpers.
pad_lattice.daemonLocal Unix socket daemon and action broadcaster.
pad_lattice.launchpadLaunchpad Pro Mk1 rendering and input mapping.
pad_lattice.codex_execCodex CLI JSONL adapter.
pad_lattice.cliCommand-line interface.

Daemon

Only one process should own the MIDI ports. The daemon keeps that ownership and exposes a local Unix socket so agents and tools can send state updates without touching MIDI directly.

The daemon also broadcasts Launchpad button presses to action subscribers.

Protocol

The protocol uses newline-delimited JSON.

State message:

{"type":"state","state":"running"}

Action message:

{"type":"action","action":"approve"}

Subscribe to actions:

{"type":"subscribe_actions"}