Catalog PyPI
PACKAGE EXPLORERView in registry

a4ui-agent

PyPI

Agent-side A2UI chart producer for @haystackedai/a4react clients. Keep your agent (bedrock/agentcore/strands and your own biz logic are untouched); add a few lines where you already have the answer data and get a validated, drillable A2UI chart surface — richer than a hand-rolled chart. No a2ui-core wiring, catalog assembly, surface-message building or validation to write. Contract (catalogId + schemas) is baked, overridable.

Versions collected1
Direct dependencies3From release 0.2.0
Last observed20 Oct, 16:44 UTC

README

Version 0.2.0 documentation

a4ui-agent

Agent-side A2UI chart producer for @haystackedai/a4react clients.

This package does not wrap your runtime — bedrock, agentcore, strands and your own business logic stay yours. It packages the one reusable, hard part: the A2UI chart (richer than a hand-rolled one, validated against the shared catalog). You keep your agent and add a few lines where you already build the response — mirroring how a React dev drops in useA4Chart + A4ChartView without wrapping their server.

from a4ui_agent import Chart, a2ui_frame

chart = Chart()                                   # once (baked contract)

# in your existing entrypoint, where YOUR pipeline already produced the data:
rows, columns, answer = my_pipeline(prompt)       # your biz logic, untouched
yield a2ui_frame(chart.surface(rows, columns, answer))

# the UI's chart-type toggle:
if action and action["name"] == "rechart":
    yield a2ui_frame(chart.rechart(action["context"]["plotType"]))

No a2ui-core wiring, catalog assembly, surface-message building or validation to write. Dependencies are only a2ui-core + pydantic — nothing about your runtime. The contract (catalogId + schemas) is baked and overridable.

See ../instruction_a4.md (the a4ui-agent section) for the full DO list, the 2 insertion points, drill/rechart handling, and the contract rules.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.013 Oct 20263

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:44 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:0168a57120512731014d4687b3c6a37791d4b6b787f295e35e8fcff70fcf54c1