@ag-ui/a2ui-toolkit (0.0.4)
Published 2026-09-23 18:27:27 +00:00 by ak
Installation
@ag-ui:registry=npm install @ag-ui/a2ui-toolkit@0.0.4"@ag-ui/a2ui-toolkit": "0.0.4"About this package
@ag-ui/a2ui-toolkit
Framework-agnostic helpers for building A2UI subagent tools.
Each per-framework adapter (LangGraph, ADK, Mastra, …) composes these helpers with its own framework-specific glue: tool decorator, runtime accessor, model binding + invoke. Nothing in this package depends on any agent framework.
Surface
- Constants:
A2UI_OPERATIONS_KEY,BASIC_CATALOG_ID,DEFAULT_SURFACE_ID,GENERATE_A2UI_TOOL_NAME,GENERATE_A2UI_TOOL_DESCRIPTION,GENERATE_A2UI_ARG_DESCRIPTIONS - Op builders:
createSurface,updateComponents,updateDataModel RENDER_A2UI_TOOL_DEF— JSON schema for the inner structured-output tool- State + history helpers:
buildContextPrompt,findPriorSurface - Prompt composer:
buildSubagentPrompt - High-level orchestration:
prepareA2UIRequest,buildA2UIEnvelope - Output wrappers:
assembleOps,wrapAsOperationsEnvelope,wrapErrorEnvelope
See also
The Python counterpart lives in
ag-ui-a2ui-toolkit and exposes the same
surface in snake_case.
Dependencies
Development Dependencies
| ID | Version |
|---|---|
| @arethetypeswrong/cli | ^0.17.4 |
| @types/node | ^20.11.19 |
| @vitest/coverage-istanbul | ^4.0.18 |
| publint | ^0.3.12 |
| tsdown | ^0.20.1 |
| typescript | ^5.3.3 |
| vitest | ^4.0.18 |