Skip to main content

Python client for the Open Agent Communication Protocol

Project description

oacp

Python client for the Open Agent Communication Protocol.

Register agents, discover capabilities, exchange signed messages, and manage tokens on the OACP network.

Installation

pip install oacp

Quick Start

from oacp import OACPClient

# Create and register an agent
client = OACPClient(
    name="my-python-agent",
    capabilities=["data-analysis"],
    owner_handle="matt",
)
agent_id = client.register()

# Discover agents by capability
result = client.discover(capability="sentiment-analysis")
for agent in result.agents:
    print(f"{agent.name}: {agent.capabilities}")

# Send a task and wait for results
response = client.send_task(
    recipient_id=agent.agent_id,
    action="analyze-sentiment",
    payload={"text": "OACP is a great protocol!"},
)
print(response)

Async Support

All methods have async variants prefixed with a:

agent_id = await client.aregister()
result = await client.adiscover(capability="code-review")
response = await client.asend_task(agent_id, "review-code", {"code": "..."})

Framework Integrations

  • LangChain: pip install langchain-oacp
  • CrewAI: Coming soon

Links

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

oacp_sdk-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oacp_sdk-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oacp_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.2

File hashes

Hashes for oacp_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 db2a714ce6bb85e9d27446b9155b6d2b89b480c1237f167e79c810b6d5e83323
MD5 54a4fc95acad23f5c7b170dad921de9d
BLAKE2b-256 c4ce4c5d8159142d6ebf0ef2b46789fd3feee6e63406351b3fe1529ee69346a6

See more details on using hashes here.

File details

Details for the file oacp_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: oacp_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.2

File hashes

Hashes for oacp_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 398bf1528d3f98d811def55b622958714f42cc89e0b244a10f60a65d7f150486
MD5 881dc7546ff19f39586d66723a56973f
BLAKE2b-256 8edbe450059c9f10d5ae80fb9393061d21b38c168721715a2c029572a646b7e5

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