Skip to main content

What is Arium?

Arium is Flo AI’s powerful workflow orchestration engine for creating complex multi-agent workflows. It allows you to chain agents together, implement conditional routing, and build sophisticated AI systems.

AriumBuilder Methods

The AriumBuilder class provides a fluent interface for configuring workflows. All methods return self for method chaining. Here’s a complete reference: Note: start_with() and end_with() are required before calling build(). All other methods are optional.

Node Types

Arium workflows support several types of nodes, each serving different purposes:

Agent Nodes

Agents are the primary executable nodes in Arium workflows. They use LLMs to process inputs and generate responses.

Function Nodes

Function nodes allow you to execute custom Python functions within workflows. They can be synchronous or asynchronous.

Arium Nodes (Nested Workflows)

Arium nodes allow you to embed one workflow inside another, creating hierarchical workflows with isolated memory.

ForEach Nodes

ForEach nodes execute a node on each item in a collection, useful for batch processing.

Combining Node Types

You can combine different node types in a single workflow:

Basic Workflow Creation

Simple Agent Chain

Create a linear workflow with multiple agents:

Conditional Routing

Route to different agents based on conditions:

YAML-Based Workflows

Define entire workflows in YAML for easy management:

Advanced Routing

LLM-Powered Routers

Use LLMs for intelligent routing decisions:

ReflectionRouter

For A→B→A→C feedback patterns:

PlanExecuteRouter

For Cursor-style plan-and-execute workflows:

Workflow Patterns

Sequential Processing

Parallel Processing

Fan-out/Fan-in

Memory Management

Shared Memory

Custom Memory

You can extend MessageMemory to add custom functionality:

Workflow Execution

Running Workflows

Workflows can be executed using build_and_run() or by building first and then running:

Error Handling

Error handling in Arium workflows is managed at the agent level. Configure retries and error handling when building agents:

Performance Optimization

Parallel Execution

Arium automatically executes agents in parallel when multiple agents are connected from the same source node:

Workflow Visualization

Visualize your workflow to understand the execution flow:

Best Practices

Workflow Design

  1. Keep it simple: Start with linear workflows before adding complexity
  2. Use meaningful names: Name agents and workflows descriptively
  3. Handle errors: Always implement error handling and recovery
  4. Test thoroughly: Test workflows with various inputs

Performance Tips

  1. Use appropriate models: Choose models based on task complexity
  2. Implement caching: Cache expensive operations
  3. Optimize routing: Use efficient routing logic
  4. Monitor performance: Use telemetry to track workflow performance

Debugging

Enable debug logging at the Python level to troubleshoot workflows: