Protocol Choice
Quick Start
1
Basic Lifecycle
Create agent, environment, session, then send events and stream responses.
2
With Advanced Configuration
Full configuration with packages, networking, and vaults.
How It Works
Protocol Methods
Agent Management
Environment Management
Session Management
Event Handling
Common Patterns
Multi-Turn Conversation
Agent Version Pinning
Session Cleanup
Best Practices
Resource Management
Resource Management
Create agents and environments once, reuse across sessions:
Error Handling
Error Handling
Handle network failures and provider errors gracefully:
Event Processing
Event Processing
Handle different event types appropriately:
Performance Optimization
Performance Optimization
- Reuse agent/environment definitions across sessions
- Use appropriate session cleanup (archive vs delete)
- Pin agent versions for consistent behavior
- Filter list operations to reduce API calls
Related
Sandboxed Agent
Local agent loop with optional tool sandboxing
Managed Agent Lifecycle
Complete CRUD operations for agents, environments, sessions

