Author: Prem Makeig @nxt3d Version: 0.1.0-beta Date: 11/8/2025
REST-AP is a protocol for AI agents to expose their capabilities via standard HTTP endpoints. Instead of building custom APIs for each agent, REST-AP provides a uniform interface that makes any AI agent discoverable and usable by other systems. Agents implement three core endpoints: discovery, conversation, and task execution.
-
Enable AI agents to expose their capabilities via simple HTTP endpoints.
-
Provide a standard way for agents to advertise their capabilities for discovery.
-
Enable other agents, applications, and humans to interact with AI agents reliably.
-
Support optional skill packages that help clients effectively use agent capabilities.
-
Defining a new transport. Use HTTP and HTTPS.
-
Replacing existing auth methods. Use whatever works for your use case.
Capabilities as Endpoints. In RESTβAP, a capability maps directly to a concrete HTTP endpoint. Each capability specifies the HTTP method, endpoint path, input/output schemas, and other metadata needed for proper API interaction.
-
AI Agent. An AI system that implements REST-AP endpoints to expose its capabilities.
-
Client. Any agent, application, or human that discovers and interacts with AI agents.
-
Capability. A declared operation with input/output description. For example, image.upscale.
-
Skill. A package following the Claude Code Skills standard that teaches clients how to effectively interact with AI agent endpoints. Skills use the exact same
SKILL.mdformat as Claude Code Skills. -
Catalog. A JSON document listing available capabilities and their endpoints.
REST-AP defines how AI agents expose their capabilities through standard HTTP endpoints.
-
Discovery. Agents publish their capabilities via
/.well-known/restap.jsonfor clients to discover. -
Talk. Agents implement
POST /talkas a one-directional entrypoint where the agent receives queries and triggers an LLM response. The client sends a message, and the agent processes it and responds. -
Execute. Agents implement capability endpoints that clients can call directly.
-
News. Agents implement
/newsas a single bidirectional endpoint for reading and writing updates. Unlike/talk,/newscommunications never trigger agent processing - it's purely passive storage and retrieval.
GET /.well-known/restap.json- DiscoveryPOST /talk- One-directional entrypoint (client β agent, triggers LLM response)/news- Single bidirectional endpoint:GET /news- Read updates (no processing)POST /news- Write messages/replies (no processing)
The critical distinctions between /talk and /news:
| Endpoint | Direction | Triggers Processing? | Use Case |
|---|---|---|---|
POST /talk |
One-directional (client β agent) | β Yes - Agent receives query and triggers LLM response | Send tasks/questions that need agent work |
GET /news |
Bidirectional (read) | β No - Just retrieves stored data | Poll for updates, read what's already happened |
POST /news |
Bidirectional (write) | β No - Just stores data, no processing | Send replies/messages without triggering work |
Key Points:
POST /talk: One-directional - client sends query, agent processes it and responds with LLM output/news: Bidirectional - can read (GET) and write (POST), but never triggers processing- Why this matters:
POST /newsprevents infinite loops. When Agent A sends a reply to Agent B viaPOST /news, Agent B doesn't process it - it's just stored. This allows agents to communicate without triggering endless processing cycles.
{
"restap_version": "1.0",
"agent": {
"name": "Text Analysis Agent",
"description": "AI agent specialized in text processing and analysis",
"contact": "agent@example.com"
},
"capabilities": [
{
"id": "talk",
"title": "Talk to agent",
"method": "POST",
"endpoint": "/talk",
"description": "Send messages to the agent (triggers LLM processing)"
},
{
"id": "news",
"title": "Poll for updates",
"method": "GET",
"endpoint": "/news",
"description": "Poll for task completion and updates (no LLM processing)"
},
{
"id": "news_receive",
"title": "Receive replies",
"method": "POST",
"endpoint": "/news",
"description": "Receive messages/replies from other agents (no LLM processing)"
},
{
"id": "text.echo",
"title": "Echo text back",
"method": "POST",
"endpoint": "/text/echo",
"description": "Returns the input text unchanged",
"input_schema": {
"type": "object",
"properties": {
"text": {"type": "string", "description": "The text to echo back"}
},
"required": ["text"]
},
"output_schema": {
"type": "object",
"properties": {
"job_id": {"type": "string"},
"original_text": {"type": "string"},
"echoed_text": {"type": "string"},
"timestamp": {"type": "string", "format": "date-time"}
}
},
"content_types": ["application/json"]
},
{
"id": "text.reverse",
"title": "Reverse text",
"method": "POST",
"endpoint": "/text/reverse",
"description": "Returns the input text in reverse order",
"input_schema": {
"type": "object",
"properties": {
"text": {"type": "string", "description": "The text to reverse"}
},
"required": ["text"]
},
"output_schema": {
"type": "object",
"properties": {
"job_id": {"type": "string"},
"original_text": {"type": "string"},
"reversed_text": {"type": "string"},
"timestamp": {"type": "string", "format": "date-time"}
}
},
"content_types": ["application/json"]
}
],
"packages": [
{
"name": "Text Processing Plugin",
"type": "claude-plugin",
"description": "Claude plugin with text processing skills and enhanced client libraries",
"language": "typescript",
"registry": "npm",
"package": "@example/text-tools",
"version": "^1.0.0",
"skill_file": "SKILL.md",
"homepage": "https://github.com/example/text-tools"
},
{
"name": "Text Processing SDK",
"type": "npm-package",
"description": "TypeScript SDK for programmatic text processing",
"language": "typescript",
"registry": "npm",
"package": "@example/text-sdk",
"version": "^1.0.0",
"homepage": "https://github.com/example/text-sdk"
}
]
}Note: Use the recommended format for advertising your package. Name and type are required fields, plus any additional metadata that helps clients understand and use your package effectively. Include download/installation information so clients know how to obtain the package.
Each capability in the catalog can include the following standard REST API fields:
- id: Unique identifier for the capability
- title: Human-readable name
- method: HTTP method (GET, POST, PUT, DELETE)
- endpoint: API endpoint path
- description: Human-readable description of what the capability does
- input_schema: JSON Schema describing the expected request body structure
- output_schema: JSON Schema describing the response body structure
- content_types: Array of accepted content types (e.g., ["application/json"])
The input/output schemas use standard JSON Schema format to provide precise API contracts for clients.
Agents can advertise optional packages that provide enhanced functionality for clients. The packages section is intentionally flexible to accommodate different integration approaches and standards. Package metadata should align with existing standards where they exist while remaining flexible for future agent integration patterns.
The packages section is not strictly defined - agents can use any package metadata that makes sense for their integration approach. However, aligning with existing standards is encouraged:
claude-plugin: Claude Code plugins containing skills, libraries, and tools (recommended for Claude integration)npm-package: Traditional npm packages with libraries and CLI toolspip-package: Python packages for agent integrationsdk: Language-specific SDKs with type safety and enhanced features
Package metadata should align with existing standards where they exist while remaining flexible for future agent integration patterns.
- π€ Behavioral Guidance (
claude-plugin): SKILL.md files teaching AI agents proper interaction patterns - π Code Libraries: Enhanced client libraries with helpers for agent communication
- π οΈ CLI Tools: Command-line utilities for testing and automation
- π Documentation: Guides, examples, and integration tutorials
- π§ Enhanced SDKs: Language-specific SDKs with type safety
- π Monitoring Tools: Logging, metrics, and debugging utilities
Scenario. A text analysis AI agent that implements REST-AP endpoints.
-
Discovery
GET /.well-known/restap.jsonReturns the catalog showing available capabilities.
-
Talk
POST /talk{"message": "What can you do?"}Response:
{"reply": "I can echo text and reverse text. Check the catalog for details."} -
Use a capability
POST /text/echo{"text": "Hello World"}Response:
{"job_id": "job_1", "original_text": "Hello World", "echoed_text": "Hello World"} -
Agent-to-Agent Communication Flow
Step 1: Agent 1 sends task to Agent 2
POST /talk(Agent 1 β Agent 2) - One-directional entrypoint{"message": "What are best practices for buttons?"}Response (Agent 2 receives query, triggers LLM processing, responds):
{ "query_id": "query_123", "status": "processing" }Note:
/talkis one-directional - the client sends a query, and the agent processes it and responds with LLM output.Step 2: Agent 2 sends reply to Agent 1
POST /news(Agent 2 β Agent 1){ "type": "reply", "from": "agent-b", "in_reply_to": "query_123", "message": "Best practices: Use clear labels, proper contrast, adequate spacing." }Response (Agent 1 receives this, no processing triggered):
{ "status": "received", "news_id": "news_1", "message": "Message stored successfully" }Step 3: Agent 3 checks what Agent 2 has been working on
GET /news(Agent 3 β Agent 2)Returns any completed jobs or status updates:
{ "items": [ { "type": "job.completed", "timestamp": 1703012345000, "job_id": "job_1", "query_id": "job_1", "data": { "query_id": "job_1", "result": {"original_text": "Hello World", "echoed_text": "Hello World"} } }, { "type": "reply", "timestamp": 1703012400000, "from": "agent-b", "in_reply_to": "query_123", "message": "Best practices: Use clear labels..." } ], "timestamp": 1703012350000 }Key Points:
POST /talkis one-directional - client sends query, agent receives it and triggers LLM responsePOST /newsdoes NOT trigger processing (Agent 1 just stores the reply)GET /newsdoes NOT trigger processing (Agent 3 just reads what's stored)/newsis a bidirectional endpoint (can read and write), but never triggers work
-
Client local function or CLI command acme news-updated() The client may expose:
- Use HTTPS for all requests
- Implement appropriate rate limiting
- Validate input data on both client and server
REST-AP provides a standard way for AI agents to expose their capabilities:
- Publish capabilities automatically via
/.well-known/restap.json - Enable conversations through the
/talkendpoint (one-directional: client sends query, agent responds with LLM output) - Handle task execution via capability-specific endpoints
- Report progress on operations via the
/newsendpoint (bidirectional: can read and write, but never triggers processing)
Unlike plain REST APIs, REST-AP standardizes how AI agents present themselves to the world.
The /news endpoint is a single bidirectional entrypoint that handles both reading and writing, with the critical property that it never triggers agent processing.
GET /news - Poll for updates (no processing)
- Read what's already happened - completed tasks, replies, notifications
- Supports
sinceparameter:GET /news?since=1703012345000to get only new items - Free to poll frequently (no LLM inference costs)
- Example: Agent 3 wants to know what Agent 2 has been working on β
GET /newsAgent 2
POST /news - Write messages/replies (no processing)
- Store messages/replies without triggering any agent work
- Used for sending replies back to the original sender
- Prevents infinite loops (unlike
/talkwhich triggers processing) - Example: Agent 2 sends reply to Agent 1 β
POST /newsAgent 1
Agent 1 β POST /talk β Agent 2
(Agent 2 processes the request)
Agent 2 β POST /news β Agent 1
(Agent 1 receives reply, no processing triggered)
Agent 3 β GET /news β Agent 2
(Agent 3 reads what Agent 2 has been working on)
The Flow:
- Agent 1 sends task:
POST /talkto Agent 2 β Agent 2 receives query, triggers LLM response (one-directional) - Agent 2 sends reply:
POST /newsto Agent 1 β Just stored, no processing (bidirectional write) - Agent 3 checks status:
GET /newsfrom Agent 2 β Reads updates, no processing (bidirectional read)
This design ensures that:
/talkis one-directional - client sends query, agent responds with LLM output/newsis bidirectional - can read (GET) and write (POST), but never triggers agent work/newsis purely passive - it's a communication channel that doesn't trigger any agent processing, making it safe for bidirectional communication without infinite loops
REST-AP enables AI agents to expose their capabilities in a standardized way:
- Publish capabilities via
/.well-known/restap.jsonfor easy discovery - Handle conversations through the
/talkendpoint (one-directional: receive queries, trigger LLM responses) - Execute tasks via capability-specific endpoints
- Report progress on long-running operations via
/news(bidirectional: can read and write, never triggers processing)
Any REST-AP compliant agent can be immediately discovered and used by other systems.
REST-AP enables AI agents to expose their capabilities, while packages provide different integration approaches:
- Agent Implementation: REST-AP defines how agents expose capabilities via HTTP endpoints
- Package Types: Different package types (
claude-plugin,npm-package, etc.) for various integration needs - Enhanced Tooling: Full SDKs, CLI tools, and monitoring for agent developers
This combination creates a complete ecosystem where AI agents can easily expose their capabilities and clients can choose the most appropriate integration method.