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.
Metadata
Release files for agent-flow-project 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agent_flow_project-0.1.2.tar.gz | 246.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_flow_project-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 546.0 kB
Release files / agent_flow_project-0.1.2.tar.gz
| Download URL | agent_flow_project-0.1.2.tar.gz |
|---|---|
| Size | 246.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32c6b290ddd1490a8b99d9597d73a6360523d34c499cbf3fbafdedfa886715c4
|
|
BLAKE2b-256 checksum How to use checksums |
8a68079a8fc7208c17dd0b63bbd9d89c062cb105db236898345ffb93a1c5c589
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0
|
Release files / agent_flow_project-0.1.2-py3-none-any.whl
| Download URL | agent_flow_project-0.1.2-py3-none-any.whl |
|---|---|
| Size | 299.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e860925bf9124e2f910fc121b1ce6e80b1b7cb7db5b2013330353b0a2c2d488
|
|
BLAKE2b-256 checksum How to use checksums |
2e2a0334530f545757a536e352e61bdba138bb1447ca81a59f6902478ad4c64c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0
|