How It Works
The user points the CLI at a project; AgentFlow runs four agents in sequence — Analyzer reads the codebase, Converter transforms it, Evaluator scores the result (1–10), and Error Agent diagnoses failures and retries up to 3 times.Quick Start
1
Point to Your Project
2
AI Analyzes All Files
The Analyzer Agent reads your entire codebase to understand relationships between files.
3
Intelligent Conversion
The Converter Agent transforms your code using learned patterns.
4
Automatic Validation
The Evaluator Agent tests the converted code. If issues are found, the Error Agent analyzes and retries (up to 3 times).
The Migration Agents
Analyzer Agent
Scans all files in your project to understand:
- Agent definitions and their relationships
- Task dependencies
- Workflow patterns
- Import structures
Converter Agent
Transforms your code using a feature spec:
- Maps parameters to PraisonAI equivalents
- Preserves logic and behavior
- Handles multi-file dependencies
Evaluator Agent
Uses LLM-as-Judge to verify:
- Syntax correctness
- Functional equivalence
- Import completeness
Error Agent
When evaluation fails:
- Analyzes the error
- Identifies root cause
- Triggers retry with fixes
CLI Reference
string
required
Path to file or directory to migrate
string
Output directory for converted files
flag
Apply changes (default is dry-run preview)
integer
default:"3"
Maximum retry attempts on evaluation failure
Feature Mapping
The migration uses a feature specification to map patterns:Agent Parameters
Agent Parameters
Evaluation Loop
The Evaluator uses LLM-as-Judge scoring (1-10). A score of 8+ indicates successful migration.
Programmatic API
Migration Tips
Review the output: Even with AI validation, review the converted code to ensure it meets your requirements.
Troubleshooting
Migration keeps retrying
Migration keeps retrying
The Evaluator may be finding issues. Check the error analysis output for specific problems. You may need to manually adjust complex patterns.
Some files not converted
Some files not converted
Files without recognizable agent patterns are skipped. The Analyzer Agent only processes files with detectable patterns.
Import errors after migration
Import errors after migration
Ensure you have
praisonaiagents installed. Some source-specific tools may need manual replacement.API Migration: verbose= to output=
Theverbose= parameter has been consolidated into the output= parameter across all PraisonAI components.
Quick Migration
- Agent
- AgentTeam
- Process
Output Presets
Component Status
API Migration: max_iter= / session=
AgentTeam also removed the max_iter= and session= kwargs. Both now raise TypeError — use execution= for iteration limits and variables= for session state.
max_iter= → execution=
Replacemax_iter= with an execution= preset ("fast" sets max_iter=10, "balanced" sets max_iter=20) or pass an explicit value.
- Preset
- Explicit max_iter
session= → variables=
Thesession= kwarg is gone. Pass session state through variables= and call session.save() explicitly.
Removed kwargs at a glance
Back-compat class aliases
AgentTeam is the canonical multi-agent class in v1.0+. The SDK also exposes three silent aliases that resolve to the same class, so old snippets, older docs, and downstream integrations keep working unchanged.
All four names resolve to the same class object — the aliases are not deprecated and there is no plan to remove them. Prefer
AgentTeam for new code; keep any of the aliases you already have in existing code.Best Practices
Migrate a copy, not your working tree
Migrate a copy, not your working tree
The migration pipeline rewrites source files as it converts patterns. Point it at a clean checkout or branch so you can diff the result and roll back if the Evaluator score is low. Version control makes reviewing the Converter’s changes straightforward.
Trust the 8+ score gate
Trust the 8+ score gate
The Evaluator uses LLM-as-Judge scoring from 1–10 and treats 8+ as a successful migration. Don’t ship a converted project that scores below that threshold — let the Error Agent’s retries (up to 3) run, then review any file the Evaluator still flags.
Update verbose= to output= first
Update verbose= to output= first
Agent(verbose=True) now raises TypeError. Replace it with Agent(output="verbose") before migrating, and prefer output= over the deprecated verbose= on AgentTeam, Process, and Workflow too. This clears the most common breaking change up front.Review imports after conversion
Review imports after conversion
The Analyzer maps import structures, but confirm the converted project uses friendly top-level imports (
from praisonaiagents import Agent, Task, AgentTeam) and that any custom tools resolve. A quick smoke run catches missed dependencies the Evaluator can’t see.Related
Run and validate migrated agents from the command line.
Set project-wide defaults for your migrated agents.

