Skip to main content
--append-system-prompt appends an arbitrary text suffix to the assembled system prompt for a single invocation — never persisted, and applied at the very end so the cacheable prompt prefix stays intact.

Quick Start

1

Append literal text

2

Read the suffix from a file

3

Set the env var (CI-friendly)


How It Works

The CLI resolves the flag value, exports it as PRAISONAI_APPEND_SYSTEM_PROMPT, and the core Agent reads that single env var when it assembles its system prompt. Because every construction path — interactive TUI, one-shot prompt, YAML agents, and Python Agent(...) — funnels through the same env var, the suffix reaches all of them without a new constructor parameter. The suffix is appended after the stable prompt prefix (and after any path-scoped glob rules), so the cacheable base prompt is preserved and prompt-cache reuse is unaffected. A whitespace-only or unset value is a no-op, and the suffix is never written to any agent definition, YAML, or session backstory.

Choosing a Form

Pick the form that matches how long the guidance should live and how it’s supplied. When the value starts with @, the file contents are read (a missing file falls back to treating the raw value as literal text, so a run is never derailed).

Where It Applies

One flag, three commands, same value shape everywhere. Exporting the env var also reaches YAML and Python agents in the same process.
On praisonai run, setting --append-system-prompt keeps the run in-process. The warm-runtime fast path is bypassed for this invocation because that separate process never received the export and would silently drop the suffix.

Common Patterns

Steer one CLI run in French, no code changes:
Read the suffix from a policy file:
Set once for a CI job, use across every command:
Same knob from Python — every Agent constructed after the export picks it up:

Best Practices

Long suffixes reduce prompt-cache reuse across turns. Prefer a concise steer over a full policy in the flag itself.
Reading from a file keeps shell quoting sane and versions the policy alongside your project.
Set PRAISONAI_APPEND_SYSTEM_PROMPT once so the same command runs everywhere without editing each invocation.
When the guidance is permanent, put it in YAML or instructions= instead — the suffix disappears when the process exits.
The suffix is never persisted. It applies to a single invocation only — you must re-supply it (flag or env var) on every run.
Under praisonai run, this flag bypasses the warm runtime and runs in-process, so the first-invocation cost is a bit higher than a plain run. The warm runtime is a separate process that never receives the env export and reuses a cached agent whose system prompt is already assembled.

Code CLI

Code assistant mode for programming tasks

Chat CLI

Interactive chat mode with AI agents

Run CLI

Run agents from files or prompts

Prompt Caching

Preserve the cacheable prompt prefix