A flexible and extensible framework for building and managing AI agents and workflows
Project description
AgentFlow
AgentFlow is a flexible and extensible framework for building and managing AI agents and workflows. It provides a modular architecture for creating, configuring, and orchestrating AI agents with advanced features for workflow management and testing.
Latest Version
Current version: v0.1.1
- Fixed workflow transform functions to handle step and context parameters
- Added feature engineering and outlier removal transforms
- Improved test suite and type hints
- Enhanced error handling and validation
Project Structure
agentflow/
├── agents/ # Agent implementations
│ ├── agent.py # Base agent implementation
│ └── agent_types.py # Agent type definitions
├── core/ # Core framework components
│ ├── base_types.py # Base type definitions
│ ├── config.py # Configuration management
│ ├── workflow.py # Workflow engine
│ └── workflow_executor.py # Workflow execution
├── ell2a/ # ELL2A integration
│ └── types/ # Message and content types
├── transformations/ # Data transformation tools
│ └── text.py # Text processing utilities
└── tests/ # Comprehensive test suite
├── unit/ # Unit tests
├── core/ # Core component tests
└── performance/ # Performance tests
Features
-
Flexible Agent Architecture
- Configurable agent types and behaviors
- Support for research and data science agents
- Extensible agent factory system
-
Advanced Workflow Management
- Step-based workflow execution
- Dependency management
- Error handling and retry policies
- Performance monitoring
-
Robust Testing Framework
- Unit and integration tests
- Performance testing
- Test-driven development support
-
Data Transformation Tools
- Feature engineering
- Outlier removal
- Text processing utilities
-
Type Safety
- Comprehensive type hints
- Pydantic model validation
- Runtime type checking
Installation
pip install agentflow
Quick Start
from agentflow import Agent, AgentConfig, WorkflowConfig, WorkflowStep, WorkflowStepType
# Create workflow configuration
workflow_config = WorkflowConfig(
id="test-workflow",
name="test_workflow",
steps=[
WorkflowStep(
id="step-1",
name="transform_step",
type=WorkflowStepType.TRANSFORM,
description="Data transformation step",
config={
"strategy": "standard",
"params": {
"method": "standard",
"with_mean": True,
"with_std": True
}
}
)
]
)
# Create agent configuration
agent_config = AgentConfig(
name="test_agent",
type="data_science",
workflow=workflow_config
)
# Create and initialize agent
agent = Agent(config=agent_config)
await agent.initialize()
# Process data
result = await agent.execute({"data": your_data})
Configuration
Agents and workflows can be configured using Python dictionaries or YAML files:
AGENT:
name: data_science_agent
type: data_science
version: 1.0.0
mode: sequential
MODEL:
provider: openai
name: gpt-4
temperature: 0.7
max_tokens: 4096
WORKFLOW:
id: transform-workflow
name: Data Transformation Workflow
max_iterations: 5
timeout: 30
steps:
- id: step-1
name: feature_engineering
type: transform
description: Feature engineering step
config:
strategy: standard
params:
method: standard
with_mean: true
with_std: true
Testing
Run the test suite:
# Run all tests
pytest
# Run specific test categories
pytest tests/unit/
pytest tests/core/
pytest tests/performance/
Contributing
- Fork the repository
- Create a feature branch
- Write tests for your changes
- Implement your changes
- Run the test suite
- Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
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
File details
Details for the file agent_flow_project-0.1.2.tar.gz.
File metadata
- Download URL: agent_flow_project-0.1.2.tar.gz
- Upload date:
- Size: 246.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32c6b290ddd1490a8b99d9597d73a6360523d34c499cbf3fbafdedfa886715c4
|
|
| MD5 |
d5999f07821dcd17bcc5d792c5d0cff2
|
|
| BLAKE2b-256 |
8a68079a8fc7208c17dd0b63bbd9d89c062cb105db236898345ffb93a1c5c589
|
File details
Details for the file agent_flow_project-0.1.2-py3-none-any.whl.
File metadata
- Download URL: agent_flow_project-0.1.2-py3-none-any.whl
- Upload date:
- Size: 299.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e860925bf9124e2f910fc121b1ce6e80b1b7cb7db5b2013330353b0a2c2d488
|
|
| MD5 |
d8c56626eebb4133a51bd146225fd286
|
|
| BLAKE2b-256 |
2e2a0334530f545757a536e352e61bdba138bb1447ca81a59f6902478ad4c64c
|