Skip to main content
Hero Light

Erdo

Erdo lets you build AI agents that automate workflows using Python. Combine language models, code execution, web research, and external APIs into intelligent automation.

Core Features

Agent Workflows

Define multi-step workflows with dependencies and conditional logic

Multiple Actions

LLM calls, code execution, web search, memory, and external integrations

Result Handling

Conditional logic based on step outcomes and data validation

Comprehensive Testing

Test all execution paths automatically without LLM costs

Why Erdo

Erdo’s hybrid Python and Go architecture enables capabilities not available in traditional frameworks:
  • Automatic Path Testing: Declarative agents allow the CLI to enumerate and test all execution paths automatically
  • Template Validation: Static analysis catches state and data flow errors before execution
  • Efficient Integration Tests: Replay mode caches LLM responses to reduce costs in CI/CD
  • High Performance: Go runtime provides low-latency execution and efficient resource utilization

Learn More

Discover how Erdo’s architecture enables better testing and production reliability

Quick Example

from erdo import Agent, state
from erdo.actions import llm, memory
from erdo.conditions import IsSuccess, GreaterThan

# Create an agent
agent = Agent(
    name="data_analyzer",
    description="Analyzes data and stores insights"
)

# Add a step
analysis_step = agent.step(
    llm.message(
        model="claude-sonnet-4",
        query=f"Analyze this data: {state.dataset}",
        response_format={
            "Type": "json_schema",
            "Schema": {
                "type": "object",
                "properties": {
                    "insights": {"type": "array"},
                    "confidence": {"type": "number"}
                }
            }
        }
    )
)

# Handle the result
analysis_step.on(
    IsSuccess() & GreaterThan("confidence", "0.8"),
    memory.store(memory={
        "content": analysis_step.output.response,
        "type": "validated_analysis"
    })
)

Core Concepts

Agents

Agents contain workflow logic and execute steps:
agent = Agent(
    name="my_agent",
    description="What this agent does"
)

Steps

Steps define what actions an agent performs. Each step can perform LLM calls, execute code, search the web, or interact with external services:
step = agent.step(
    llm.message(
        model="claude-sonnet-4",
        query=state.user_input
    ),
    depends_on=previous_step
)

Result Handlers

Handle step outcomes with conditional logic using decorators or direct methods:
step.on(
    IsSuccess() & GreaterThan("score", "0.8"),
    memory.store(memory={"content": step.output.data})
)

step.on(
    IsSuccess(),
    utils.send_status(status="completed", message="Processing finished")
)

Actions

Actions are the building blocks that define what each step does:
  • LLM Actions: Generate text, analyze content, make decisions
  • Code Execution: Run Python scripts, process data, perform calculations
  • Memory Operations: Store and retrieve information across workflows
  • Web Research: Search the internet, parse websites, gather information
  • Validation Actions: Parse JSON, validate formats, handle errors
  • Utility Actions: Send notifications, manage state, debug workflows

Integrations

Define custom integrations for external services, databases, and APIs:
from erdo.integrations import IntegrationConfig
from erdo import IntegrationType, AuthType, UIConfig

class StripeIntegrationConfig(IntegrationConfig):
    def __init__(self):
        super().__init__()

        self.definition.name = "Stripe"
        self.definition.description = "Payment processing integration"
        self.definition.integration_type = IntegrationType.API
        self.definition.auth_type = AuthType.API_KEY

        # UI Configuration
        self.definition.ui_config = UIConfig(
            icon={"set": "lucide", "name": "credit-card"},
            primary_color="#635bff",
            display_name="Stripe",
            short_description="Process payments and manage subscriptions"
        )

        # Credential schema for API key
        self.credential_schema = {
            "api_key": {
                "type": "secret",
                "label": "API Key",
                "description": "Your Stripe API key"
            }
        }
Integrations can then be used in agents for data access, API calls, and workflow automation.

Use Cases

Automate workflows like invoice processing, customer onboarding, and document analysis:
from erdo.conditions import TextContains, IsSuccess

invoice_processor = Agent(name="invoice_processor")

extract_step = invoice_processor.step(
    llm.message(
        model="claude-sonnet-4",
        query=f"Extract key information from this invoice: {state.invoice_image}",
        response_format={
            "Type": "json_schema",
            "Schema": {
                "type": "object",
                "properties": {
                    "amount": {"type": "number"},
                    "vendor": {"type": "string"},
                    "date": {"type": "string"}
                }
            }
        }
    )
)

# Validate extracted data contains required fields
extract_step.on(
    IsSuccess() & TextContains("amount") & TextContains("vendor"),
    memory.store(memory={
        "content": extract_step.output.response,
        "type": "validated_invoice"
    })
)

# Handle missing required fields
extract_step.on(
    IsSuccess() & ~TextContains("amount"),
    utils.send_status(
        status="validation_failed",
        message="Invoice amount not found - manual review required"
    )
)
Build intelligent data analysis workflows that combine AI reasoning with code execution:
analyst = Agent(name="data_analyst")

analysis_step = analyst.step(
    llm.message(
        model="claude-sonnet-4",
        query=f"Analyze trends in this data: {state.dataset}"
    )
)

code_step = analyst.step(
    codeexec.execute(
        code_files=[{
            "filename": "analysis.py",
            "content": f"generate_statistical_analysis({state.dataset})"
        }]
    ),
    depends_on=analysis_step
)
Create AI-powered content workflows for marketing, documentation, and communication: python content_creator = Agent(name="content_creator") research_step = content_creator.step( websearch.search(query=f"{state.topic}{" "} latest trends") ) content_step = content_creator.step( llm.message( model="claude-sonnet-4", query=f"Create engaging content about {state.topic}{" "} using: {research_step.output.results}" ), depends_on=research_step )
Build intelligent customer support agents that understand context and provide personalized responses:
support_agent = Agent(name="customer_support")

context_step = support_agent.step(
    memory.search(
        query=f"{state.customer_message} {state.customer_id}",
        limit=5
    )
)

response_step = support_agent.step(
    llm.message(
        model="claude-sonnet-4",
        query=state.customer_message,
        context=context_step.output.memories
    ),
    depends_on=context_step
)

Key Features

Intelligent Decision Making

Agents can make complex decisions based on data analysis, confidence scores, and business rules:
decision_step.on(IsSuccess() & GreaterThan("risk_score", "0.7"), utils.send_status(
    status="escalated",
    message="High risk detected - human review required"
))

Output Validation

Ensure AI outputs meet your standards with built-in validation tools:
from erdo.conditions import TextContains, GreaterThan

# Validate content quality and format
analysis_step.on(
    IsSuccess() & TextContains("analysis") & TextContains("recommendation") & GreaterThan("confidence", "0.8"),
    memory.store(memory={"content": analysis_step.output.response, "type": "validated"})
)

# Parse JSON output
json_step = agent.step(
    utils.parse_json(
        json=state.llm_output
    )
)

# Validate specific field requirements
json_step.on(
    IsSuccess() & TextContains("status", "complete") & TextContains("data"),
    utils.send_status(status="validated", message="Output meets all requirements")
)

Getting Started