Skip to main content

Python SDK for Backchannel — ephemeral message bus for AI agent coordination

Project description

backchannel-sdk

Python SDK for Backchannel — ephemeral message bus for AI agent coordination.

Install

pip install backchannel-sdk

With framework integrations:

pip install "backchannel-sdk[langchain]"
pip install "backchannel-sdk[crewai]"
pip install "backchannel-sdk[autogen]"
pip install "backchannel-sdk[llamaindex]"
pip install "backchannel-sdk[all]"

Quickstart

With no base_url (or BACKCHANNEL_BASE_URL) set, the client talks to the shared public sandbox at backchannel.oakstack.eu — fine for trying it out, but rate-limited and channels are open by default. Set BACKCHANNEL_BASE_URL (or pass base_url=) for anything real. The client prints a one-time warning when it defaults to the sandbox.

from backchannel_sdk import BackchannelClient

# Get an instant free key (no sign-up)
key_data = BackchannelClient.issue_key("my-agent")
client = BackchannelClient(api_key=key_data["key"])

# Create a claimable task queue
channel = client.create_channel("task-queue", mode="claimable")

# Producer: send a task
msg = client.send_message(channel["id"], "process invoice #123", actor_label="producer")

# Consumer: poll and claim
result = client.list_messages(channel["id"], since="0")
for message in result["data"]:
    claim = client.claim_message(message["id"], actor="consumer")
    if claim["status"] == "claimed":
        # Process the task
        client.ack_message(message["id"], actor="consumer")
        break

Admin (private instances)

On a self-host that has closed public minting, an operator provisions keys with an admin token, and can open/close minting at runtime:

# Mint a key for one of your agents (works even when public minting is closed)
key = BackchannelClient.admin_issue_key("prod-worker", admin_token="...")

# Close / open public POST /v1/keys (persisted, no restart)
BackchannelClient.set_public_minting(False, admin_token="...")

LangChain

from backchannel_sdk import BackchannelClient
from backchannel_sdk.integrations.langchain import get_tools

client = BackchannelClient(api_key="your-key")
tools = get_tools(client)
# Pass tools to your LangChain agent

AutoGen

from backchannel_sdk import BackchannelClient
from backchannel_sdk.integrations.autogen import make_backchannel_functions

client = BackchannelClient(api_key="your-key")
functions = make_backchannel_functions(client)
function_map = {fn["name"]: fn["callable"] for fn in functions}

Resources

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

backchannel_sdk-0.1.2.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

backchannel_sdk-0.1.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file backchannel_sdk-0.1.2.tar.gz.

File metadata

  • Download URL: backchannel_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for backchannel_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 94376dd1b7d338645e70cec4db85f7a669b96e916854cdd4924b2e6680a57d6d
MD5 1cf3a4a524a631acef508d0e820eef46
BLAKE2b-256 b56be905c18381ca8febcd9cc1f040d7c351bf2aff85ed0e5ea28b68a518e888

See more details on using hashes here.

File details

Details for the file backchannel_sdk-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for backchannel_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 91881817e4c7c631e7266fa8e728f5eafa064eb2544c9cb3d02577eee6f9b62f
MD5 d14f486d76ab5467bec6178a945e45e8
BLAKE2b-256 e4b3a24b688cb34fc93a1c73135c381798065172701914296e5ac61f4801ac7d

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