logo

ANIP: An agent-native protocol with REST, GraphQL, and MCP adapters

Posted by samirka |4 hours ago |1 comments

samirka 4 hours ago

We’ve been working on a protocol proposal called ANIP: Agent-Native Interface Protocol.

The motivating question is: if the consumer is an autonomous agent rather than a human developer, what should the interface look like?

Most current APIs assume a human reads docs, writes deterministic code ahead of time, and handles auth / permissions / failures in application logic. Agents operate differently: they need to decide at runtime, often with partial authority, sometimes around money or irreversible actions. In practice that means they often discover critical constraints only after failure.

ANIP tries to move those constraints into the interface itself, so they are explicit, typed, and queryable before invocation:

- capability declarations - side-effect typing (read, write, irreversible, transactional) - rollback windows - cost signaling with certainty levels (fixed, estimated, dynamic) - delegation chains with scoped authority and purpose binding - structured failure semantics with machine-actionable resolution paths

The adoption argument that made this more interesting to us is that ANIP can also act as the source surface for other interfaces.

We built generic adapters that point at an ANIP service and auto-generate:

- REST/OpenAPI - GraphQL - MCP

So the claim is not just “here is a new protocol for agents.” It’s: for agent-facing systems, implementing an agent-native interface once may be a better foundation than building REST first and layering MCP on top later.

We’ve tried to be explicit about what is actually solved vs what is deferred:

- implemented in the reference servers: budget enforcement, scope narrowing, delegation-chain validation, concurrent-branch exclusivity, audit filtering by root principal, declared-vs-actual cost variance in audit data - available as an implementation choice but not a protocol guarantee: signed delegation tokens - deferred to future protocol work: cryptographic chain verification, side-effect contract testing, append-only / attestable audit integrity

So today this is best understood as trust-on-declaration within a trust boundary: internal systems, known services, controlled environments. Not “internet-scale trust is solved.”

Current repo includes:

- Python/FastAPI and TypeScript/Hono reference servers - REST/OpenAPI adapters - GraphQL adapters - MCP bridges - JSON Schema validators - explicit notes on translation loss in adapters vs native ANIP

Repo: https://github.com/anip-protocol/anip

Interested in critique from people who’ve dealt with:

- delegated authority for agents - audit/compliance around agent actions - multi-agent orchestration against existing APIs - side-effect / cost signaling for autonomous systems