.agent is an open specification for writing, distributing, and running autonomous agents across any hardware or model, locally or in the cloud. One file. Your rules.
Building an agent on Gemini locks you into Gemini. Porting it to Claude requires a rewrite. Deploying on-device versus cloud requires another. Every vendor has its own prompt schema, its own tool-calling convention, its own governance model. The result is M×N integrations: custom glue for every combination of framework and runtime.
This is the same fragmentation that defined the browser wars. Docker solved it for software distribution. .agent proposes the same separation for AI agents: decouple the agent from the runtime that executes it. Write the behavior once. The spec handles the rest.
The .agent format separates deterministic governance from probabilistic reasoning: the part a machine can guarantee from the part only a model can infer.
Human-readable orchestration in .behavior: flat state machines, explicit intent routing, auditable by anyone. Compiled WebAssembly modules handle deterministic logic for performance-sensitive or IP-protected operations. The spec transpiles to LangGraph, Apple Intents, or Azure Agents without touching the intelligence layer.
Every agent declares upfront what it needs (data access), what it can do (named capabilities backed by tools, scripts, or MCP calls), and what it returns (typed outputs). Capabilities are explicit, named, and callable by other agents. The runtime enforces these contracts before execution starts, not after something goes wrong. Smart routing selects the appropriate model tier based on declared effort: local SLM for lightweight tasks, frontier model for complex reasoning.
Credentials never reach the agent. The host runtime mediates all tool and script calls, and no resource is accessed without explicit declaration in the Consume contract and user approval. All logic runs in WASI-compliant sandboxed environments with no implicit host access.
A .agent file bundles the definition and the behavior: the public contract and its implementation, state by state, auditable and portable.
All logic runs in WASI-compliant isolated environments with no implicit host access.
No resource is accessed unless declared in the Consume contract and approved by the user. Headless devices delegate approval to a linked trusted device.
Agent state is scoped to its sandbox with no access to the host filesystem.
All HTTP traffic routes through the host runtime. Agent code has no direct outbound access.
Tool and script calls route through the host runtime. The agent never handles credentials directly.
Primitive types are anchored to Wikidata and schema.org categories, keeping contracts semantically stable across runtimes.