Build AI Automation Workflows
in Plain Python
aipype is the framework for automation-heavy LLM workflows.
Create your AI agents as simple Python scripts that orchestrate complex tasks automatically.
Why aipype?
Write Automation, Not Boilerplate
Skip the complexity of traditional agent frameworks. With aipype, your automation workflows are just Python scripts that declare what you want to accomplish.
LLM-Native by Design
Built specifically for automation-heavy LLM workflows. Chain together search, content processing, analysis, and generation tasks effortlessly.
Simple but Powerful
Declarative pipeline orchestration with automatic dependency resolution. Focus on your logic, let aipype handle the execution flow.
Real Automation in 30 Lines
See how easy it is to build complex workflows
from aipype import PipelineAgent, SearchTask, LLMTask, TaskDependency, DependencyType
class ContentAutomationAgent(PipelineAgent):
"""Automatically research, analyze, and create content from any topic"""
def setup_tasks(self):
topic = self.config.get("topic", "AI automation")
return [
# 1. Research the topic
SearchTask(
name="research",
config={"query": f"latest developments in {topic}", "max_results": 5}
),
# 2. Analyze and summarize findings
LLMTask(
name="analyze",
config={
"llm_provider": "openai",
"llm_model": "gpt-4o-mini",
"prompt_template": "Analyze these search results and create key insights about ${topic}:\n${research_data}",
"topic": topic
},
dependencies=[
TaskDependency("research_data", "research.results", DependencyType.REQUIRED)
]
),
# 3. Generate final content
LLMTask(
name="create_content",
config={
"llm_provider": "openai",
"llm_model": "gpt-4o-mini",
"prompt_template": "Write a comprehensive article about ${topic} using these insights:\n${analysis}",
"topic": topic
},
dependencies=[
TaskDependency("analysis", "analyze.content", DependencyType.REQUIRED)
]
)
]
# Run your automation
agent = ContentAutomationAgent(name="content-agent", config={"topic": "AI automation"})
agent.run()
agent.display_results()
That's it. aipype automatically:
- Executes tasks in the right order based on dependencies
- Passes data between tasks seamlessly
- Handles errors and retries
- Displays formatted results
Key Features
Declarative Pipeline Orchestration
Define what you want to accomplish, not how to orchestrate it. aipype automatically resolves task dependencies and execution order.
Multiple LLM Providers
Works with OpenAI, Gemini, Ollama, and any OpenAI-compatible API. Switch providers without changing your automation logic.
Built-in Automation Tasks
SearchTask, LLMTask, URLFetchTask, FileSaveTask, TransformTask, and ConditionalTask - everything you need for complex workflows.
Smart Data Flow
Template substitution with ${variable} syntax automatically injects data from previous tasks into prompts and configurations.
Quick Start
# Core framework
pip install aipype
# With Google integrations
pip install aipype aipype-g
# With extras
pip install aipype aipype-extras
export OPENAI_API_KEY=your-key-here
export SERPER_API_KEY=your-serper-key # For search functionality
python my_automation.py
- aipype-extras - LLM log viewer and debugging tools
- aipype-g - Gmail and Google Sheets automation