Full agent state
Show a live plan, task board, or document alongside the conversation.
Read state from the server
For AG-UI, read state from the native client. For Assistant UI’s Assistant Transport protocol, add its maintained decoder and state tracker.
Use the matching Assistant Transport encoder on the server. Pass your request’s AbortSignal to cancel reading. Validate the decoded JSON and choose which fields your view can show before publishing it.
Connect a view without adopting another engine
Your store can keep the full state and expose a projection as ChatRuntimeInput: messages, identity, controller and capabilities. Use createChatRuntimeStore to subscribe. Render messages with MessageParts and show validated plan/task fields in application panels. If no message field exists, use the relevant components directly rather than inventing a transcript.
The decoder/tracker own wire parsing and state operations. Your application owns schema, command transport, persistence, replay and side effects. Ghost owns the optional runtime guards and React composition. There is no required Ghost transport or universal agent-state schema.
Troubleshooting
Strict decoding rejects a stream without a final [DONE] marker. The decoder can still log and skip invalid events. Validate required fields and show a failure when they are missing. A valid state update can contain no message. Keep one tracker for the whole stream and resume from the server’s replay or snapshot contract after reconnecting. See Assistant Transport and threads.