open specs · typescript runtime · any library

Composable primitives for composable agents.

Tools, skills, agents, knowledge, workflows and policies: every part of an agent defined once, as a file with a declared contract. Use them with Mastra, the Vercel AI SDK, MCP, or your own stack. Open numbered specs; a TypeScript runtime that loads, runs, and projects them.

npm i @agentproto/tool @agentproto/driver

Apache-2.0 · running coding agents? → start here

one contract, many hosts

Define once. Run in any framework.

A tool declares its contract: schemas, side-effects, approval class. Implementations are drivers: in-process, CLI, HTTP, MCP. The same tool projects into whichever host you build with, so a new framework is a projection, not a rewrite.

import { defineTool } from "@agentproto/tool"
import { implementTool } from "@agentproto/driver"
import { z } from "zod"

const greet = defineTool({
  id: "greet",
  inputSchema: z.object({ name: z.string() }),
  outputSchema: z.object({ greeting: z.string() }),
})

const impl = implementTool(greet, async ({ input }) => ({
  greeting: `Hello ${input.name}`,
}))
// Mastra
toMastraTool(impl)
// Vercel AI SDK
toAiSdkTool(impl)
// MCP / CLI / HTTP
serveTool(impl)

the registry

Everything an agent is, as files with contracts

Every serious agent system converged on the same shape: a folder of markdown files the agent reads, writes, and runs from. The AIP specs give that shape a shared vocabulary: one numbered spec per primitive, aligned with the de-facto standards (SKILL.md as Anthropic shipped it, AGENTS.md, CLAUDE.md), not forks of them. Organised below by the question each layer answers; each spec links to its full text and lifecycle status.

Process: how does the standard itself evolve?

How AIPs are proposed, reviewed, and graduated. Read these first if you want to contribute a spec.

Primitives: what building blocks does everything else compose with?

Small, reusable pieces. Every other layer references at least one of these: collections, refs, IO blocks, secrets, process boundaries.

#TitleStatusRequires
AIP-16IO.md — shared input/output schema blocksReview·
AIP-17RUNNER.md — shared process boundary blockReview·
AIP-18COLLECTION.md — collections/v1 (typed collections + items)Review·
AIP-19SECRETS.md — secret inventory + reveal contractReview·
AIP-35STORAGE.md — agentstorage/v1 (storage policy block)Review·
AIP-36SANDBOX.md — agentsandbox/v1 (compute environment policy block)Review·
AIP-37LIFECYCLE.md — agentlifecycle/v1 (event vocabulary)Review·
AIP-38POLICY.md — agentpolicy/v1 (composable policy block)Review·
AIP-39ACTION.md — agentaction/v1 (verb primitive)Review·
AIP-41ROUTINE.md — agentroutine/v1 (recurring schedule + target)Review·
AIP-43REGISTRY — agentregistry/v1 (handle catalog primitive)Review·
AIP-49WALLET — agentwallet/v1 (principal-owned multi-asset wallet)Review·
AIP-51PROCESSOR — agentprocessor/v1 (I/O transform primitive)Review·
AIP-54REF — ref/v1 (typed cross-AIP artifact reference)Review·
AIP-55PRODUCT — product/v1 (pricing capability attached via AIP-54 ref)Review·
AIP-56DOCTYPE — the `createDoctype` meta-factory for `defineX` constructorsReview·
AIP-57MODEL-ROUTING — modelrouting/v1 (model resolution primitive)Review·
AIP-58RUN — agentrun/v1 (run resource, state machine, workspace, event log, journal)Review·
AIP-62REVIEW.md: agentreview/v1 (attested verdicts over a content range)Review·
AIP-61INFERENCE — inference-endpoint/v1 (spawnable model-serving resource, provider interface, session binding, local-only privacy)Draft·
AIP-64PACK.md, pack/v1 (the installable capability bundle: plugin, apps, knowledge, playbook, pricing)Draft·
AIP-27REF.md — agentref/v1 (composable reference primitive)Superseded·

Identity: who acts?

How an agent describes itself: its profile, capabilities, persona. The shell that the rest of the layers attach to.

Memory: what does the agent remember between runs?

Knowledge an agent maintains, lessons it distils from experience, prompt overlays it carries forward. Memory turns one-shot agents into ones that compound.

Work, Org & Governance: what gets done, where, and under what rules?

Companies, agencies, work items, offices, assemblies, and the governance layer that records approvals and audit trails. The coordination substrate.

Capabilities: what can the agent do?

Skills, tools, workflows, intents: the declared surface of what an agent or its tools expose. Intent vs implementation: capabilities declare intent.

Drivers: how are capabilities actually implemented?

The DRIVER supertype and its concrete subtypes (CLI, HTTP, MCP, SDK). One tool, many drivers; the routing layer that connects intent to execution.

Surfaces: what does the agent produce or read?

Visual and code surfaces: design tokens, canvas templates, code workspaces. The artifacts agents author or consume on the human-facing edge.

why files, why contracts

Agents that improve their own components

Because every component is a file with a declared contract, an agent can extend itself with ordinary file operations, no research project, no plugin API. Self-modification becomes a write_file call the runtime can validate and you can gate.

  • Add a tool

    Write a TOOL.md contract and a DRIVER.md implementation to disk. The runtime picks them up.

  • Swap a provider

    One tool, many drivers: add a second driver and update policy. No caller changes.

  • Fix a bug in itself

    Edit the driver body, rerun the contract's validators, ship it behind the same checks as any other change.

the human gateway

Primitives need a place to run. And someone needs to see them.

The agentproto CLI + daemon run your coding agents in the background: Claude Code, Codex and open models in one list, terminal or web. Check each one's work before it's committed. Built entirely on the primitives above.

npm i -g @agentproto/cli
agentproto serve
Get started: run & supervise agents →

errata, in advance

What's real vs. roadmap

The tool/driver primitives, the CLI, fifteen agent adapters, and the orchestration/supervision layer (nested orchestration, policy gates, fan-in monitoring, MCP composition) are live and used hands-on. The wider AIP spec family beyond that is an open roadmap. Most of those packages are early scaffolding, not finished implementations. We'd rather say that plainly than have you find out the hard way.

Full features breakdown →