gskinnerteam/flutter-hatcha-app/a2ui-agent-sdk

Claude Code and agent skill by gskinnerteam/flutter-hatcha-app

Trust tier 2
  • community
LLM review pending
Source check pending

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-sdk

SKILL.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 SendA2uiToClientToolset with Google ADK
Prerequisite: Read the ai-system skill for the Two-Layer AI Architecture context and how Python agents use this SDK within the hatcha_agent.

Package Structure

a2ui/
├── inference_strategy.py # Abstract InferenceStrategy base
├── a2a/
│ ├── extension.py # A2UI A2A extension negotiation
│ └── parts.py # DataPart creation/parsing/streaming
├── adk/
│ └── send_a2ui_to_client_toolset.py # ADK toolset (experimental)
├── basic_catalog/
│ ├── constants.py # BASIC_CATALOG_NAME, version paths
│ └── provider.py # BundledCatalogProvider, BasicCatalog
├── parser/
│ ├── streaming.py # A2uiStreamParser base
│ ├── streaming_v08.py # v0.8 tag-delimited parser
│ ├── streaming_v09.py # v0.9 tag-delimited parser
│ ├── payload_fixer.py # JSON repair utilities
│ └── response_part.py # ResponsePart model
├── schema/
│ ├── catalog.py # A2uiCatalog, CatalogConfig, providers
│ ├── catalog_provider.py # A2uiCatalogProvider interface
│ ├── constants.py # Tags, versions, workflow rules
│ ├── manager.py # A2uiSchemaManager
│ ├── validator.py # Schema validation
│ └── utils.py # Bundled resource loading
└── template/
└── manager.py # A2uiTemplateManager (not yet implemented)

A2uiSchemaManager

Primary class for generating system prompts with embedded catalog schemas and examples. Implements InferenceStrategy.

Constructor
python
from a2ui.schema.manager import A2uiSchemaManager
manager = A2uiSchemaManager(version="0.9", accepts_inline_catalogs=True)
ParameterTypePurpose
versionstrProtocol version ("0.8" or "0.9")
accepts_inline_catalogsboolWhether to accept inline catalog definitions from clients
Methods
MethodSignaturePurpose
generate_system_promptSee belowBuild a full system prompt with schema
get_selected_catalog(client_ui_capabilities?, allowed_components?, allowed_messages?) → A2uiCatalogGet catalog filtered by client capabilities
load_examples(catalog: A2uiCatalog, validate: bool = False) → strLoad example JSON for prompt injection
generate_system_prompt
python
prompt = manager.generate_system_prompt(
role_description="You are a party planning assistant...",
workflow_description="Ask the user questions one at a time...",
ui_description="Use cards and buttons for responses.",
client_ui_capabilities=None, # Dict from client metadata
allowed_components=None, # List of component names to include
allowed_messages=None, # List of message types to include
include_schema=False, # Embed full JSON schema
include_examples=False, # Embed example payloads
validate_examples=False, # Validate examples against schema
)
Usage in This Project
python
# agents/hatcha_agent/base_agent.py
from a2ui.schema.manager import A2uiSchemaManager
_SCHEMA_MANAGER = A2uiSchemaManager(version="0.9", accepts_inline_catalogs=True)
class BaseAgent:
def __init__(self, ...):
self.schema_manager = _SCHEMA_MANAGER

Extension Negotiation — a2ui.a2a.extension

Handles the A2UI extension handshake within the A2A protocol.

Functions
FunctionSignaturePurpose
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() → AgentExtensionReturns the AgentExtension object to include in the agent card
Constants
ConstantValuePurpose
A2UI_EXTENSION_BASE_URIURI stringBase URI for the A2UI extension
AGENT_EXTENSION_ACCEPTS_INLINE_CATALOGS_KEYstrMetadata key for inline catalog support
AGENT_EXTENSION_SUPPORTED_CATALOG_IDS_KEYstrMetadata key for supported catalog IDs
Usage in This Project
python
# agents/hatcha_agent/__main__.py
from a2ui.a2a.extension import get_a2ui_agent_extension
agent_card = AgentCard(
...
capabilities=AgentCapabilities(
extensions=[get_a2ui_agent_extension()],
streaming=True,
),
)
# agents/hatcha_agent/a2ui_protocol.py
from a2ui.a2a.extension import try_activate_a2ui_extension
def activate_a2ui_extension(context, agent_card):
return try_activate_a2ui_extension(context, agent_card) is not None

DataPart Helpers — a2ui.a2a.parts

Converts A2UI message dictionaries to/from A2A DataPart objects.

Functions
FunctionSignaturePurpose
create_a2ui_part(message: dict) → PartWrap 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) → boolCheck if a part is an A2UI DataPart
has_a2ui_parts(parts: List[Part]) → boolCheck if any part is A2UI
Constants
ConstantValuePurpose
A2UI_MIME_TYPEMIME type stringContent type for A2UI DataParts
Usage in This Project
python
# agents/hatcha_agent/a2ui_protocol.py
from a2ui.a2a.parts import create_a2ui_part
def messages_to_parts(messages, catalog_id=None):
return [create_a2ui_part(_flatten_message(m, catalog_id)) for m in messages]

Protocol Constants — a2ui.schema.constants

Tags & Delimiters
ConstantValuePurpose
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_STARTStringStart marker for schema section in prompts
A2UI_SCHEMA_BLOCK_ENDStringEnd marker for schema section in prompts
Workflow Rules
ConstantValuePurpose
DEFAULT_WORKFLOW_RULESMulti-line stringStandard 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 components lists
Version Constants
ConstantValuePurpose
VERSION_0_8"0.8"Protocol version 0.8
VERSION_0_9"0.9"Protocol version 0.9 (current)
SPEC_VERSION_MAPdictMaps version → schema file paths
Other Keys
ConstantPurpose
A2UI_CLIENT_CAPABILITIES_KEYMetadata key for client capabilities
CATALOG_COMPONENTS_KEYKey for components in catalog schema
CATALOG_ID_KEYKey for catalog identifier
CATALOG_SCHEMA_KEYKey for catalog schema content
CATALOG_STYLES_KEYKey for catalog styles
INLINE_CATALOGS_KEYKey for inline catalog definitions
SUPPORTED_CATALOG_IDS_KEYKey for supported catalog IDs list
SURFACE_ID_KEYKey for surface identifier
Usage in This Project
python
# agents/hatcha_agent/prompts/shared.py
from a2ui.schema.constants import A2UI_OPEN_TAG, A2UI_CLOSE_TAG, DEFAULT_WORKFLOW_RULES
A2UI_DELIMITER = f"{A2UI_OPEN_TAG}\n{{json}}\n{A2UI_CLOSE_TAG}"

Catalog System — a2ui.schema.catalog

A2uiCatalog

Loaded catalog with methods for rendering and pruning.

MethodSignaturePurpose
render_as_llm_instructions() → strRender the catalog as LLM-readable instructions
with_pruning(allowed_components?, allowed_messages?) → A2uiCatalogReturn filtered copy
load_examples(path?, validate?) → strLoad example JSON from path
CatalogConfig

Configuration for loading a catalog.

python
from a2ui.schema.catalog import CatalogConfig

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/gskinnerteam/flutter-hatcha-app/a2ui-agent-sdk/badge)](https://verified-skill.com/skills/gskinnerteam/flutter-hatcha-app/a2ui-agent-sdk)

Something wrong with this skill or its page? Tell us.