Metadata-Version: 2.4
Name: bond-agent
Version: 0.1.1
Summary: The Forensic Runtime for AI agents - full-spectrum streaming with complete observability
Project-URL: Documentation, https://renbytes.github.io/bond-agent/
Project-URL: Repository, https://github.com/renbytes/bond-agent/
Author: bordumb
License: Apache 2.0
License-File: LICENSE
Keywords: agent,ai,llm,observability,pydantic-ai,streaming
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: aiofiles>=24.0.0
Requires-Dist: asyncpg>=0.29.0
Requires-Dist: pydantic-ai>=0.0.14
Requires-Dist: pydantic>=2.5.0
Requires-Dist: qdrant-client>=1.7.0
Requires-Dist: sentence-transformers>=2.2.0
Provides-Extra: dev
Requires-Dist: mypy>=1.8.0; extra == 'dev'
Requires-Dist: pre-commit>=3.5.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: respx>=0.20.2; extra == 'dev'
Requires-Dist: ruff>=0.2.0; extra == 'dev'
Requires-Dist: types-aiofiles>=24.0.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-autorefs>=0.5.0; extra == 'docs'
Requires-Dist: mkdocs-material>=9.5.0; extra == 'docs'
Requires-Dist: mkdocs>=1.6.0; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.26.0; extra == 'docs'
Description-Content-Type: text/markdown

# 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

```bash
pip install bond-agent
```

## Quick Start

```python
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
