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
8 changes: 4 additions & 4 deletions TOOLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Every tool has these properties:
### Using Tools in Agents

```python
from flo_ai.builder.agent_builder import AgentBuilder
from flo_ai.agent import AgentBuilder
from flo_ai.llm import OpenAI

agent = (AgentBuilder()
Expand Down Expand Up @@ -95,7 +95,7 @@ Partial tools allow you to pre-fill some parameters during agent building, hidin
#### Method 1: Using AgentBuilder.add_tool()

```python
from flo_ai.builder.agent_builder import AgentBuilder
from flo_ai.agent import AgentBuilder

# BigQuery tool with multiple parameters
@flo_tool(description="Query BigQuery database")
Expand Down Expand Up @@ -304,7 +304,7 @@ agent:
### Using YAML Configuration

```python
from flo_ai.builder.agent_builder import AgentBuilder
from flo_ai.agent import AgentBuilder

# Create tool registry
tool_registry = {
Expand All @@ -331,7 +331,7 @@ agent = AgentBuilder.from_yaml(
```python
import asyncio
from flo_ai.tool.flo_tool import flo_tool
from flo_ai.builder.agent_builder import AgentBuilder
from flo_ai.agent import AgentBuilder
from flo_ai.llm import OpenAI

# Define tools
Expand Down
2 changes: 1 addition & 1 deletion documentation/development.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Test your installation with a simple agent:

```python
import asyncio
from flo_ai.builder.agent_builder import AgentBuilder
from flo_ai.agent import AgentBuilder
from flo_ai.llm import OpenAI

async def test_installation():
Expand Down
14 changes: 7 additions & 7 deletions documentation/essentials/agents.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 'Agents'
description: 'Learn how to create and configure AI agents with Flo AI'
icon: 'robot'
title: "Agents"
description: "Learn how to create and configure AI agents with Flo AI"
icon: "robot"
---

## Creating Agents
Expand All @@ -13,7 +13,7 @@ Agents are the core building blocks of Flo AI. They represent AI-powered entitie
Create a simple conversational agent:

```python
from flo_ai.builder.agent_builder import AgentBuilder
from flo_ai.agent import AgentBuilder
from flo_ai.llm import OpenAI

agent = (
Expand Down Expand Up @@ -180,7 +180,7 @@ well_prompted_agent = (
1. Review code for bugs, security issues, and best practices
2. Suggest improvements and optimizations
3. Provide constructive feedback

Always be specific about issues and provide actionable suggestions.
Focus on code quality, performance, and maintainability.
''')
Expand Down Expand Up @@ -263,10 +263,10 @@ from flo_ai.arium.memory import BaseMemory
class CustomMemory(BaseMemory):
def __init__(self):
self.messages = []

def add(self, message):
self.messages.append(message)

def get(self):
return self.messages

Expand Down
30 changes: 15 additions & 15 deletions documentation/essentials/arium.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 'Arium Workflows'
description: 'Create complex multi-agent workflows with Arium orchestration'
icon: 'sitemap'
title: "Arium Workflows"
description: "Create complex multi-agent workflows with Arium orchestration"
icon: "sitemap"
---

## What is Arium?
Expand All @@ -16,25 +16,25 @@ Create a linear workflow with multiple agents:

```python
from flo_ai.arium import AriumBuilder
from flo_ai.models.agent import Agent
from flo_ai.agent import Agent
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 @@ -44,7 +44,7 @@ async def simple_chain():
.end_with(summarizer)
.build_and_run(["Analyze this complex business report..."])
)

return result
```

Expand All @@ -59,7 +59,7 @@ def route_by_type(memory: BaseMemory) -> str:
"""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:
Expand Down Expand Up @@ -96,7 +96,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 @@ -130,7 +130,7 @@ Use LLMs for intelligent routing decisions:
```yaml
routers:
- name: "content_type_router"
type: "smart" # Uses LLM for intelligent routing
type: "smart" # Uses LLM for intelligent routing
routing_options:
technical_writer: "Technical content, documentation, tutorials"
creative_writer: "Creative writing, storytelling, fiction"
Expand All @@ -148,7 +148,7 @@ For A→B→A→C feedback patterns:
routers:
- name: "reflection_router"
type: "reflection"
flow_pattern: [writer, critic, writer] # A → B → A pattern
flow_pattern: [writer, critic, writer] # A → B → A pattern
model:
provider: "openai"
name: "gpt-4o-mini"
Expand Down Expand Up @@ -248,10 +248,10 @@ from flo_ai.arium.memory import BaseMemory
class CustomMemory(BaseMemory):
def __init__(self):
self.data = {}

def add(self, key, value):
self.data[key] = value

def get(self, key):
return self.data.get(key)

Expand Down
26 changes: 13 additions & 13 deletions documentation/essentials/code.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 'Code Examples'
description: 'Flo AI code examples and syntax highlighting'
icon: 'code'
title: "Code Examples"
description: "Flo AI code examples and syntax highlighting"
icon: "code"
---

## Basic Agent Creation
Expand All @@ -10,7 +10,7 @@ Here's how to create a simple conversational agent with Flo AI:

```python Simple Agent
import asyncio
from flo_ai.builder.agent_builder import AgentBuilder
from flo_ai.agent import AgentBuilder
from flo_ai.llm import OpenAI

async def main():
Expand All @@ -34,7 +34,7 @@ Create agents that can use custom tools:

```python Tool-Using Agent
import asyncio
from flo_ai.builder.agent_builder import AgentBuilder
from flo_ai.agent import AgentBuilder
from flo_ai.tool import flo_tool
from flo_ai.llm import Anthropic

Expand Down Expand Up @@ -72,7 +72,7 @@ Use Pydantic models for structured agent responses:
```python Structured Output
import asyncio
from pydantic import BaseModel, Field
from flo_ai.builder.agent_builder import AgentBuilder
from flo_ai.agent import AgentBuilder
from flo_ai.llm import OpenAI

class MathSolution(BaseModel):
Expand Down Expand Up @@ -102,25 +102,25 @@ Create complex workflows with multiple agents:
```python Multi-Agent Workflow
import asyncio
from flo_ai.arium import AriumBuilder
from flo_ai.models.agent import Agent
from flo_ai.agent import Agent
from flo_ai.llm import OpenAI

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

# Create specialized 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 @@ -130,7 +130,7 @@ async def content_analysis_workflow():
.end_with(summarizer)
.build_and_run(["Analyze this complex business report..."])
)

return result

asyncio.run(content_analysis_workflow())
Expand All @@ -154,7 +154,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
Loading