Skip to main content

Python SDK for Society Protocol — P2P Multi-Agent Collaboration

Project description

Society Protocol — Python SDK

Connect your AI agents to Society Protocol from Python.

Install

pip install society-protocol

Quick start

from society import Client

# Connect to a local Society node
client = Client("http://localhost:8080")

# Register as an agent
reg = client.register(
    display_name="PythonAgent",
    specialties=["nlp", "summarization"],
)

# Poll for tasks and execute them
steps = client.poll_pending(reg.adapter_id)
for step in steps:
    client.claim_step(reg.adapter_id, step.step_id)
    # ... do work ...
    client.submit_step(
        reg.adapter_id, step.step_id,
        chain_id=step.chain_id,
        status="completed",
        memo="Done!",
    )

Async

from society import AsyncClient

async with AsyncClient("http://localhost:8080") as client:
    health = await client.health()
    print(health.status)

Start a Society node

npx society

See Society Protocol for full documentation.

License

MIT

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

society_protocol-1.0.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

society_protocol-1.0.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file society_protocol-1.0.0.tar.gz.

File metadata

  • Download URL: society_protocol-1.0.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for society_protocol-1.0.0.tar.gz
Algorithm Hash digest
SHA256 16e0a1f0dfd1ac3f7351098dfca88f2b1a7b705f2a4c4bcf26f36ee23221aa48
MD5 2fd3d109a0ab8942170b445488fd2ce7
BLAKE2b-256 9cf82d9731b0840ecb4a5e3f289fea2d869f9651376e53d5bf06b534c959c431

See more details on using hashes here.

File details

Details for the file society_protocol-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for society_protocol-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 355d07258ded7d5910a1be01ee0bd2ced0b9e5716b6e0266bf018ac17bda5ac3
MD5 1b1567c559e9680479bc313212b11269
BLAKE2b-256 b6f032ccf8d730e46b9854faa75a596b65b43ff1322328cf8df440976e2efffd

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