Pure Mode (Suppress Plugins)

Skip plugin discovery for a single run — clean, deterministic baseline

Pure Mode skips external-plugin discovery for a single run without touching your saved enable/disable state.

Diagram

Pure Mode

Yes

No

📝 CLI Run

🚦 –pure?

⏭️ Skip discovery

🔌 Load plugins

🤖 Clean agent

Quick Start

  1. Use the CLI flag
    bash
    praisonai run --pure "Summarise this file"
  2. Or set the env var
    bash
    export PRAISONAI_NO_PLUGINS=1
    praisonai chat

How It Works

The CLI flag sets PRAISONAI_NO_PLUGINS only for the current run, then restores the prior value on return.

Diagram
PRAISONAI_NO_PLUGINSPluginManagerscoped_no_plugins()CLI (chat / run / code)UserPRAISONAI_NO_PLUGINSPluginManagerscoped_no_plugins()CLI (chat / run / code)Userpraisonai run –pure “task”enter (–pure = True)set “1” (save prior value)discover_entry_points()read“1”0 (short-circuit + notice)exitrestore prior valueresponse (plugin-free run)

The @scopes_no_plugins decorator wraps each command, so suppression is restored on return and never leaks into a later in-process call. The run emits one log line: “Running without external plugins (–pure / PRAISONAI_NO_PLUGINS)”.


Configuration

Three surfaces suppress plugins. A constructor disabled=True wins; otherwise the env var decides.

SurfacePrecedencePersists?Use when
PluginManager(disabled=True)1 (wins)NoEmbedded Python, one call, deterministic
--pure / --no-plugins CLI flag2No — scoped, auto-restoredOne CLI invocation
PRAISONAI_NO_PLUGINS=1 env var3Only for the shellWhole CI job / shell session
(none) — default4—Normal use (backward-compatible)

The env var accepts true, 1, or yes (case-insensitive). Pure Mode never mutates .praisonai/config.yaml or any persisted enable/disable state.

Diagram

Need to skip plugins?

One-off CLI run

Whole shell / CI job

Embedded Python — one call

praisonai run –pure

export PRAISONAI_NO_PLUGINS=1

PluginManager(disabled=True)

Python parity forces suppression regardless of the env var:

python
from praisonaiagents.plugins import PluginManager

manager = PluginManager(disabled=True)
manager.discover_entry_points()   # returns 0; no plugins loaded

Common Patterns

Reproduce a CI failure without whatever plugin your machine has enabled:

bash
praisonai run --pure "Reproduce the failing task"

Debug a plugin regression by comparing a normal run with a plugin-free one:

bash
praisonai chat --no-plugins

Reuse in a notebook — one cell runs pure, the next picks plugins back up automatically:

python
from praisonai_code.cli.commands.run import run_main

run_main(pure=True)   # this call: no plugins
run_main()            # next call: plugins restored automatically

Best Practices

Use –pure for bug reports

Attach the plugin-free reproduction alongside the normal one — it makes obvious whether a plugin is involved.

Prefer the CLI flag over the env var for one-offs

The flag’s scope is guaranteed — it always restores the prior value on return.

Keep PRAISONAI_NO_PLUGINS out of your shell rc

A persistent export defeats the one-shot contract and hides real plugin behaviour from every command.

Check plugins doctor to see which mode you're in

praisonai plugins doctor tells you whether plugins are suppressed for the current process.


Related