Execution Flow Comparison
Autonomy Mode Flow
Whenautonomy=True, 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:
Key difference: In autonomy mode, the agent drives the iteration loop internally with safety checks. In interactive mode, the human drives the loop externally by sending messages. Both use the same
chat() → tool executor underneath.Feature Comparison
| Dimension | Autonomy Mode | Interactive Mode |
|---|---|---|
| Entry point | run_autonomous() | start() → chat() |
| Turns | Multi-turn loop (up to max_iterations) | Single turn per call |
| Self-correction | ✅ Doom loop detection + graduated recovery | ❌ None |
| File safety | ✅ Git snapshots before/after | ❌ None |
| Completion signal | Completion promise pattern (<promise>DONE</promise>) | Return value |
| Stage escalation | direct → heuristic → planned → autonomous | N/A |
| Session persistence | Auto-saves after each iteration | Manual |
| Observability | Built-in event emission | Standard logging |
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
- LSP (4): symbols, definitions, references, diagnostics
- Basic (5): read/write files, list, execute, search
praisonai tui, praisonai "prompt"Core SDK (praisonaiagents)
3 tools when
autonomy=True:ast_grep_search— structural code searchast_grep_rewrite— structural code rewriteast_grep_scan— pattern scanning
Agent(autonomy=True) in PythonTools by entry point
| Entry Point | Tools Available | Source |
|---|---|---|
praisonai tui | 13 (ACP + LSP + Basic) | CLI wrapper |
praisonai "prompt" | 13 | CLI wrapper |
praisonai tracker run | 30 (expanded set) | tracker.py |
Agent(autonomy=True) in Python | 3 (ast-grep only) | Core SDK |
Agent() in Python | 0 | — |
Design Principles
The current architecture follows a layered separation pattern: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.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.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 which mode
Use Autonomy Mode
- Multi-step tasks (refactoring, debugging)
- Tasks that need self-correction
- Batch/unattended execution
- Tasks where you want git safety nets
Use Interactive Mode
- Conversational Q&A
- Quick one-off tasks
- Human-guided workflows
- Streaming responses
Extending Tools
Adding tools for CLI users
Add tools tointeractive_tools.py:

