Skip to content

API Reference parrot.outputs.a2ui.delivery

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

parrot.outputs.a2ui.delivery

View source

A2UI delivery bridge (Module 7, first half).

Maps a baked :class:~parrot.outputs.a2ui.artifacts.RenderedArtifact onto the EXISTING NotificationMixin.send_notification machinery (spec G5) — never a new delivery stack. Attachments flow through the mixin's report.files PRIORITY-1 extraction path.

Per-provider policy:

  • EMAIL / TELEGRAM — full attachment via report.files (works today, no mixin change).
  • SLACK — no file upload (spec Non-Goal); a public artifact URL line is appended in _send_slack (the bridge computes it via ArtifactStore.get_public_url and passes it as a kwarg). Degraded delivery is logged, never silent.
  • TEAMS — unchanged filenames-in-text today; real Graph upload is TASK-1734.

One-way import rule (G8): this module never imports agents/DatasetManager/LLM clients, nor the notifications subsystem — the provider is passed as a string (matching the NotificationProvider enum values) and the mixin-bearing owner is passed in.

Function deliver_artifact

Deliver a RenderedArtifact via owner.send_notification (per-provider policy).

deliver_artifact(owner: Any, artifact: RenderedArtifact, *, recipients: Any, provider: Any = _EMAIL, message: str = '', subject: Optional[str] = None, artifact_store: Any = None, user_id: Optional[str] = None, agent_id: Optional[str] = None, session_id: Optional[str] = None) -> dict[str, Any]

Parameter Type Default Description
owner Any A NotificationMixin-bearing object (e.g. BasicAgent).
artifact RenderedArtifact The baked artifact to deliver.
recipients Any Recipient(s) in the provider's expected shape.
provider Any _EMAIL Delivery provider.
message str '' Message text.
subject Optional[str] None Optional subject (email).
artifact_store Any None ArtifactStore for computing a Slack public URL.
user_id Optional[str] None
agent_id Optional[str] None
session_id Optional[str] None

Returns: dict[str, Any] — The send_notification result dict.

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