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-sdk

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.1.tar.gz (6.8 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.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oacp_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for oacp_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b5b1aa0a14ada4669b53ff5faaab8244765dd164ad14e74ef38d57cd5c99c089
MD5 690fdecf9e3838c5d8b0da3b1965f89c
BLAKE2b-256 bd3b409469858ff383a89406de52004eafc85f48c14b98719bc45b64b9c525de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oacp_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for oacp_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b263315df75dcf9b4b3c650ada3e1f6678ff4aae119c816cc4ae9b2c191f28c3
MD5 f4e1d6d973bcf93b53da6623bd854a40
BLAKE2b-256 d421e384367a13ccaad8b7aa69e765b730b2ad526d1b6c4350420592c5b30318

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