Open Agent Protocol — a routing layer for inter-agent task handoff
Project description
OAP — Open Agent Protocol
A lightweight routing layer for passing tasks between AI agents.
OAP defines a standard envelope format (TaskEnvelope) and a router that dispatches tasks to the right agent based on capabilities or explicit handoff instructions.
Installation
pip install open-agent-protocol
Quick start
from oap import TaskEnvelope, OAPRouter
from oap.adapters.http import HTTPAdapter
router = OAPRouter()
router.register(
"research-agent",
HTTPAdapter(agent_id="research-agent", base_url="http://localhost:9000"),
capabilities=["research", "search", "find"],
)
envelope = TaskEnvelope(goal="research the best vector databases")
result = await router.route(envelope)
print(result.memory["last_result"])
CLI
# Create a new task envelope
oap init "research the best vector databases" --output task.json
# Route it to an HTTP agent
oap register research-agent http://localhost:9000 --capabilities "research,search" task.json --output result.json
# Inspect the result
oap inspect result.json
# Validate envelope structure
oap validate result.json
# Route using built-in demo agents
oap route task.json
# List demo agents
oap agents
Concepts
- TaskEnvelope — the standard task object passed between agents. Contains the goal, memory, steps taken, and optional constraints.
- OAPRouter — selects the best registered agent for a given envelope and invokes it.
- AgentAdapter — translates between the envelope format and an agent's native interface.
- HTTPAdapter — built-in adapter for agents that expose a
POST /invokeendpoint.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file open_agent_protocol-0.2.0.tar.gz.
File metadata
- Download URL: open_agent_protocol-0.2.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88022686653e08df94d006bc367b90b5c856ec3286401576e36b78cacc5f8a88
|
|
| MD5 |
a6e0e0efa8977b2168b757b207e393b4
|
|
| BLAKE2b-256 |
92c55adc15432b64ed9cd0a634b94dba285d25582803e4fb57445575969ee2b7
|
File details
Details for the file open_agent_protocol-0.2.0-py3-none-any.whl.
File metadata
- Download URL: open_agent_protocol-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc1a891543da6dc655953d78765157a5c0eb0a65ff434518ea0594bcb0513030
|
|
| MD5 |
b51fff1dae025e952b802f0833011b49
|
|
| BLAKE2b-256 |
d12a4165b1ab398e71aa6affda567e8da4fdcc201b1ced5087763a33f54b9d28
|