Skip to content

API Reference parrot.outputs.a2ui.emission

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.outputs.a2ui.emission

View source

A2UI emission helper (Module 10).

The pure routing logic that sends an OutputMode.A2UI response around the legacy OutputFormatter. It lives in the a2ui package (no heavy bot/client deps) so it is unit-testable in isolation; parrot.bots.base imports and calls it at both formatter call sites.

Function finalize_a2ui_response

Route an OutputMode.A2UI response around the legacy formatter (FEAT-273).

Places the declarative envelope in response.a2ui_envelope (a plain dict), sets response.output_mode = OutputMode.A2UI, and populates a human-readable fallback in response.response — without entering OutputFormatter or serializing the envelope into response.output (kept intact for legacy consumers).

finalize_a2ui_response(response: Any) -> None

Parameter Type Default Description
response Any The bot response object (duck-typed: a2ui_envelope/output/ response/output_mode attributes).

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally