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-agent
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.2.tar.gz
(17.4 MB
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.2.tar.gz.
File metadata
- Download URL: bond_agent-0.1.2.tar.gz
- Upload date:
- Size: 17.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d298a825d7bfdce454747a98f8232eba642962971c7d3a1cb7c296b096dbb73b
|
|
| MD5 |
d7bf563a6054fb6c1c0c184f28715e14
|
|
| BLAKE2b-256 |
eb35bde0a97e0aa9a4adcf906f0a4c1fa30317792a7e1570e542997e13f73d85
|
File details
Details for the file bond_agent-0.1.2-py3-none-any.whl.
File metadata
- Download URL: bond_agent-0.1.2-py3-none-any.whl
- Upload date:
- Size: 67.0 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 |
10ef412ce22c1e4d3b1abe91d8fc32a981d68507c6063341d8dc51d3c57abbe2
|
|
| MD5 |
f1b620af51d7c99067753216a5cd5427
|
|
| BLAKE2b-256 |
52d3694381e8dcce86e5252dc5a70ec0d9d5059e2812e74d35a0b35c2f421d26
|