Unified resource protocol for AI Agents | AI Agent 统一资源协议
ARP (Agent Resource Protocol) is a URL scheme designed specifically for AI Agents to reference and access resources in a unified way. It separates what a resource is from how to get it.
arp:{semantic}:{transport}://{location}
| Component | Description | Examples |
|---|---|---|
semantic |
What the resource is | text, json, image, prompt |
transport |
How to fetch it | https, http, file, s3 |
location |
Where to find it | example.com/file.txt, /local/path |
arp:text:https://example.com/readme.txt
arp:json:file:///config/settings.json
arp:image:s3://bucket/avatar.png
arp:prompt:https://prompts.example.com/assistant.md
- Semantic layer: Defines how to interpret the content
- Transport layer: Defines how to fetch the content
- Location: Defines where the content is
Both semantic and transport layers are extensible:
arp:{custom-semantic}:{custom-transport}://{location}
Designed for AI Agents to:
- Declare resource dependencies explicitly
- Abstract away infrastructure details
- Enable unified resource management
| Type | Description | Content |
|---|---|---|
text |
Plain text | String |
json |
JSON data | Parsed object |
image |
Image file | Binary/Base64 |
prompt |
Prompt template | String with variables |
| Type | Description |
|---|---|
audio |
Audio content |
video |
Video content |
code |
Source code with syntax |
embedding |
Vector embedding |
| Type | Description |
|---|---|
https |
HTTPS protocol |
http |
HTTP protocol |
file |
Local filesystem |
| Type | Description |
|---|---|
s3 |
AWS S3 |
gcs |
Google Cloud Storage |
ipfs |
IPFS protocol |
arr |
Agent Resource Registry |
┌─────────────────────────────────────────────────────────┐
│ ARP URL │
│ arp:text:https://example.com/file.txt │
└─────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ Parse │
│ semantic: text, transport: https, location: ... │
└─────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ Transport Layer │
│ fetch(location) → Buffer │
└─────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ Semantic Layer │
│ parse(buffer) → Resource │
└─────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ Resource │
│ { type, content, meta } │
└─────────────────────────────────────────────────────────┘
The reference implementation is ResourceX.
npm install resourcexjsimport { createResourceX } from "resourcexjs";
const rx = createResourceX();
const resource = await rx.resolve("arp:text:https://example.com/file.txt");This specification follows Semantic Versioning.
Current Version: 0.1.0
ARP is part of the Deepractice AI Agent infrastructure: