Package Tier Architecture
How praisonaiagents, praisonai-code, praisonai-bot, praisonai-train, praisonai-browser, praisonai-mcp, praisonai-sandbox, praisonai-deploy, and praisonai layer on top of each other
PraisonAI ships as nine packages that stack — pick the smallest one that covers what you need.
graph LR
A[praisonaiagents\nCore SDK]:::sdk --> B[praisonai-code\nTerminal CLI]:::runtime
A --> C[praisonai-bot\nBots + Gateway]:::runtime
A --> E[praisonai-train\nFine-tune + Agent training]:::runtime
A --> F[praisonai-browser\nExtension bridge + Playwright]:::runtime
A --> G[praisonai-mcp\nMCP server host]:::runtime
A --> H[praisonai-sandbox\nSandboxed code execution]:::runtime
A --> I[praisonai-deploy\nAPI + cloud deploy]:::runtime
B --> D[praisonai\nFull wrapper]:::wrapper
C --> D
E --> D
F --> D
G --> D
H --> D
I --> D
classDef sdk fill:#8B0000,stroke:#7C90A0,color:#fff
classDef runtime fill:#189AB4,stroke:#7C90A0,color:#fff
classDef wrapper fill:#10B981,stroke:#7C90A0,color:#fffQuick Start
- SDK only — embed agents in your Python app
bash pip install praisonaiagentsThe core
Agent, tools, memory, and hooks. No CLI, no gateway. - Terminal CLI — run/chat/code, no gateway or bots
bash pip install praisonai-codeThe agentic CLI (
run,chat,code) and LLM runtime, without channel bots. - Gateway + bots — channel runtime without the wrapper
bash pip install "praisonai-bot[gateway,bot]"The WebSocket gateway, Telegram/Discord/Slack bots, and the scheduler tick.
- Training — fine-tune LLMs or train agents
bash pip install "praisonai-train[llm]"LLM fine-tuning via Unsloth and iterative agent training, without the wrapper.
- Browser — automate Chrome and the web
bash pip install "praisonai-browser[all]"The bridge server, CDP agent, and Playwright engine — usable on their own or inside the full
praisonaiinstall. - MCP host — serve agents to Claude Desktop / Cursor
bash pip install "praisonai-mcp[all]"The heavy MCP host — full capability registry, recipes, and HTTP-stream auth — usable on its own or inside the full
praisonaiinstall. - Sandbox — run untrusted code in isolation
bash pip install "praisonai-sandbox[docker]"Docker, E2B, Modal, SSH, and other sandbox backends — each backend is an optional extra.
- Deploy — ship agents as an API or to the cloud
bash pip install praisonai-deployAPI, Docker, and AWS/Azure/GCP deploy via host CLIs, plus the
deployCLI group. - Everything — the full wrapper
bash pip install praisonaiTransitively pulls
praisonai-code,praisonai-bot,praisonai-train,praisonai-browser,praisonai-mcp,praisonai-sandbox,praisonai-deploy, andpraisonaiagents.
How to Choose
graph TB
Q1{What do I want to do?}
Q1 -->|Full CLI with gateway,<br/>bots & integrations| P1[pip install praisonai]
Q1 -->|Gateway + bots only| P4["pip install praisonai-bot[gateway,bot]"]
Q1 -->|Fine-tune LLMs or<br/>train agents| P5["pip install praisonai-train[llm]"]
Q1 -->|Automate Chrome /<br/>a browser| P6["pip install praisonai-browser[all]"]
Q1 -->|MCP server for Claude<br/>Desktop / Cursor| P7["pip install praisonai-mcp[all]"]
Q1 -->|Sandboxed code<br/>execution only| P8["pip install praisonai-sandbox[docker]"]
Q1 -->|Deploy agents to an<br/>API / cloud| P9[pip install praisonai-deploy]
Q1 -->|Run agents from the CLI,<br/>no bots| P2[pip install praisonai-code]
Q1 -->|Embed agents in<br/>my own Python app| P3[pip install praisonaiagents]
classDef question fill:#F59E0B,stroke:#7C90A0,color:#fff
classDef wrapper fill:#10B981,stroke:#7C90A0,color:#fff
classDef runtime fill:#189AB4,stroke:#7C90A0,color:#fff
classDef sdk fill:#8B0000,stroke:#7C90A0,color:#fff
class Q1 question
class P1 wrapper
class P2,P4,P5,P6,P7,P8,P9 runtime
class P3 sdkStart at the top: install praisonai unless you know you want a lighter footprint. Each lower tier trims dependencies at the cost of features.
How Tiers Interact at Runtime
The bot tier reaches wrapper-only features through a lazy bridge, so it stays installable on its own.
sequenceDiagram
participant User
participant Bot as praisonai-bot
participant SDK as praisonaiagents
participant Bridge as Lazy config bridge
User->>Bot: message / scheduled tick
Bot->>SDK: Agent.start(request)
SDK-->>Bot: agent response
Bot->>Bridge: resolve config (only if wrapper installed)
Bridge-->>Bot: config or standalone default
Bot-->>User: replyThe bot tier never imports the wrapper directly — the bridge resolves config the same way whether you run bot-tier standalone or the full praisonai install.
Ownership Table
Each tier owns a clear slice and must not depend upward.
| Tier | Package | Owns | Must not depend on |
|---|---|---|---|
| 1 | praisonaiagents | Agent, tools, memory, hooks, protocols | any wrapper |
| 2a | praisonai-code | run/chat/code, Typer CLI, runtime, LLM | praisonai PyPI (lazy bridge only) |
| 2b | praisonai-bot | Bots, gateway, channel CLI, OS daemon, gateway scheduler tick | praisonai PyPI (lazy bridge for jobs/UI) |
| 2c | praisonai-train | LLM fine-tuning (Unsloth), iterative agent training, train CLI group | praisonai PyPI |
| 2d | praisonai-browser | Extension bridge, CDP agent, Playwright engine, browser CLI | praisonai PyPI |
| 2e | praisonai-mcp | Heavy MCP host, adapters, recipe bridge, HTTP-stream auth | praisonai PyPI (lazy _wrapper_bridge) |
| 2f | praisonai-sandbox | Sandbox backends (Docker, E2B, Modal, SSH, …), praisonai-sandbox backends script | praisonai PyPI |
| 2g | praisonai-deploy | API/Docker/cloud deploy, deploy CLI group, Deploy API (C14, publish slot #8) | praisonai PyPI (lazy _wrapper_bridge) |
| 3 | praisonai | Framework adapters (CrewAI/AutoGen), serve, dashboard, async jobs API | — |
Publish order: praisonaiagents → praisonai-code → praisonai-bot → praisonai-train → praisonai-browser → praisonai-mcp → praisonai-sandbox → praisonai-deploy → praisonai
Config Kernel
Shared configuration lives in praisonai_code/cli/configuration/. The praisonai-bot tier reaches it through a lazy internal bridge, so the bot package stays installable on its own without importing the wrapper. You never call this bridge directly — it resolves config the same way whether you run bot-tier standalone or the full wrapper.
Common Patterns
Embed agents in my app
Install the SDK and call Agent directly.
from praisonaiagents import Agent
agent = Agent(name="assistant", instructions="You are a helpful assistant.")
agent.start("Summarise the latest release notes.")Deploy a bot with scheduled updates, no CrewAI
Install the bot tier and run a scheduled agent tick — no wrapper required.
import asyncio
from praisonaiagents import Agent
from praisonaiagents.scheduler import ScheduleRunner, FileScheduleStore
from praisonai_bot.scheduler import ScheduledAgentExecutor
agent = Agent(name="watcher", instructions="Summarise new alerts.")
runner = ScheduleRunner(FileScheduleStore("./schedules"))
executor = ScheduledAgentExecutor(runner=runner, agent_resolver=lambda _id: agent)
asyncio.run(executor.run_loop(interval=15.0))Best Practices
Start with praisonai unless you know you want a lighter install
The full wrapper pulls every tier and is the recommended default. Drop to praisonai-code, praisonai-bot, praisonai-train, praisonai-browser, praisonai-mcp, or praisonaiagents only when you have a specific reason to trim dependencies.
Shims keep old imports working — you don't need to migrate immediately
After the C9 module moves, the old praisonai.scheduler.executor and praisonai.scheduler.condition_gate paths remain importable as backward-compatibility shims when the wrapper is installed. New code should import from praisonai_bot.scheduler.*, but existing code keeps running.
The scheduler tick works standalone from bot tier; RunPolicy needs the wrapper
ScheduledAgentExecutor ships in praisonai-bot, so scheduled ticks run without the wrapper. The RunPolicy safety gate stays in praisonai — install the wrapper if you need it for unattended runs.
Related
Ask any agent where its thinking and tools actually execute
InstallationSix-package install comparison
praisonai-browser PackageBrowser-tier package guide
praisonai-mcp PackageMCP-host package guide
praisonai-bot SDKBot-tier package reference
praisonai-train PackageTraining-tier package guide
praisonai-deploy PackageDeploy-tier package guide
Scheduler Pre-Run GateCost-efficiency gate for scheduled ticks
Scheduled Run PolicySafety gate for unattended runs