Skip to main content

Python client for Nexez agent discovery, checkout validation, and negotiation handoff.

Project description

Nexez Python Agent SDK

Dependency-free Python client for buyer agents and agent builders that need to discover Nexez pages, read structured seller context, validate checkout, or submit negotiation intent.

python -m pip install -e sdk/python
from nexez_agent_sdk import create_client

nexez = create_client(buyer_agent="example-python-agent")

matches = nexez.search(
    "book a strategy session next week",
    location="Chicago, IL",
    limit=5,
)

first = matches["results"][0]
page = nexez.get_agent_page(first["page"]["slug"])

validation = nexez.validate_checkout(
    slug=first["page"]["slug"],
    offer=first["offer"]["key"] if first.get("offer") else "services-0",
    query="Buyer wants a strategy session next week.",
)

API

  • create_client(**options) - create a client. Defaults to https://nexez.app.
  • search_nexez(query, **options) - search published agent pages by buyer intent.
  • get_agent_page(slug, **options) - fetch /{slug}/agent.json.
  • validate_checkout(payload=None, **kwargs) - dry-run checkout through /api/checkout.
  • validate_negotiation(payload=None, **kwargs) - dry-run proposal validation through /api/negotiations.
  • submit_negotiation(payload=None, **kwargs) - submit a buyer proposal after user approval.

Client methods accept Pythonic snake_case aliases for API fields:

  • buyer_agent -> buyerAgent
  • buyer_email -> buyerEmail
  • buyer_name -> buyerName
  • buyer_reference -> buyerReference
  • requested_terms -> requestedTerms
  • negotiation_id -> negotiationId
  • status_token -> statusToken

Safety

Use validate_checkout or validate_negotiation before side-effecting actions. Only call submit_negotiation after the buyer has approved the proposal details.

Tests

python -m unittest discover -s sdk/python/tests

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

nexez_agent_sdk-0.1.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

nexez_agent_sdk-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nexez_agent_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 557ae1cde7e584083dfc7237877917148f3f9ef54a463d2ba9fe6c7f109e29bc
MD5 ea46cb2c205b625148a8bf4342dfad96
BLAKE2b-256 d35e2063ecf5f708c17ddcc234af8e3f0ca8d642125a31f76d91daa834bc8367

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nexez_agent_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e41c359770792131d713b734948014d57727a970920b8aa8cdc773a1eedb08c
MD5 286cc577f7fd29c9b1dd43ca3477d494
BLAKE2b-256 9aa304d59c4ac74d336d338375213ac9884f04c907f73651a638b053f492931d

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