Skip to main content

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

  1. Fork the repository
  2. Create a feature branch
  3. Write tests for your changes
  4. Implement your changes
  5. Run the test suite
  6. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_flow_project-0.1.1.tar.gz (244.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_flow_project-0.1.1-py3-none-any.whl (297.3 kB view details)

Uploaded Python 3

File details

Details for the file agent_flow_project-0.1.1.tar.gz.

File metadata

  • Download URL: agent_flow_project-0.1.1.tar.gz
  • Upload date:
  • Size: 244.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for agent_flow_project-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ff327ad3446b0a1b990a58f049a733f6358cd3db494211cc13340b88d0244c4f
MD5 0f24ab441741fd4f145234d3de4f33f0
BLAKE2b-256 dd8ba8292f84b58cf7a4db192d3af5b8d224c68d7b2f4c37a9969b94ee7a71d9

See more details on using hashes here.

File details

Details for the file agent_flow_project-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_flow_project-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7512479f73e756dcfbabc785be77008ce0aee7dd1a5b4fadc764bbe9fa8766da
MD5 bc8b90add62595896bcba505ab7a1775
BLAKE2b-256 ed5cd8f238104adbba941e4659c6874219c08d4fe8b0dfaa8d936b28f938c7b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page