SDK Overview
The Erdo Python SDK provides a powerful framework for building intelligent AI agents. With our agent-centric API design, you can create sophisticated automation workflows that combine language models, web research, code execution, and custom integrations using clean, readable code. Pure Python Workflows: The SDK now includes sync, invoke, and test modules, enabling you to work entirely in Python without needing the CLI.Installation
Complete Python Workflow
Build, sync, and invoke agents entirely in Python:Quick Start
Here’s a simple agent that automates email responses:Core Components
Agents
The main orchestrators that define your automation workflow
Steps
Individual actions within your agent’s process
Actions
Building blocks that define what each step does
Result Handlers
Conditional logic for processing step outcomes
SDK Modules
Sync
Sync agents from Python code to the platform
Invoke
Execute agents programmatically with parameters
Test
Run agent tests and validations
API Patterns
The Erdo SDK uses an agent-centric approach:Creating Steps
Key Features
- Clean syntax: Simple step creation with intuitive methods
- Intuitive parameter order: Action first, then optional parameters
- Direct handlers: Use
step.on()for immediate action chaining - Type-safe output access: Use
step.output.fieldsyntax - Condition operators: Use
&(and),|(or),~(not) for combining conditions
Action Types
Erdo provides multiple action types for different use cases:Language Model Actions (llm)
Language Model Actions (llm)
Memory Operations
Memory Operations
Web Research & Data Collection
Web Research & Data Collection
Code Execution
Code Execution
Utility Actions
Utility Actions
Code Execution with .exec Decorator
For steps that run Python code using external files, use the@agent.exec decorator:
Basic .exec Usage
Multi-File Code Execution
PythonFile Reference
For detailed examples and best practices, see the Code Execution Guide.
Result Handlers
Handle step outcomes with conditional logic:Direct Handlers with step.on()
Result Handlers with step.on()
Dependencies and Flow Control
Sequential Steps
Parallel Steps
Conditions and Logic
Basic Conditions
Complex Conditions
Complete Example
Here’s a comprehensive example showing all the key patterns:SDK Modules Reference
Sync Module
Sync agents from Python code to the Erdo platform:Invoke Module
Execute agents programmatically:Test Module
Write fast, parallel agent tests:Best Practices
- Use descriptive agent names for easy identification
- Structure dependencies clearly to avoid circular references
- Handle both success and error cases for robust workflows
- Use type-safe output access with
step.output.field - Combine conditions logically using
&,|,~operators - Store important results in memory for future reference
- Provide clear status updates for better user experience
Next Steps
CLI vs SDK
Compare CLI and SDK approaches for your workflow
Concepts
Learn core concepts and patterns
Examples
See real-world implementations
Actions Reference
Complete action documentation
API Reference
For detailed API documentation, including all available methods, parameters, and response formats, see our complete API reference (coming soon).Support
- GitHub Issues - Bug reports and feature requests
- Documentation - Complete guides and tutorials