Card is a provider-neutral card document. The distribution compiles it into the provider’s native
rich surface — Slack Block Kit, Teams Adaptive Cards, Google Chat cards, and similar.
Import
All public symbols are re-exported from the package root:Creation Modes
Card supports three mutually exclusive creation modes.
Inline JSX
Pass a pre-rendered JSX string when you already have the document:Remote URL
Pass a URL when the card document is hosted remotely:Builder
Pass atitle and chain .add() calls to compose the card from typed components:
jsx and url are mutually exclusive — passing both raises ValueError.
In builder mode the JSX is rendered lazily when the card is serialized.
Card Reference
Components
Components are building blocks for builder-mode cards. Each implements.to_jsx() -> str.
Text
A prose block inside the card body.
Fields and Field
Fields groups compact labeled values. Field is one labeled key-value pair inside a Fields group.
Divider
A horizontal rule, typically placed between the body and the Actions section.
Button
An interactive control. Use id for server-side callbacks, url for links. The two are mutually
exclusive.
Actions
Groups Button controls at the bottom of the card.
Full Example
Transport
When passed tothread.reply() or thread.post(), the SDK converts the card to an A2A
TaskStatusUpdateEvent whose message contains a single file part and
extensions: ["https://docs.aion.to/a2a/extensions/aion/distribution/cards/1.0.0"].
- Inline cards (
jsx=or builder):rawbytes (base64 in JSON),filenamederived fromtitle(e.g.deployment-approved.card.jsx), orcard.jsxwhen no title is set. - URL cards:
urlfield only, noraworfilename.