vlt / affordances
  • Quickstart
  • Concepts
  • Guides
  • Reference
  • Overview
    • Overview
    • Reference
  1. Reference
  2. /
  3. API reference
  4. /
  5. @affordances/protocol

@affordances/protocol

The Affordances protocol: TypeScript types and zod schemas for graphs, calls, deltas, and the site index, the JSON Schemas generated from them, the protocol constants, and the normative spec.md. The other Affordances packages import their types from here.

Terminal
vlt install @affordances/protocol
TypeScript
import { Delta, Graph, MEDIA_TYPE } from '@affordances/protocol'

const response = await fetch('https://store.example.com/products/tee', {
  headers: { accept: MEDIA_TYPE },
})
const graph = Graph.parse(await response.json())

The JSON Schemas are at @affordances/protocol/schemas/*.json, example documents at @affordances/protocol/fixtures/*, and the spec at @affordances/protocol/spec.md.

Read the protocol: https://github.com/vltpkg/affordances/blob/main/apps/docs/content/protocol.mdx


PreviousReferenceNextReference

Make your app agent-operable

Give every page a graph and every server action an agent path: HTTP, WebMCP, and MCP, with the same session and the same checks. One command sets it up.

Read the quickstart