Setyenv · Docs
  • English
  • Spanish
  • Chinese
  • Japanese
  • Arabic
  • German
  • French
  • Hindi
  • Indonesian
  • Italian
  • Dutch
  • Portuguese
  • Russian
  • Turkish

Streaming & progress

WP-PFAgent supports real-time streaming and live progress so you can see what the agent is doing as it happens.

Server-Sent Events (SSE)

Where the provider supports it, the agent can stream the response token-by-token. Open the chat with Accept: text/event-stream and the server holds the connection open, emitting events as work progresses:

  • token — incremental text from the model.
  • tool_call — the agent has decided to perform an action (name + arguments).
  • tool_result — the result of an action.
  • gate_pending — a confirmation card is waiting for you.
  • done — the turn is complete, with usage stats.

Live progress polling

For non-streaming turns, the chat UI polls progress on GET /pfw/v1/agent-runtime/progress?conversationId=X. That gives you:

  • Actions in flight — name, status (pending, executing, complete, failed), timestamps.
  • Narrations — brief status text the agent emits while working ("looking up the workflow…", "preparing the change…").
  • Trace updates — the latest observability data for the current turn.

When streaming is not available

If the provider does not support streaming, the agent falls back to synchronous turns and the chat UI relies on progress polling to keep you informed. No configuration needed; this is automatic.