gskinnerteam/flutter-hatcha-app/a2ui-agent-sdk
Claude Code and agent skill by gskinnerteam/flutter-hatcha-app
- community
Checking that the SKILL.md file is still in the repository.
Python SDK for building A2UI agents. Use when: working with A2uiSchemaManager, a2ui.a2a.extension, a2ui.a2a.parts, a2ui.schema.constants, SendA2uiToClientToolset, BasicCatalog, CatalogConfig, A2uiStreamParser, InferenceStrategy, A2UI extension negotiation, or protocol constants (A2UI_OPEN_TAG, A2UI_CLOSE_TAG, DEFAULT_WORKFLOW_RULES).
Install
npx vskill@latest install gskinnerteam/flutter-hatcha-app/a2ui-agent-sdkSKILL.md
a2ui-agent-sdk Package — API Reference
The a2ui-agent-sdk package (v0.2.1) provides Python tools for building A2UI-capable agents. It handles schema management, prompt generation, A2A extension negotiation, DataPart creation, response streaming/parsing, and catalog loading — everything a Python agent needs to emit structured A2UI JSON over the A2A protocol.
When to Use
- Building a system prompt with catalog-aware schema injection via
A2uiSchemaManager - Activating the A2UI extension during A2A handshake
- Creating
DataParts from A2UI message dictionaries - Using protocol constants (
A2UI_OPEN_TAG,A2UI_CLOSE_TAG,DEFAULT_WORKFLOW_RULES) - Loading catalog schemas from files or bundled resources
- Parsing/streaming A2UI responses (v0.8 and v0.9 formats)
- Using the experimental
SendA2uiToClientToolsetwith Google ADK
Prerequisite: Read theai-systemskill for the Two-Layer AI Architecture context and how Python agents use this SDK within thehatcha_agent.
Package Structure
A2uiSchemaManager
Primary class for generating system prompts with embedded catalog schemas and examples. Implements InferenceStrategy.
Constructor
| Parameter | Type | Purpose | |
|---|---|---|---|
version | str | Protocol version ("0.8" or "0.9") | |
accepts_inline_catalogs | bool | Whether to accept inline catalog definitions from clients |
Methods
| Method | Signature | Purpose | |
|---|---|---|---|
generate_system_prompt | See below | Build a full system prompt with schema | |
get_selected_catalog | (client_ui_capabilities?, allowed_components?, allowed_messages?) → A2uiCatalog | Get catalog filtered by client capabilities | |
load_examples | (catalog: A2uiCatalog, validate: bool = False) → str | Load example JSON for prompt injection |
generate_system_prompt
Usage in This Project
Extension Negotiation — a2ui.a2a.extension
Handles the A2UI extension handshake within the A2A protocol.
Functions
| Function | Signature | Purpose | |
|---|---|---|---|
try_activate_a2ui_extension | (context: RequestContext, agent_card: AgentCard) → Optional[...] | Match client extension URI against agent card; returns activation or None | |
get_a2ui_agent_extension | () → AgentExtension | Returns the AgentExtension object to include in the agent card |
Constants
| Constant | Value | Purpose | |
|---|---|---|---|
A2UI_EXTENSION_BASE_URI | URI string | Base URI for the A2UI extension | |
AGENT_EXTENSION_ACCEPTS_INLINE_CATALOGS_KEY | str | Metadata key for inline catalog support | |
AGENT_EXTENSION_SUPPORTED_CATALOG_IDS_KEY | str | Metadata key for supported catalog IDs |
Usage in This Project
DataPart Helpers — a2ui.a2a.parts
Converts A2UI message dictionaries to/from A2A DataPart objects.
Functions
| Function | Signature | Purpose | |
|---|---|---|---|
create_a2ui_part | (message: dict) → Part | Wrap a single A2UI message dict as an A2A DataPart | |
parse_response_to_parts | (response: Any) → List[Part] | Parse a complete response into A2A parts | |
stream_response_to_parts | (response: AsyncIterable) → AsyncIterable[Part] | Stream response chunks as A2A parts | |
get_a2ui_datapart | (parts: List[Part]) → Optional[DataPart] | Extract the first A2UI DataPart from a list | |
is_a2ui_part | (part: Part) → bool | Check if a part is an A2UI DataPart | |
has_a2ui_parts | (parts: List[Part]) → bool | Check if any part is A2UI |
Constants
| Constant | Value | Purpose | |
|---|---|---|---|
A2UI_MIME_TYPE | MIME type string | Content type for A2UI DataParts |
Usage in This Project
Protocol Constants — a2ui.schema.constants
Tags & Delimiters
| Constant | Value | Purpose | |
|---|---|---|---|
A2UI_OPEN_TAG | '<a2ui-json>' | Opening delimiter for A2UI JSON blocks | |
A2UI_CLOSE_TAG | '</a2ui-json>' | Closing delimiter for A2UI JSON blocks | |
A2UI_SCHEMA_BLOCK_START | String | Start marker for schema section in prompts | |
A2UI_SCHEMA_BLOCK_END | String | End marker for schema section in prompts |
Workflow Rules
| Constant | Value | Purpose | |
|---|---|---|---|
DEFAULT_WORKFLOW_RULES | Multi-line string | Standard rules for A2UI response format |
Key rules from DEFAULT_WORKFLOW_RULES:
- Responses can contain one or more A2UI JSON blocks
- Each block wrapped in
<a2ui-json>/</a2ui-json>tags - Conversational text allowed between/around blocks
- JSON must validate against the provided schema
- Top-down component ordering within
componentslists
Version Constants
| Constant | Value | Purpose | |
|---|---|---|---|
VERSION_0_8 | "0.8" | Protocol version 0.8 | |
VERSION_0_9 | "0.9" | Protocol version 0.9 (current) | |
SPEC_VERSION_MAP | dict | Maps version → schema file paths |
Other Keys
| Constant | Purpose | |
|---|---|---|
A2UI_CLIENT_CAPABILITIES_KEY | Metadata key for client capabilities | |
CATALOG_COMPONENTS_KEY | Key for components in catalog schema | |
CATALOG_ID_KEY | Key for catalog identifier | |
CATALOG_SCHEMA_KEY | Key for catalog schema content | |
CATALOG_STYLES_KEY | Key for catalog styles | |
INLINE_CATALOGS_KEY | Key for inline catalog definitions | |
SUPPORTED_CATALOG_IDS_KEY | Key for supported catalog IDs list | |
SURFACE_ID_KEY | Key for surface identifier |
Usage in This Project
Catalog System — a2ui.schema.catalog
A2uiCatalog
Loaded catalog with methods for rendering and pruning.
| Method | Signature | Purpose | |
|---|---|---|---|
render_as_llm_instructions | () → str | Render the catalog as LLM-readable instructions | |
with_pruning | (allowed_components?, allowed_messages?) → A2uiCatalog | Return filtered copy | |
load_examples | (path?, validate?) → str | Load example JSON from path |
CatalogConfig
Configuration for loading a catalog.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/a2ui-agent-sdk/SKILL.md
Popularity
- Repository stars
- 66
- Repository forks
- 7
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/gskinnerteam/flutter-hatcha-app/a2ui-agent-sdk)