The Forensic Runtime for AI agents - full-spectrum streaming with complete observability
Project description
Bond
Generic agent runtime wrapping PydanticAI with full-spectrum streaming.
Features
- High-fidelity streaming with callbacks for every lifecycle event
- Block start/end notifications for UI rendering
- Real-time streaming of text, thinking, and tool arguments
- Tool execution and result callbacks
- Message history management
- Dynamic instruction override
- Toolset composition
Installation
pip install bond
Quick Start
from bond import BondAgent, StreamHandlers, create_print_handlers
from bond.tools.memory import memory_toolset, QdrantMemoryStore
# Create agent with memory tools
agent = BondAgent(
name="assistant",
instructions="You are a helpful assistant with memory capabilities.",
model="anthropic:claude-sonnet-4-20250514",
toolsets=[memory_toolset],
deps=QdrantMemoryStore(), # In-memory for development
)
# Stream with console output
handlers = create_print_handlers(show_thinking=True)
response = await agent.ask("Remember my preference for dark mode", handlers=handlers)
Streaming Handlers
Bond provides factory functions for common streaming scenarios:
create_websocket_handlers(send)- JSON events over WebSocketcreate_sse_handlers(send)- Server-Sent Events formatcreate_print_handlers()- Console output for CLI/debugging
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
bond_agent-0.1.0.tar.gz
(328.1 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
File details
Details for the file bond_agent-0.1.0.tar.gz.
File metadata
- Download URL: bond_agent-0.1.0.tar.gz
- Upload date:
- Size: 328.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e56faa6269f51600beac765f86771eaac8a1423ae29e42d9cf503e99112b8bd6
|
|
| MD5 |
ccb9c020ec98f1259465bd5ec0fb6e27
|
|
| BLAKE2b-256 |
f696d06efb7b1665aa2b31e01c34eb907a867f3bc9007f50708c2df00cdf9c40
|
File details
Details for the file bond_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bond_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 45.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
565cac7e0162905c52eb980936b16bd4843aacb46851d750eba3f6b03b19634e
|
|
| MD5 |
f5dbf3fd6e3a97c48614d40ce7f960d0
|
|
| BLAKE2b-256 |
a254ef274acee3af945f9b0692d47a079ed56a57f6f45c1f335d87c7034ff9d3
|