Skip to main content

Tool Execution Streaming

Benchmarked against: Anthropic — Fine-grained Tool Streaming Status: Partial implementation — real-time feedback via heartbeat and factory floor Scope: How agents report tool execution progress in real-time

SuperPortia provides real-time visibility into agent operations through heartbeat, factory floor status, and work order state transitions — not traditional SSE/WebSocket streaming.


Real-time feedback model

Unlike traditional API streaming (where tokens stream as they're generated), SuperPortia's "streaming" is operational visibility:


Heartbeat streaming

Agents send periodic heartbeats to register as online:

agent_heartbeat()

What heartbeat reports

FieldDescriptionUpdate frequency
agent_idAgent identityEvery heartbeat
shipShip identifierEvery heartbeat
statusonline / offlineEvery heartbeat
current_taskWhat the agent is doingWhen task changes
last_seenLast heartbeat timestampEvery heartbeat

Work order state streaming

Work orders provide granular progress tracking through state transitions:

Each transition is logged with:

FieldDescription
from_statusPrevious state
to_statusNew state
changed_byWho made the change
timestampWhen it happened
notesContext for the transition
completion_summaryWhat was done (for review transitions)
actual_hoursTime spent (for review transitions)

Factory floor status

The factory floor provides a real-time dashboard of all operations:

factory_floor_status()

What it shows

SectionContent
Team statusEach agent's online/offline status and current task
Active WOsWork orders currently in_progress
Awaiting reviewWOs pending Captain approval
Blocked itemsWOs with blockers
Recent completionsRecently approved WOs
Service healthSystem services status

Agent messaging as streaming

Inter-agent communication provides another feedback channel:

send_agent_message(
to="夏哥",
subject="WO-2026-0305-001 Progress",
body="Step 3 of 5 complete. Running tests now."
)
FeatureUsage
Direct messagesAgent-to-agent or agent-to-Captain
Priority levelsnormal or urgent
Mailbox persistenceMessages survive across sessions
Read/unread trackingKnow which messages have been seen

Comparison with traditional streaming

FeatureTraditional API streamingSuperPortia operational streaming
GranularityToken-by-tokenTask-by-task
ProtocolSSE / WebSocketMCP tool calls
LatencyMillisecondsSeconds to minutes
Use caseChat UXOperations monitoring
PersistenceEphemeralLogged in UB / WO system

Future directions

EnhancementDescriptionStatus
Bridge real-time tabWebSocket-based live dashboardPlanned
WO progress percentageGranular progress within a WOUnder evaluation
Event busCross-agent event streamingUnder evaluation
Webhook notificationsExternal system integrationUnder evaluation

PageRelationship
Real-time StatusHeartbeat and factory floor
WO LifecycleWork order state machine
Tool DiscoveryAvailable tools