A modular AI agent framework with declarative pipeline-based task orchestration
Project description
aipype
Core AI agent framework with declarative pipeline orchestration.
Installation
pip install aipype
Quick Start
Use the @task decorator for clean, Pythonic agent definitions:
from aipype import PipelineAgent, task, llm, search
class ResearchAgent(PipelineAgent):
@task
def find_sources(self) -> dict:
"""Search for articles - no dependencies, runs first."""
return search(self.config["topic"], max_results=5)
@task
def summarize(self, find_sources: dict) -> str:
"""Summarize sources - dependency auto-inferred from parameter."""
return llm(
prompt=f"Summarize: {find_sources}",
model="gpt-4o",
temperature=0.3
)
agent = ResearchAgent("research", {"topic": "AI trends"})
agent.run()
agent.display_results()
Key Concepts:
@taskdecorator marks methods as pipeline tasks- Parameter names matching task names create automatic dependencies
self.configprovides access to agent configuration- Helper functions:
llm(),search(),mcp_server(),transform()
Environment Variables
# LLM Providers
export OPENAI_API_KEY=sk-your-key-here
export GEMINI_API_KEY=your-key-here
export OLLAMA_API_BASE=http://localhost:11434
# Search
export SERPER_API_KEY=your-serper-key-here
Development
Requirements
- Python ≥3.12
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aipype-0.2.0a1.tar.gz
(208.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
aipype-0.2.0a1-py3-none-any.whl
(112.5 kB
view details)
File details
Details for the file aipype-0.2.0a1.tar.gz.
File metadata
- Download URL: aipype-0.2.0a1.tar.gz
- Upload date:
- Size: 208.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42c05a3559668462b373fce18d369ad625f211577b93d37d621e801171388d21
|
|
| MD5 |
dd58bc53211a708b79fda2cba4b8df0e
|
|
| BLAKE2b-256 |
8b6f7f30e97a807ec6a06bffc23505332c9800ae832efe24af593d0498ecafb5
|
File details
Details for the file aipype-0.2.0a1-py3-none-any.whl.
File metadata
- Download URL: aipype-0.2.0a1-py3-none-any.whl
- Upload date:
- Size: 112.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c520faaf79a88a72fc9b188f05da504cd51664e481bb998381a293747d7ccc3
|
|
| MD5 |
c528a510b27903039f772f6b2506cd23
|
|
| BLAKE2b-256 |
8828f405cc5c0b8dababebfe87d08a6b20ff1ac2a00c888774201ec0209fabef
|