Skip to content

How PHOS works

Through MCP, compatible AI agents can read available physical context and request supported actions from PHOS. PHOS validates each request and handles local execution; its display and configured local behaviors also run without an external agent.

Perceive

Pi adapters and compatible external controllers acquire measurements and observations. PHOS interpreters add confirmation, freshness, and semantic meaning: a temperature measurement and a confirmed environmental condition are different information. Presence describes anonymous human presence, not identity; visible-expression classification does not establish a person's emotions.

The shared physical-context model includes environment, air quality, motion, presence, attention, observed expression, and robot state. Touch gestures are local input with separate REST/Admin telemetry, not a dedicated MCP resource. Raw orientation vectors are available through motion telemetry; MCP physical context exposes interpreted motion rather than those vectors. PHOS can also ingest supported, explicitly mapped MQTT observations from external devices; see External Devices — MQTT & ESPHome.

Connect an agent when useful

An AI agent connects to PHOS through MCP to read the physical context it is authorized to access and request supported actions. PHOS validates requests and handles local execution. Its local behaviors can continue when the agent or its AI model is unavailable.

When the agent's MCP integration subscribes to supported updates, PHOS can send a cue that information may have changed. The cue does not contain measurement data or trigger an automatic model response. The agent decides whether to read the updated information or make a request.

Express

An authorized client can request supported expressions, temporary thinking visuals, configured speech, sleep/wake and supported signals. PHOS checks the agent profile, request and current capability before passing it to the local runtime. PHOS does not expose GPIO, device drivers or firmware controls. Optional hardware and providers are still required for their outputs.

flowchart TD
  agent[AI Agent]
  subgraph phos[PHOS]
    mcp[PHOS MCP server]
    adapters[Pi adapters and Vision]
    context[PHOS semantic context]
    services[Identity-bound application services]
    behavior[Local runtime and BehaviorEngine]
    face[FaceState and eye renderer]
    voice[TTS and separate playback]
    adapters --> context
    context -->|Authorized physical context| mcp
    mcp -->|Identity-bound tool request| services
    services -->|Validated supported requests| behavior
    behavior --> face
    behavior --> voice
  end
  inputs[Available sensors and camera] -->|Measurements / observations| adapters
  controller[Optional compatible external controller] -->|phos-hw v1 serial JSONL observations| adapters
  behavior -->|Resolved LED intent| controller
  face --> display[Display]
  voice --> speaker[Configured audio output]
  mcp -->|Authorized data / action result| agent
  agent -.->|MCP read / supported action request| mcp
  classDef phos fill:#0F4C5C,stroke:#49E7FF,color:#fff
  classDef external fill:#5B21B6,stroke:#C4B5FD,color:#fff
  classDef protocol fill:#312E81,stroke:#818CF8,color:#fff
  classDef hardware fill:#334155,stroke:#94A3B8,color:#fff
  class agent external
  class mcp protocol
  class adapters,context,services,behavior,face,voice phos
  class inputs,controller,display,speaker hardware
  style phos fill:transparent,stroke:#49E7FF,stroke-width:3px,stroke-dasharray:6 4,color:#49E7FF

The MCP host and client may be local or on another computer, but the network must actually reach the configured PHOS endpoint. The default listener accepts local loopback connections; it is not automatically reachable from a cloud service. MCP does not expose direct gaze, GPIO or serial commands. Web Admin, REST and local voice commands also use PHOS application services.

Keep the boundaries clear

Boundary Responsibility
User Chooses whether to connect an agent, configures its access, and decides which actions to allow.
External host and AI model Supplies the model, general reasoning and workflow decisions.
MCP client Connects the host to PHOS, reads resources and invokes permitted tools.
PHOS runtime and MCP server Produces available semantic context, validates permissions and requests, and owns local behavior and physical execution.
Physical device / controller Supplies installed observations or carries out supported physical output.

The PHOS runtime is required for both agent-connected and standalone operation. Start with the agent integration guide; technical contracts are in the MCP reference, controller protocol, and runtime architecture.