At a Glance: Iterative vs. Interactive
While the names sound similar, they represent the two sides of “who drives the loop”:Execution Mode
AutonomyConfig has a mode field that controls execution behavior:
autonomy=True now defaults to caller mode — one chat() call wrapped in AutonomyResult. No wasteful iteration loop. Use mode="iterative" or level="full_auto" for multi-turn autonomous loops.Execution Flow Comparison
Caller Mode (default for autonomy=True)
Iterative Mode (default for full_auto)
When mode="iterative", the agent runs a multi-turn loop with safety infrastructure:
Interactive Mode Flow
In interactive mode, the human drives the loop — each message is a single-turnchat() call:
The Loop Driver Distinction:
- Interactive Mode: The human provides the prompt, the agent responds once, and the human decides the next prompt.
- Iterative Mode: The agent provides its own prompts to itself in a loop until it detects the task is complete.
- Caller Mode: A simplified “one-shot” interaction that returns rich metadata.
Feature Comparison
Speed Profile
Init Overhead (one-time)
With
autonomy=True (defaults), init overhead is < 5ms since track_changes=False and observe=False by default.Per-Iteration Overhead
Per-iteration overhead is ~0.5ms — negligible compared to LLM API calls (typically 1-30 seconds each). The real speed difference is the number of LLM calls, not framework overhead.
End-to-End Comparison
Important Behavioral Differences
Approval with autonomy=True: Default level is
"suggest", which does NOT auto-approve tools. Only level="full_auto" auto-wires AutoApproveBackend.Two-Layer Tool Architecture
Tools are provisioned at two independent layers. The CLI wrapper assembles tool lists and passes them astools=[...] to the SDK’s Agent() constructor:
What each layer provides
CLI Wrapper (praisonai)
13 tools via
get_interactive_tools():- ACP (4): create/edit/delete files, execute commands (disabled by default in autonomy)
- LSP (4): symbols, definitions, references, diagnostics
- Basic (5): read/write files, list, execute, search
praisonai tui, praisonai "prompt"Core SDK (praisonaiagents)
16 tools when
autonomy=True via AUTONOMY_PROFILE:- file_ops (7): read/write/list/copy/move/delete/info
- shell (3): execute_command, list_processes, get_system_info
- web (3): internet_search, search_web, web_crawl
- code_intelligence (3): ast_grep search/rewrite/scan
Agent(autonomy=True) in PythonBuilt-in ToolProfiles
The SDK ships with composable profiles intools/profiles.py:
Tools by entry point
Design Principles
The current architecture follows a layered separation pattern:1
Core SDK stays minimal
The
praisonaiagents package provides the agent runtime, tool execution, and LLM integration — but does not bundle default tools. This keeps the SDK lightweight and avoids opinionated defaults.2
CLI wrapper adds batteries
The
praisonai wrapper package adds ACP, LSP, file operations, and search tools for CLI users. It assembles toolsets and passes them as tools=[...] to the Agent constructor.3
Tools are data, not hardcoded
Interactive tools are defined as groups in
interactive_tools.py with a TOOL_GROUPS dictionary. New tools are added to a group, and all consumers automatically get them.Why this is the best approach
SDK independence
SDK independence
The Core SDK has zero dependency on the CLI wrapper. Users embedding
praisonaiagents in their own applications bring exactly the tools they need — no surprise defaults, no bloat.Composable toolsets
Composable toolsets
Each entry point assembles its own toolset.
praisonai tui loads ACP + LSP + Basic. praisonai tracker run loads a broader set. SDK users pass their own tools. This is intentional — different contexts need different capabilities.Single source of truth
Single source of truth
interactive_tools.py with get_interactive_tools() is the canonical provider. Both tui/app.py and main.py call this single function. Adding a new interactive tool means editing one file.When to Use Each Mode
No Autonomy
Fastest — agent explains but doesn’t act.
Caller Mode
One turn — agent acts immediately with tools.
Iterative Mode
Multi-turn — agent self-corrects until done.
Extending Tools
Using ToolProfiles (recommended)
Combine built-in profiles or register custom ones:Adding tools for CLI users
Add tools tointeractive_tools.py:
Adding tools for SDK users
Pass tools directly — the SDK is tool-agnostic:Related
Autonomy Concepts
Configuration, stages, and doom loop detection
Autonomous Loops
Execution loop details and async support
Interactive Tools
ACP, LSP, and basic tool reference
Autonomy Modes
Suggest, auto-edit, and full-auto modes

