praisonai-code is the standalone code-execution agent runtime that sits between the core SDK (praisonaiagents) and the full wrapper (praisonai). It is not a GUI or a gateway — it is the engine that powers the praisonai CLI, packaged so you can use it without pulling in gateway, bots, or other wrapper integrations.
Package Boundaries
praisonai-code sits in the four-tier package model between praisonaiagents (SDK) and praisonai (wrapper). It never imports the wrapper at module load, and reaches wrapper-only features through a single bridge (praisonai_code._wrapper_bridge). Its sibling praisonai-bot owns bots, gateway, channel CLI, and the gateway scheduler tick — see the praisonai-bot SDK page.
You can build an Agent and call agent.start() standalone; only gateway/bot serving needs the wrapper.
Four-tier ownership
| Package | Owns | Must not depend on |
|---|---|---|
praisonaiagents | Agent, tools, memory, hooks, framework protocols, bot/gateway protocols | praisonai, praisonai-code, praisonai-bot |
praisonai-code | Terminal CLI: run/chat/code, Typer, runtime, llm, tool resolution | PyPI cycle on praisonai (lazy _wrapper_bridge only) |
praisonai-bot | Bots, gateway server, channel CLI, OS daemon, gateway scheduler tick | PyPI cycle on praisonai (lazy _wrapper_bridge + _code_bridge only) |
praisonai wrapper | Framework adapters (CrewAI/AutoGen), train, serve, dashboard, async jobs API, RunPolicy safety gate | — |
praisonaiagents → praisonai-code + praisonai-bot → praisonai
Wrapper bridge
The only sanctioned way forpraisonai-code code to reach wrapper modules is through praisonai_code._wrapper_bridge. This makes standalone installs work — every wrapper call is guarded, so a missing praisonai package downgrades cleanly instead of raising ImportError at import time.
| Helper | Purpose |
|---|---|
wrapper_available() | Probe if praisonai is importable — no side effects |
import_wrapper_module(name) | Import a wrapper module (e.g. "praisonai.framework_adapters.registry") with an install-hint error if missing |
get_wrapper_attr(module, attr) | Fetch a wrapper attribute; raise with install hint if missing |
optional_wrapper_attr(module, attr, default) | Fetch an attribute or return the supplied default — used by e.g. recipe_creator.py for graceful fallback |
Quick Start
Set your API key
ANTHROPIC_API_KEY, GEMINI_API_KEY, GROQ_API_KEY, OLLAMA_HOST, …). See Provider Auto-Detection.What ships in this package
Thepraisonai_code Python package contains the terminal-native CLI and agent runtime. Current published versions are shown on the installation page. It contains the full CLI implementation used by the praisonai wrapper command, plus the agent runtime modules.
| Module | Description |
|---|---|
praisonai_code.cli | Full CLI command tree (run, chat, code, agent, agents, memory, tools, mcp, hooks, and more) |
praisonai_code.cli.execution | Core agent execution engine |
praisonai_code.cli.configuration | Configuration loader and schema |
praisonai_code.cli.commands.* | Individual CLI sub-commands |
praisonai-code installs a praisonai-code console script and a python -m praisonai_code module entrypoint. On a standalone install (no wrapper), praisonai-code run --output actions "prompt", daemon start, config, and doctor work directly. Default run "prompt", chat, and code require the wrapper — install with pip install praisonai to unlock them (a clear install hint is printed if you invoke them standalone). See the Standalone limits table below.Standalone limits (pip install praisonai-code only)
| Command | Works standalone? | Notes |
|---|---|---|
run --help, config, doctor | Yes | |
run --output actions "…" | Yes | In-process Agent |
run "…" (default) | No | Requires pip install praisonai |
chat, code | No | TUI / interactive legacy live in wrapper |
daemon start (foreground) | Yes | |
daemon start --background | Yes | Spawns python -m praisonai_code.runtime |
chat, code, default run), install the wrapper: pip install praisonai.
What is not in this package
praisonai-code deliberately excludes the features that live in the praisonai wrapper:
- Gateway — messaging relay and session management. Install
praisonai-bot[gateway]for the standalone gateway, or install the fullpraisonaiwrapper. See Standalone Bot Gateway. - Bots — Telegram, Discord, Slack, WhatsApp integrations. Install
praisonai-bot[bot]for standalone channel bots. - Gateway scheduler tick — scheduled agent execution. Lives in
praisonai-bot; theRunPolicysafety gate stays wrapper-only. - YAML-driven multi-bot orchestration —
praisonai onboard,praisonai setup(wrapper). - Framework adapters — CrewAI, AutoGen (wrapper).
When to pick this vs the wrapper vs the SDK
| Use case | Install |
|---|---|
| Embed agents in your own Python application | pip install praisonaiagents |
Run agents from a CLI with run --output actions / daemon only | pip install praisonai-code |
| Deploy a Telegram/Slack/Discord bot + gateway without the full wrapper | pip install "praisonai-bot[gateway,bot]" |
Full terminal UX (chat, code, default run) + gateway + framework adapters | pip install praisonai |
Best Practices
Use simple imports
Use simple imports
Always import from
praisonaiagents, not from praisonai_code internals. The core SDK API is stable; internal CLI modules are implementation details.Environment variables over code
Environment variables over code
Set API keys as environment variables rather than hardcoding them.
praisonai-code reads the same environment variables as praisonaiagents.Multi-agent patterns
Multi-agent patterns
praisonai-code inherits the full praisonaiagents multi-agent API:Upgrading to the full wrapper later
Upgrading to the full wrapper later
If you start with
praisonai-code and later need gateway or bot features, add pip install "praisonai-bot[gateway,bot]" for the standalone bot path, or pip install praisonai for the full wrapper. Nothing in your existing code needs to change — the same from praisonaiagents import Agent imports still work.Related
Installation Guide
Three-package comparison and decision guide
praisonai SDK
Full wrapper with gateway and bots
praisonaiagents SDK
Core agent SDK
Quick Start
Build your first agent

