Installation
Install the SDK using pip:The SDK is included with the main
runagent package. No separate installation needed.Quick Start
Basic Usage
With API Key
Authentication
The SDK supports multiple authentication methods:- Environment Variable
- Direct API Key
- Config File
Response Formats
Standard Response
Streaming Response
Error Handling
The SDK provides comprehensive error handling:Common Error Types
Configuration Options
Input Validation
The SDK validates inputs before sending requests:Logging
Enable logging for debugging:Complete Examples
Question-Answering Bot
Interactive Chat
Batch Processing
Best Practices
Reuse Clients
Create client instances once and reuse them for multiple requests
Handle Errors
Always implement proper error handling for production use
Use Streaming
Use streaming for long responses to improve user experience
Set Timeouts
Configure appropriate timeouts based on your agent’s complexity
Next Steps
Synchronous Client
Deep dive into synchronous operations
Asynchronous Client
Learn about async/await support
Streaming Responses
Master real-time streaming
API Reference
Complete API documentation