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.1.tar.gz (361.7 kB 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.1-py3-none-any.whl (45.5 kB view details)

Uploaded Python 3

File details

Details for the file bond_agent-0.1.1.tar.gz.

File metadata

  • Download URL: bond_agent-0.1.1.tar.gz
  • Upload date:
  • Size: 361.7 kB
  • 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.1.tar.gz
Algorithm Hash digest
SHA256 413e31b3f0c52040708ac9be587d39be94fedea1716683c0850a6395b8608f2d
MD5 4ed864ac8a28b92293a96c6fced3d2b2
BLAKE2b-256 89b0ecfa95c3f34e0814ca1a6bc43a9d0e8632e38b18d7afc712f4695eb1c971

See more details on using hashes here.

File details

Details for the file bond_agent-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: bond_agent-0.1.1-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

Hashes for bond_agent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 362173e35e4aa40dbce0fefcc2f85d05cd2c1b7636289a5ec14dc952dd57d3b2
MD5 4dfe256ff506ab91d270fbe3c7cc04bc
BLAKE2b-256 1992ad95b48a319641479cc313a1a344a49578bce2fea03716fc8203b9dc53fe

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