Skip to main content
The official Python SDK for seamless integration with Agentbase agents.

Installation

View on PyPI →

Quick Start

Configuration

API Methods

Root-Level Methods

client.run_agent()

Run an agent directly from the root client:

Agent Resource

client.agent.run()

Run an agent using the agent resource (accepts same parameters as client.run_agent()):

Messages Resource

client.messages.get()

Retrieve messages from an agent session:

client.messages.clear()

Clear all messages from an agent session:

Error Handling

Type Hints

Examples

Basic Chat

With Session Continuity

Cost Tracking

Async Support

Context Manager

Advanced Usage

Custom HTTP Client

Retry Configuration

Resources

What’s Next?

TypeScript SDK

Use Agentbase with TypeScript/JavaScript

API Reference

Complete API documentation

Examples

See more integration examples