Skip to main content

ovynox-sdk (Python)

Python counterpart to @ovynox/sdk (TypeScript) — same API surface, same scope. See that package's README for the full picture; this one is kept short since the two are meant to stay in lockstep.

Current scope (important)

Policy/probation checking, agent/policy management, approvals, and reputation lookup are all real. wrap_payment() is an intentional NotImplementedError stub — no real x402 payment execution happens via this SDK yet.

Install

Not yet published to PyPI — for now, use directly from this monorepo (pip install -e packages/ovynox-sdk-python).

Usage

from ovynox import Ovynox

client = Ovynox(api_key=os.environ["OVYNOX_API_KEY"], base_url="http://localhost:3000")

# external_agent_id is always auto-generated (globally unique) -- nothing
# external it would ever need to match
agent = client.register_agent(name="My purchasing agent")

client.set_spend_policy(
    agent["external_agent_id"],
    max_per_transaction=25,
    approval_threshold=100,
    block_list=["x402:agent:known-bad-actor-03"],
)

# Optional: describe the agent and where it can actually be reached, so
# other agents can discover it -- served (with real reputation folded
# in) at the public GET /api/v1/agents/:external_agent_id/agent-card.json
client.set_agent_card(
    agent["external_agent_id"],
    description="Buys market-data access on behalf of my company.",
    endpoint_url="https://my-agent.example.com/a2a",
)

result = client.check_transaction(
    external_agent_id=agent["external_agent_id"],
    amount=4.5,
    counterparty_agent_id="x402:agent:some-vendor",
)

if result["status"] in ("passed", "warned"):
    ...  # execute the real x402 payment yourself
elif result["status"] == "blocked":
    raise RuntimeError("blocked by spend policy")
elif result["status"] == "pending_approval":
    ...  # wait for approval, e.g. client.approve_transaction(result["transactionId"])

Discovering agents

directory = client.list_directory(sort="trust")  # or "active"
# Every agent with a real transaction history, no API key needed.

See examples/crewai_tool.py for wrapping check_transaction as a CrewAI tool.

Metadata

Release files for ovynox-sdk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ovynox-sdk 0.1.0
File Size Uploaded Provenance Actions
ovynox_sdk-0.1.0.tar.gz 6.8 kB Without provenance Details for ovynox_sdk-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ovynox-sdk 0.1.0
File Interpreter ABI Platform Actions
ovynox_sdk-0.1.0-py3-none-any.whl Python 3 none any Details for ovynox_sdk-0.1.0-py3-none-any.whl

Total release size: 13.8 kB

Release files / ovynox_sdk-0.1.0.tar.gz

Download URL ovynox_sdk-0.1.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c58731a7584d7197fc341185531428b88dbc27e0f6604d5fe55c099718dcbf64
BLAKE2b-256 checksum
How to use checksums
486b884c7c32688f3a79c92547ed8f15e847fbfbfe99d89e5ecf9e2e3125a5c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / ovynox_sdk-0.1.0-py3-none-any.whl

Download URL ovynox_sdk-0.1.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f142f5b43dc3ba82bbff111045f14a6b54bbde04b7a9bbd8a0d73564df5d8f3
BLAKE2b-256 checksum
How to use checksums
453101b5439542c6726a7830b35f5a14508bab1054190ecd8fed652b93357ca7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for ovynox-sdk 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page