Skip to main content

Interface Adapters

ANIP does not force you to choose between an agent-native interface and the rest of your API ecosystem. The same capability definitions that power ANIP can auto-generate REST, GraphQL, and MCP interfaces — all mounted on the same service.

Available adapters

AdapterWhat it generatesEndpoint
RESTOpenAPI spec + Swagger UI/api/*
GraphQLSDL schema + playground/graphql
MCPStreamable HTTP tools/mcp

Mounting adapters

All adapters mount with one line alongside native ANIP:

from anip_fastapi import mount_anip
from anip_rest import mount_anip_rest
from anip_graphql import mount_anip_graphql
from anip_mcp import mount_anip_mcp_http

mount_anip(app, service) # Native ANIP at /anip/*
mount_anip_rest(app, service) # REST at /api/*
mount_anip_graphql(app, service) # GraphQL at /graphql
mount_anip_mcp_http(app, service) # MCP at /mcp

What adapters provide vs. native ANIP

Adapters give conventional clients familiar interfaces, but the native ANIP surface remains the strongest path for agents that need:

FeatureREST/GraphQL/MCPNative ANIP
Invoke capabilitiesYesYes
Side-effect declarationNoYes
Permission discoveryNoYes
Delegation chainsNoYes
Cost signalingNoYes
Structured failure recoveryPartialFull
Audit + checkpointsNoYes

The adapters reduce the "build it twice" problem — your conventional API consumers get OpenAPI/GraphQL/MCP, while agents get the full ANIP execution context.