Skip to main content
Flip sidebar toggles to attach Claude Code, Gemini CLI, Codex CLI, or Cursor CLI as sub-agents — no code changes required.
The user toggles an external CLI in the sidebar; the PraisonAI agent delegates work to that sub-agent and returns the result.

Quick Start

1

Install External CLI

Install one of the supported CLIs:
2

Launch PraisonAI UI

Run any PraisonAI UI entry point:
3

Enable External Agent

Open the sidebar settings — toggles for installed CLIs appear automatically. Flip the toggle for your desired external agent:
  • Claude Code: Enable for file edits and coding tasks
  • Gemini CLI: Enable for analysis and search tasks
  • Codex CLI: Enable for refactoring and optimization
  • Cursor CLI: Enable for IDE-style development tasks
4

Start Coding

With toggles on, your agent delegates coding tasks to the external CLI:

How It Works


Which Agent for Which Job


Per-Entry-Point Toggles

Auto-Availability Detection

Only CLIs that resolve via shutil.which(...) show a toggle. The CLI → command mapping is:
  • claude_enabledclaude command
  • gemini_enabledgemini command
  • codex_enabledcodex command
  • cursor_enabledcursor-agent command

Toggle IDs and Labels

Backward Compatibility: The legacy claude_code_enabled setting and PRAISONAI_CLAUDECODE_ENABLED=true environment variable still work and auto-migrate to claude_enabled on next save. No user action required.

External Agent Tools Implementation

When you enable an external agent toggle, the UI automatically adds the corresponding tool to your agent:
The integration tools provide:
  • Workspace Context: Operate against PRAISONAI_WORKSPACE or PRAISONAI_CODE_REPO_PATH
  • Streaming Output: Real-time feedback from external CLIs
  • Error Handling: Graceful fallbacks when external CLIs fail
  • Session Management: Continuation across multiple requests

Dynamic Instructions (Code UI)

In praisonai ui code, enabled external agents also modify the agent’s instructions dynamically:

Best Practices

Choose external agents based on task requirements:
  • Claude Code: File edits, refactoring, adding features
  • Gemini CLI: Code analysis, documentation, search
  • Codex CLI: Performance optimization, code quality
  • Cursor CLI: IDE-integrated development workflows
You can enable multiple agents simultaneously for complex workflows.
Enable multiple external agents for comprehensive development support:
Toggle settings persist automatically:
  • Chat/Code/Agents UI: Saved to Chainlit settings, persist across sessions
  • Main UI: Session-based, reset on restart
  • Migration: Legacy claude_code_enabled auto-migrates to claude_enabled
If a CLI toggle doesn’t appear:
  1. Check Installation: Ensure CLI is installed and on PATH
  2. Verify Command: Test CLI command manually in terminal
  3. Restart UI: Refresh browser or restart PraisonAI UI
  4. Check Logs: Look for integration errors in console

External CLI Integrations (Python API)

Use external agents programmatically in your code

External Agents (Code)

Python API reference for external agent integrations