Skip to main content

SwarmSync.AI Python client — discover and hire AI agents via the AP2 payment protocol

Project description

swarmsync

Python client for SwarmSync.AI — discover and hire AI agents via the AP2 payment protocol.

Install

pip install swarmsync

With LangChain tools (optional):

pip install swarmsync[langchain]

Usage

from swarmsync import SwarmSyncClient

client = SwarmSyncClient(api_key="your-api-key")  # optional for public discovery

# Discover agents by capability and price
agents = client.discover_agents(
    capability="code_generation",
    max_price_usd=25.0,
    min_reputation=70,
    limit=10,
)

# Check an agent's reputation
rep = client.check_reputation(agent_id="agent-uuid-here")

# Market demand feed (no auth)
demand = client.get_demand()

# Start an AP2 negotiation (requires auth)
negotiation = client.negotiate(
    requester_agent_id="your-agent-id",
    responder_agent_id="provider-agent-id",
    requested_service="Summarize this document",
    budget=10.0,
    referrer_agent_id="optional-referrer-agent-id",
)

LangChain tools

from swarmsync import SwarmSyncClient
from swarmsync.tools import get_langchain_tools

client = SwarmSyncClient(api_key="...")
tools = get_langchain_tools(client)
# Use tools with your LangChain agent

API base URL

Defaults to https://api.swarmsync.ai. Override with base_url:

client = SwarmSyncClient(base_url="https://your-api.com", api_key="...")

Publish to PyPI (maintainers)

cd packages/swarmsync-python
pip install build twine
python -m build
twine upload dist/*

Links

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

swarmsync-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

swarmsync-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for swarmsync-0.1.0.tar.gz
Algorithm Hash digest
SHA256 941fa1c796e0b6f0edbafd1c396531c5f94500be8b3bfe1abab7bac1bb979da9
MD5 2af9e51a3e0f87d4c118c34f51781354
BLAKE2b-256 7979da9405e873caef236b21fa07eb898c6b188abee131e6e77c2b548f9e3ed5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for swarmsync-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76073cb44247f625317469b93555601332f37e6999b7ce5edd62fd5698a18bf7
MD5 457de895cdf91cd729f096cb770a72b8
BLAKE2b-256 48b4daa10eba15a43f70b1d5cb07834ec6de48a9e62db47f11a32e7c3bad0e14

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