Skip to main content
Migrate your existing agent projects to PraisonAI using an AI-driven workflow that analyzes, converts, and validates your codebase automatically.

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:

Evaluation Loop

The Evaluator uses LLM-as-Judge scoring (1-10). A score of 8+ indicates successful migration.

Programmatic API

Migration Tips

Multi-file projects: The migration analyzes ALL files before converting, ensuring cross-file dependencies are handled correctly.
Always use version control: Commit your code before running migration with --apply.
Review the output: Even with AI validation, review the converted code to ensure it meets your requirements.

Troubleshooting

The Evaluator may be finding issues. Check the error analysis output for specific problems. You may need to manually adjust complex patterns.
Files without recognizable agent patterns are skipped. The Analyzer Agent only processes files with detectable patterns.
Ensure you have praisonaiagents installed. Some source-specific tools may need manual replacement.

API Migration: verbose= to output=

The verbose= parameter has been consolidated into the output= parameter across all PraisonAI components.

Quick Migration

Output Presets

Component Status

Breaking Change: Agent(verbose=True) raises TypeError. Update to Agent(output="verbose").

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=

Replace max_iter= with an execution= preset ("fast" sets max_iter=10, "balanced" sets max_iter=20) or pass an explicit value.

session= → variables=

The session= kwarg is gone. Pass session state through variables= and call session.save() explicitly.

Removed kwargs at a glance

Breaking Change: AgentTeam(max_iter=…) and AgentTeam(session=…) raise TypeError. Use execution= and variables=.

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.
All four are importable from the package root and point to the same object:
PraisonAIAgents was missing from the root __all__ in a recent release; upgrade to praisonaiagents ≥ 1.6.162 (PraisonAI PR #3675) if from praisonaiagents import PraisonAIAgents raises ImportError.

Best Practices

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.
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.
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.
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.
Run and validate migrated agents from the command line.
Set project-wide defaults for your migrated agents.