Skip to main content

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 /invoke endpoint.

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

open_agent_protocol-0.1.0.tar.gz (9.2 kB view details)

Uploaded Source

File details

Details for the file open_agent_protocol-0.1.0.tar.gz.

File metadata

  • Download URL: open_agent_protocol-0.1.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for open_agent_protocol-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fbab98ed8337656d3776931222c09e669efc26d21a274da5f24ecac61ef7c7a3
MD5 c5ed8ddc600b77feabc267efced2177b
BLAKE2b-256 eac11b182f13cc30fc862ccb91afcbab1e7f1461785d4e965882d2617529138b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page