Skip to main content
Prerequisites:
  • Python 3.10 or higher
  • pip or poetry package manager
  • API keys for your chosen LLM providers
Follow these steps to set up your development environment for Flo AI.
1

Install Flo AI

Install Flo AI using pip or poetry:
# Using pip
pip install flo-ai

# Using poetry
poetry add flo-ai
2

Set up environment variables

Configure your API keys for LLM providers:
# OpenAI
export OPENAI_API_KEY="your-openai-key"

# Anthropic
export ANTHROPIC_API_KEY="your-anthropic-key"

# Google Gemini
export GOOGLE_API_KEY="your-google-key"

# For Google Vertex AI
export GOOGLE_APPLICATION_CREDENTIALS="path/to/service-account.json"
export GOOGLE_CLOUD_PROJECT="your-project-id"
3

Verify installation

Test your installation with a simple agent:
import asyncio
from flo_ai.builder.agent_builder import AgentBuilder
from flo_ai.llm import OpenAI

async def test_installation():
    agent = (
        AgentBuilder()
        .with_name('Test Agent')
        .with_prompt('You are a helpful assistant.')
        .with_llm(OpenAI(model='gpt-4o-mini'))
        .build()
    )
    
    response = await agent.run('Hello, world!')
    print(f'Agent response: {response}')

asyncio.run(test_installation())

Development Tools

Flo AI Studio

The Flo AI Studio is a visual workflow designer for creating AI agent workflows:
1

Install Studio dependencies

cd studio
pnpm install
2

Start the development server

pnpm dev
The studio will be available at http://localhost:5173.

Testing

Run the test suite to ensure everything is working correctly:
# Run all tests
pytest

# Run specific test files
pytest tests/unit-tests/test_agent.py

# Run with coverage
pytest --cov=flo_ai

Project Structure

Understanding the Flo AI project structure:
flo_ai/
├── flo_ai/                 # Core package
│   ├── builder/            # Agent builder components
│   ├── llm/               # LLM provider integrations
│   ├── tool/              # Tool framework
│   ├── arium/             # Workflow orchestration
│   ├── models/            # Data models
│   └── telemetry/         # Observability
├── examples/              # Example implementations
├── tests/                 # Test suite
└── studio/               # Visual workflow designer

Contributing

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/your-username/flo-ai.git
  3. Install in development mode: pip install -e .
  4. Install development dependencies: pip install -e ".[dev]"
  5. Run tests: pytest
Flo AI uses pre-commit hooks for code formatting:
# Install pre-commit
pip install pre-commit

# Install hooks
pre-commit install

# Run on all files
pre-commit run --all-files
  1. Create a feature branch: git checkout -b feature/your-feature
  2. Make your changes and add tests
  3. Run tests: pytest
  4. Commit with conventional commits: git commit -m "feat: add new feature"
  5. Push and create a pull request

Troubleshooting

If you encounter import errors, ensure you’re using Python 3.10+ and have installed all dependencies:
pip install -r requirements.txt
# or
poetry install
Verify your API keys are correctly set:
echo $OPENAI_API_KEY
echo $ANTHROPIC_API_KEY
If the studio doesn’t load, try:
cd studio
rm -rf node_modules
pnpm install
pnpm dev

Need Help?

I