Skip to main content

Installation

Requires Python 3.10+ and a running BAP server. Dependencies: websockets >= 12.0, pydantic >= 2.0, aiohttp >= 3.9.0, anyio >= 4.0, httpx >= 0.27.0

Quick Start

Sync API (scripts and notebooks)

Session Helper

Semantic Selectors

API Mapping

The Python SDK mirrors the TypeScript API with snake_case naming:

Agent Methods

observe

act

extract

Multi-Context Support

Frame Support

Error Handling

Pydantic Models

All types use Pydantic v2 BaseModel with camelCase aliases for JSON compatibility:

CLI Utility

The Python SDK includes a basic CLI for testing connectivity: