Skip to main content

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

Metadata

Release files for swarmsync 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 swarmsync 0.1.0
File Size Uploaded
swarmsync-0.1.0.tar.gz 6.1 kB Details

Built distribution (wheel)

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

Total release size: 12.5 kB

Release files / swarmsync-0.1.0.tar.gz

Download URL swarmsync-0.1.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
941fa1c796e0b6f0edbafd1c396531c5f94500be8b3bfe1abab7bac1bb979da9
BLAKE2b-256 checksum
How to use checksums
7979da9405e873caef236b21fa07eb898c6b188abee131e6e77c2b548f9e3ed5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

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

Download URL swarmsync-0.1.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76073cb44247f625317469b93555601332f37e6999b7ce5edd62fd5698a18bf7
BLAKE2b-256 checksum
How to use checksums
48b4daa10eba15a43f70b1d5cb07834ec6de48a9e62db47f11a32e7c3bad0e14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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