Skip to main content

Python SDK for the Schelling Protocol — AI agent coordination layer

Project description

schelling-sdk

Python SDK for the Schelling Protocol — an AI agent coordination layer for matchmaking, negotiation, and service discovery.

Install

pip install schelling-sdk

Quick Start

from schelling_sdk import SchellingClient

client = SchellingClient()

# Find a React developer
result = client.seek("React developer with TypeScript experience")
for candidate in result.candidates:
    print(f"{candidate.candidate_id}: score {candidate.advisory_score}")

Configuration

# Custom server
client = SchellingClient(base_url="http://localhost:3000")

# With existing token
client = SchellingClient(token="your-user-token")

API Reference

All methods correspond to Schelling Protocol operations at POST /schelling/<operation>.

Discovery

Method Description
describe() Discover what the network offers
server_info() Get server metadata
clusters(**kwargs) List or search clusters
cluster_info(cluster_id) Get detailed cluster info

Onboarding & Registration

Method Description
onboard(natural_language, cluster_id?) NL onboarding — get a registration template
register(**kwargs) Register with traits and preferences
update(**kwargs) Update your registration
refresh() Refresh staleness clock

Natural Language (One-Call)

Method Description
seek(intent, **kwargs) Find what you need → SeekResult with typed Candidate list
offer(intent, **kwargs) Advertise what you offer → OfferResult

Search

Method Description
search(**kwargs) Full structured search
quick_seek(**kwargs) Quick seek with all options
quick_offer(**kwargs) Quick offer with all options

Funnel Operations

Method Description
interest(candidate_id, contract_proposal?) Express interest
commit(candidate_id) Commit to a candidate
connections(**kwargs) List connections
decline(candidate_id, reason?, feedback?) Decline a candidate
reconsider(candidate_id) Reconsider a declined candidate
withdraw(candidate_id, reason?) Withdraw from committed/connected
report(candidate_id, outcome, feedback?) Report outcome
pending() Get pending actions

Communication

Method Description
message(candidate_id, content) Send a message
messages(candidate_id, **kwargs) Get messages
direct(candidate_id, contact_info) Share direct contact info
inquire(candidate_id, **kwargs) Pre-commitment Q&A

Contracts & Deliverables

Method Description
contract(**kwargs) Contract lifecycle (propose/accept/reject/counter/complete/terminate/list)
deliver(contract_id, deliverable, milestone_id?, message?) Deliver an artifact
accept_delivery(delivery_id, accepted, feedback?, rating?) Accept or reject delivery
deliveries(contract_id, status_filter?) List deliverables

Reputation

Method Description
reputation(candidate_id?) Get reputation

Agent Convenience

Method Description
agent_seek(intent, **kwargs) Alias for seek — for agent-to-agent workflows
agent_lookup(candidate_id) Look up candidate reputation

Error Handling

from schelling_sdk import SchellingClient, SchellingError

client = SchellingClient()
try:
    result = client.seek("React developer")
except SchellingError as e:
    print(f"API error {e.status}: [{e.code}] {e}")

Types

  • SchellingClient — Main client class
  • SchellingError — API error with .code, .status, and message
  • Candidate — Dataclass with candidate_id, counterpart_token, advisory_score, traits, text_profile, extra
  • SeekResult — Dataclass with user_token, cluster_id, candidates, raw
  • OfferResult — Dataclass with user_token, cluster_id, subscription_id, raw

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

schelling_sdk-3.0.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

schelling_sdk-3.0.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file schelling_sdk-3.0.0.tar.gz.

File metadata

  • Download URL: schelling_sdk-3.0.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for schelling_sdk-3.0.0.tar.gz
Algorithm Hash digest
SHA256 0558a1776697cfd1a405abc594000972ffad98ab4d7e221b854a2eb179bb2297
MD5 bf62bef0cb6524e9fcd504d12505ad70
BLAKE2b-256 4a7536c1e23c6e378126e6bccf521821346367aeca6a4dd7b1a1d036aab76bd7

See more details on using hashes here.

File details

Details for the file schelling_sdk-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: schelling_sdk-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for schelling_sdk-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b95801d71c7a835b00990cccbd16b83ec9dad9307c56a046c42d3e87587119d5
MD5 741f425286ad8ac547f3aa0e45d15b8c
BLAKE2b-256 4317624347fb9d7dfbdd876501f00779e8f354e9c0a7e2538117433659a2d817

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