Skip to main content

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 WebSocket
  • create_sse_handlers(send) - Server-Sent Events format
  • create_print_handlers() - Console output for CLI/debugging

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

bond_agent-0.1.2.tar.gz (17.4 MB view details)

Uploaded Source

Built Distribution

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

bond_agent-0.1.2-py3-none-any.whl (67.0 kB view details)

Uploaded Python 3

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

Hashes for bond_agent-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d298a825d7bfdce454747a98f8232eba642962971c7d3a1cb7c296b096dbb73b
MD5 d7bf563a6054fb6c1c0c184f28715e14
BLAKE2b-256 eb35bde0a97e0aa9a4adcf906f0a4c1fa30317792a7e1570e542997e13f73d85

See more details on using hashes here.

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

Hashes for bond_agent-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 10ef412ce22c1e4d3b1abe91d8fc32a981d68507c6063341d8dc51d3c57abbe2
MD5 f1b620af51d7c99067753216a5cd5427
BLAKE2b-256 52d3694381e8dcce86e5252dc5a70ec0d9d5059e2812e74d35a0b35c2f421d26

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