Skip to content
/ flexo Public

Framework for deploying configurable AI agents with real-time streaming and tool execution.

License

Notifications You must be signed in to change notification settings

IBM/flexo

flexo framework logo

Flexo Framework

Project Status: Beta

Flexo is a powerful and flexible agent framework. It provides a FastAPI-based RESTful API for deploying customizable AI agents that can execute Python functions and interact with external services while handling real-time streaming responses.


Features

  • Configurable Agent: YAML-based configuration for custom behaviors
  • Tool Integration: Execute Python functions and REST API calls
  • Streaming Support: Real-time streaming with pattern detection
  • Production Ready: Containerized deployment support with logging
  • FastAPI Backend: Modern async API with comprehensive docs

Quick Start

Local Development

  1. Fork and clone:

    # First, fork the repository on GitHub by clicking the 'Fork' button
    # Then clone your fork:
    git clone https://github.com/YOUR_USERNAME/flexo.git
    cd flexo
    
    # Add the upstream repository
    git remote add upstream https://github.com/ibm/flexo.git
  2. Set up the environment:

    # Create virtual environment
    python -m venv venv
    source venv/bin/activate  # or `venv\Scripts\activate` on Windows
    pip install -r requirements.txt
  3. Configure:

    • Copy .env.example to .env and add your credentials
    • Review src/configs/agent.yaml for agent settings
  4. Run the server:

    uvicorn src.main:app --reload --host 127.0.0.1 --port 8000

Docker Development

docker build -t flexo-agent .
docker run -p 8000:8000 --env-file .env flexo-agent

Documentation

Getting Started

Reference Documentation

Deployment Guides


Repository Structure

flexo/
β”œβ”€β”€ docs/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agent/            # Agent(s)
β”‚   β”œβ”€β”€ api/              # API endpoints
β”‚   β”œβ”€β”€ configs/          # Configurations
β”‚   β”œβ”€β”€ data_models/      # Data models
β”‚   β”œβ”€β”€ database/         # Database adapters
β”‚   β”œβ”€β”€ llm/              # LLM components
β”‚   β”œβ”€β”€ prompt_builders/  # Core prompt generation
β”‚   β”œβ”€β”€ tools/                   # πŸ”§ Add your custom tools here!
β”‚   β”‚   β”œβ”€β”€ core/                # Core tool components
β”‚   β”‚   β”œβ”€β”€ implementations/     # Custom tool implementations
β”‚   β”‚   └──notebooks/            # Jupyter notebooks for tool development
β”‚   β”œβ”€β”€ utils/            # Utils/shared code
β”‚   └── main.py           # App entry point
└── ...

Support

Versioning

This project follows Semantic Versioning. See releases for version history.

Contributing

We welcome contributions! All commits must be signed with DCO (git commit -s). See our Contributing Guide for details.

Code of Conduct

We are committed to fostering a welcoming and inclusive community. Please review our Code of Conduct to understand the standards we uphold.

Security

Review our Security Policy for handling vulnerabilities.

License

Apache 2.0 License - see LICENSE for details.