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
Metadata
Release files for bond-agent 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bond_agent-0.1.2.tar.gz | 17.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bond_agent-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.5 MB
Release files / bond_agent-0.1.2.tar.gz
| Download URL | bond_agent-0.1.2.tar.gz |
|---|---|
| Size | 17.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d298a825d7bfdce454747a98f8232eba642962971c7d3a1cb7c296b096dbb73b
|
|
BLAKE2b-256 checksum How to use checksums |
eb35bde0a97e0aa9a4adcf906f0a4c1fa30317792a7e1570e542997e13f73d85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / bond_agent-0.1.2-py3-none-any.whl
| Download URL | bond_agent-0.1.2-py3-none-any.whl |
|---|---|
| Size | 67.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10ef412ce22c1e4d3b1abe91d8fc32a981d68507c6063341d8dc51d3c57abbe2
|
|
BLAKE2b-256 checksum How to use checksums |
52d3694381e8dcce86e5252dc5a70ec0d9d5059e2812e74d35a0b35c2f421d26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|