Python SDK for tailbus — agent communication mesh
Project description
tailbus Python SDK
Python SDK for tailbus — an agent communication mesh.
Install
pip install tailbus
Requires Python 3.10+ and the tailbus CLI on your PATH.
Quick start
Async
from tailbus import AsyncAgent, Manifest
async with AsyncAgent("my-agent") as agent:
await agent.register(manifest=Manifest(description="My agent"))
@agent.on_message
async def handle(msg):
await agent.send(msg.session, f"echo: {msg.body}")
await agent.run_forever()
Sync
from tailbus import SyncAgent
with SyncAgent("my-agent") as agent:
agent.register()
opened = agent.open_session("other-agent", "hello")
agent.send(opened.session, "follow-up")
agent.resolve(opened.session, "done")
API
AsyncAgent(handle, binary="tailbus")— async/await agent with@on_messagedecorator andrun_forever()SyncAgent(handle, binary="tailbus")— threading-based synchronous wrapperManifest(description, commands)— service manifest with optional command specsCommandSpec(name, description, schema)— typed command with JSON Schema
Both agents support: register(), open_session(), send(), resolve(), list_handles(), list_sessions(), introspect().
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tailbus-0.1.0.tar.gz
(7.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
tailbus-0.1.0-py3-none-any.whl
(10.5 kB
view details)
File details
Details for the file tailbus-0.1.0.tar.gz.
File metadata
- Download URL: tailbus-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8eaa42577e9a4d554850365a18b497320dc763c97c3db81843c8d51d4bec04c3
|
|
| MD5 |
04a55133f4ff16dfdbe4f8663476d456
|
|
| BLAKE2b-256 |
6de575c727110e3eff27c09c866c985c118311df3f83f7c654ed655f0691bb17
|
File details
Details for the file tailbus-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tailbus-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
008a6f387ac12150b17682256a3006dd65c00db096585798da2ee72fd63ec8ce
|
|
| MD5 |
f2e607c04ceee632f94b2e295c9e801e
|
|
| BLAKE2b-256 |
8ed6335afa89386382a6a2bda1f9bc2d117c114ba06dd890bd34308679b51a76
|