Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 25 additions & 28 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,34 @@ on:
pull_request:
branches:
- develop
workflow_dispatch: # Allows manual triggering from the GitHub Actions UI
workflow_dispatch: # Allows manual triggering from the GitHub Actions UI

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.3
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install dependencies
run: cd flo_ai && poetry lock && poetry install

- name: Run Ruff
run: cd flo_ai && poetry run pre-commit run --all-files

- name: Run build
run: cd flo_ai && poetry build

- name: Run tests
run: cd flo_ai && poetry run pytest -m "not (integration)"

- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.7.3"

- name: Install dependencies
run: cd flo_ai && uv sync

- name: Run Ruff
run: cd flo_ai && uv run pre-commit run --all-files

- name: Run build
run: cd flo_ai && uv build

- name: Run tests
run: cd flo_ai && uv run pytest -m "not (integration)"
4 changes: 1 addition & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ We appreciate your input!
## Installing Dependencies

```cmd
poetry lock
poetry install
pre-commit install
uv sync
```
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ Flo AI is a Python framework that makes building production-ready AI agents and
pip install flo-ai
# or using poetry
poetry add flo-ai
# or using uv
uv add flo-ai
```

### Your First Agent (30 seconds)
Expand Down Expand Up @@ -193,24 +195,27 @@ Flo AI Studio is a modern, intuitive visual editor that allows you to design com
### 🏃‍♂️ Quick Start with Studio

1. **Start the Studio**:

```bash
cd studio
pnpm install
pnpm dev
```

2. **Design Your Workflow**:

- Add agents, routers, and tools to the canvas
- Configure their properties and connections
- Test with the built-in validation

3. **Export & Run**:

```python
from flo_ai.arium import AriumBuilder

builder = AriumBuilder.from_yaml(yaml_file='your_workflow.yaml')
result = await builder.build_and_run(['Your input here'])
```
```

## 🔧 Core Features

Expand Down Expand Up @@ -302,7 +307,7 @@ from flo_ai.models.document import DocumentMessage, DocumentType
document_type=DocumentType.PDF,
document_file_path='business_report.pdf'
)

# Process with agent
agent = (
AgentBuilder()
Expand Down Expand Up @@ -363,20 +368,20 @@ from flo_ai.llm import OpenAI

async def simple_chain():
llm = OpenAI(model='gpt-4o-mini')

# Create agents
analyst = Agent(
name='content_analyst',
system_prompt='Analyze the input and extract key insights.',
llm=llm
)

summarizer = Agent(
name='summarizer',
name='summarizer',
system_prompt='Create a concise summary based on the analysis.',
llm=llm
)

# Build and run workflow
result = await (
AriumBuilder()
Expand All @@ -386,7 +391,7 @@ async def simple_chain():
.end_with(summarizer)
.build_and_run(["Analyze this complex business report..."])
)

return result
```

Expand All @@ -399,12 +404,12 @@ from flo_ai.arium.memory import BaseMemory
"""Route based on classification result"""
messages = memory.get()
last_message = str(messages[-1]) if messages else ""

if "technical" in last_message.lower():
return "tech_specialist"
else:
return "business_specialist"

# Build workflow with conditional routing
result = await (
AriumBuilder()
Expand Down Expand Up @@ -436,7 +441,7 @@ arium:
model:
provider: "openai"
name: "gpt-4o-mini"

- name: "summarizer"
role: "Content Summarizer"
job: "Create a concise summary based on the analysis."
Expand Down Expand Up @@ -548,24 +553,28 @@ Check out the `examples/` directory for comprehensive examples:
Visit our [website](https://www.rootflo.ai) to know more

**Additional Resources:**

- [@flo_tool Decorator Guide](TOOLS.md) - Complete guide to the `@flo_tool` decorator
- [Examples Directory](flo_ai/examples/) - Ready-to-run code examples
- [Contributing Guide](CONTRIBUTING.md) - How to contribute to Flo AI

## 🌟 Why Flo AI?

### For Developers

- **Simple Setup**: Get started in minutes with minimal configuration
- **Flexible**: Use YAML or code-based configuration
- **Production Ready**: Built-in error handling and retry mechanisms
- **Multi-LLM**: Switch between providers easily

### For Teams

- **Maintainable**: YAML-first approach makes configurations versionable
- **Testable**: Each component can be tested independently
- **Scalable**: From simple agents to complex multi-tool systems

### Use Cases

- 🤖 Customer Service Automation
- 📊 Data Analysis and Processing
- 📝 Content Generation and Summarization
Expand All @@ -592,4 +601,4 @@ Flo AI is [MIT Licensed](LICENSE).
<strong>Built with ❤️ by the <a href="http://rootflo.ai">rootflo</a> team</strong>
<br><a href="https://github.com/rootflo/flo-ai/discussions">Community</a> •
<a href="https://flo-ai.rootflo.ai">Documentation</a>
</div>
</div>
29 changes: 16 additions & 13 deletions documentation/development.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
title: 'Development'
description: 'Set up your development environment for Flo AI'
title: "Development"
description: "Set up your development environment for Flo AI"
---

<Info>
**Prerequisites**:
- Python 3.10 or higher
- pip or poetry package manager
**Prerequisites**: - Python 3.10 or higher - pip, poetry or uv package manager
- API keys for your chosen LLM providers
</Info>

Expand All @@ -15,14 +13,17 @@ Follow these steps to set up your development environment for Flo AI.
<Steps>
<Step title="Install Flo AI">

Install Flo AI using pip or poetry:
Install Flo AI using pip, poetry or uv:

```bash
# Using pip
pip install flo-ai

# Using poetry
poetry add flo-ai

#Using uv
uv add flo-ai
```

</Step>
Expand Down Expand Up @@ -65,7 +66,7 @@ async def test_installation():
.with_llm(OpenAI(model='gpt-4o-mini'))
.build()
)

response = await agent.run('Hello, world!')
print(f'Agent response: {response}')

Expand Down Expand Up @@ -151,14 +152,14 @@ flo_ai/
<Accordion title="Code style and formatting">

Flo AI uses pre-commit hooks for code formatting:

```bash
# Install pre-commit
pip install pre-commit

# Install hooks
pre-commit install

# Run on all files
pre-commit run --all-files
```
Expand All @@ -182,19 +183,21 @@ flo_ai/
<Accordion title="Import errors">

If you encounter import errors, ensure you're using Python 3.10+ and have installed all dependencies:

```bash
pip install -r requirements.txt
# or
poetry install
# or
uv sync
```

</Accordion>

<Accordion title="API key issues">

Verify your API keys are correctly set:

```bash
echo $OPENAI_API_KEY
echo $ANTHROPIC_API_KEY
Expand All @@ -205,7 +208,7 @@ flo_ai/
<Accordion title="Studio not loading">

If the studio doesn't load, try:

```bash
cd studio
rm -rf node_modules
Expand Down
2 changes: 2 additions & 0 deletions documentation/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Build your first AI agent and understand the core concepts of Flo AI.
pip install flo-ai
# or using poetry
poetry add flo-ai
# or using uv
uv add flo-ai
```

<Tip>Flo AI requires Python 3.10 or higher.</Tip>
Expand Down
Loading