@autoagentprotocol/schemas
v1.2.0
Published
JSON Schema 2020-12 files for the Auto Agent Protocol
Downloads
344
Readme
@autoagentprotocol/schemas
The Auto Agent Protocol (AAP) JSON Schemas (2020-12) as importable modules — the source of truth for every AAP request, response, and shared object.
Install
npm install @autoagentprotocol/schemasUsage
import Ajv from "ajv";
import addFormats from "ajv-formats";
import { inventorySearchRequestSchema } from "@autoagentprotocol/schemas";
const ajv = new Ajv({ strict: false });
addFormats(ajv);
const validate = ajv.compile(inventorySearchRequestSchema);
if (!validate(payload)) {
console.error(validate.errors);
}Each schema is exported by its camelCased name (agentCardSchema, vehicleSchema, inventorySearchRequestSchema, …) for the current AAP version. The same schemas are hosted at autoagentprotocol.org/v1.2/schemas/ and documented on the spec site.
- Ready-made validator (library +
aap-validateCLI):@autoagentprotocol/validator - TypeScript types:
@autoagentprotocol/types
License
Apache-2.0
