Skip to main content

Documentation Index

Fetch the complete documentation index at: https://wavefront.rootflo.ai/llms.txt

Use this file to discover all available pages before exploring further.

Get started with Flo AI in three steps

Build your first AI agent and understand the core concepts of Flo AI.

Step 1: Installation

Install Flo AI using pip or poetry:
pip install flo-ai
poetry add flo-ai
uv add flo-ai
Flo AI requires Python 3.10 or higher.
Configure your LLM provider API keys:
export OPENAI_API_KEY="your-openai-key"
export ANTHROPIC_API_KEY="your-anthropic-key"
export GOOGLE_API_KEY="your-google-key"

Step 2: Your First Agent

Create your first conversational agent:
import asyncio
from flo_ai.agent import AgentBuilder
from flo_ai.llm import OpenAI

async def main():
    # Create a simple conversational agent
    agent = (
        AgentBuilder()
        .with_name('Math Tutor')
        .with_prompt('You are a helpful math tutor.')
        .with_llm(OpenAI(model='gpt-4o-mini'))
        .build()
    )

    response = await agent.run('What is the formula for the area of a circle?')
    print(f'Response: {response[-1].content}')

asyncio.run(main())
Make sure you have set your OpenAI API key before running this example.

Step 3: Add Tools and Structure

Build an agent that can use tools:
import asyncio
from flo_ai.agent import AgentBuilder
from flo_ai.tool import flo_tool
from flo_ai.llm import Anthropic

@flo_tool(description="Perform mathematical calculations")
async def calculate(operation: str, x: float, y: float) -> float:
    """Calculate mathematical operations between two numbers."""
    operations = {
        'add': lambda: x + y,
        'subtract': lambda: x - y,
        'multiply': lambda: x * y,
        'divide': lambda: x / y if y != 0 else 0,
    }
    return operations.get(operation, lambda: 0)()

async def main():
    agent = (
        AgentBuilder()
        .with_name('Calculator Assistant')
        .with_prompt('You are a math assistant that can perform calculations.')
        .with_llm(Anthropic(model='claude-3-5-sonnet-20240620'))
        .with_tools([calculate.tool])
        .build()
    )

    response = await agent.run('Calculate 5 plus 3')
    print(f'Response: {response[-1].content}')

asyncio.run(main())

Next Steps

Now that you have your first agent running, explore these key features:

Multi-Agent Workflows

Learn how to create complex multi-agent workflows with Arium.

YAML Configuration

Define entire agent architectures in YAML for easy management.

Visual Studio

Design AI workflows visually with our React-based studio.

Production Deployment

Learn about production-ready features and best practices.
Need help? Check out our examples or join our community.