This contract is single-agent first, multi-agent ready.
The first real deployment may render only Lucca, but the API remains array-based so additional named core agents can be added later without redesign.
Returns the current semantic room state and rendered agents.
{
"version": "0.2.0",
"room": {
"id": "lab-studio-a",
"name": "Lucca Lab Studio",
"width": 960,
"height": 540,
"anchors": []
},
"agents": [
{
"id": "lucca-main",
"name": "Lucca",
"model": "openai-codex/gpt-5.3-codex",
"runtimeStatus": "active",
"visualState": "writing",
"currentAction": "Drafting the implementation scaffold",
"currentAnchor": "desk",
"targetAnchor": "desk",
"slotIndex": 0,
"sessionLabel": "main",
"taskLabel": "Agent World scaffolding",
"lastUpdatedAt": "2026-03-18T08:40:00Z",
"lastTool": "write",
"queueDepth": 0,
"waitingReason": null
}
],
"selectedAgentId": "lucca-main",
"serverTime": "2026-03-18T08:40:00Z"
}agentsmay contain one item in v1.currentAnchoris the anchor currently occupied.targetAnchoris where the agent is moving toward; in v1 it may matchcurrentAnchoruntil movement animation is added.- coordinates are optional and may be computed client-side from anchor slots.
Returns recent semantic events in reverse chronological order.
{
"events": [
{
"id": "evt-101",
"agentId": "lucca-main",
"ts": "2026-03-18T08:40:10Z",
"type": "state_changed",
"label": "Moved into desk/writing state",
"detail": "Preparing Agent World implementation scaffolding."
}
]
}Sends an explicit operator command directly to the target session.
This endpoint must be read-only safe by default in the UI: no command is sent unless the operator explicitly submits one.
{
"text": "Summarize the active issue queue.",
"mode": "append",
"source": "ui"
}{
"ok": true,
"acceptedAt": "2026-03-18T08:40:30Z",
"agentId": "lucca-main",
"echoedCommand": "Summarize the active issue queue.",
"status": "accepted",
"delivery": "direct_session"
}append— send directly to the target session as the next instructionstatus— ask the target session for its current statusinterrupt— reserved but supported by schema; behavior can remain conservative in v1
read/ reference-heavy activity →librarywrite/ synthesis / planning / drafting →deskedit,exec,browser→terminalmessage/ explicit replies →comms- waiting or idle →
lounge - blocked or error → keep current anchor and set visual state
blocked
- do not remap anchors on every micro-event
- use a short heuristic window to derive the dominant current activity
- prefer stable clarity over rapid motion
GET /api/agent-world/stream— SSE live updates for state and events