Stream Protocol

Convert public Harness observations into typed AG-UI events for terminals, browsers, and transports.

Stream Protocol (a13n-stream-protocol) only converts events: it does not run an Agent or provide an SSE server.

Start here

TaskGuide
Run a complete conversion without credentialsGetting started
Map text, reasoning, tools, custom events, and terminal resultsEvents and processors
Rebuild a projection after a consumer restartReplay and recovery
Look up public exports, fragment limits, and payload shapesAPI and payload reference
Continue Agent execution from saved stateHarness State and Resume

One observer, one Run

An observer binds to the first successfully observed source correlation. Another Run, including a child Run, needs another observer even when the product displays both in one conversation.

observe() returns only events produced by the current item. snapshot() returns detached accumulated events; it is an in-memory convenience, not a durable log. resume() reconstructs observer state from exact Harness source history without publishing history again.

Install

uv add a13n-stream-protocol

Published Stream Protocol pins the matching Harness release. The source quickstart uses the repository's locked workspace to match this documentation on main.

Ownership Summary

ConcernOwner
Harness execution, source lifecycle, result, and HarnessStateHarness
Harness-to-AG-UI conversion and process-local reconstructionAgent Stream Protocol
Visibility policy expressed by a replay-stable processorHost processor
Source-history retention, cursor, gap detection, and live cutoverHost
Durable AG-UI IDs, persistence, replay, and fan-outHost
SSE, WebSocket, Redis, or in-process deliveryHost transport
Rendered view stateRenderer

Next Steps

Reference topics

TopicGuide
Observe a Harness RunObserve a Harness Run
Read the Accumulated SnapshotRead the Accumulated Snapshot
Apply a Host ProcessorApply a Host Processor
Resume from Source HistoryResume from Source History
Resume Is Not Agent RecoveryResume Is Not Agent Recovery
Errors and AtomicityErrors and Atomicity

On this page