Skip to main content
Instruction sources let you declare extra files, globs, or URLs that load on every run, on top of the convention-only AGENTS.md / CLAUDE.md auto-discovery.

Quick Start

1

Layer one extra source for this run

Pass --instructions with a file, glob, or URL:
2

Declare sources in config

Add a top-level instructions: list to .praisonai/config.yaml so every run picks them up:
3

Layer org-wide + project sources

Set an org list in your global config and extend it per project — the resolver concatenates list values across the hierarchy (global → user → project):

Source Types

Each entry may be a file path, glob, home path, or remote URL.

How It Works

Config sources are resolved first, then repeatable --instructions flags are appended on top; the merged text is prepended into the agent’s backstory as # Project Instructions before the run. Declared instructions load up front, alongside the AGENTS.md / CLAUDE.md walk-up. They are passed to the subtree-context hook as already_loaded, so a nested packages/foo/AGENTS.md named in both places is not re-attached when the agent later touches a file there. All three run paths honour the merged instructions:

Behaviour Guarantees


Opt-outs

Two switches turn declared instructions off.
1

Skip all rules for a run

--no-rules (or PRAISON_NO_RULES=true) suppresses both the auto-discovered AGENTS.md / CLAUDE.md walk-up and these declared instructions:
2

Allow internal-host URLs (SSRF opt-in)

Remote URLs resolving to private, loopback, link-local, reserved, multicast, or unspecified addresses are blocked by default. Opt in only for trusted internal setups:
PRAISONAI_INSTRUCTIONS_ALLOW_LOCAL_URLS=1 disables the SSRF guard for internal hosts. An auto-loaded project config from an untrusted checkout could then make the host contact internal services — set it only for trusted, internal environments.

Common Patterns

Org-wide standards + per-project extensions

Declare shared standards in your global config and extend them in each project. List values concat across the hierarchy, so both sets load:

CI-only overrides via the command line

Keep the repo config clean and layer CI-specific rules from the pipeline:

Language-specific bundles via globs

Load every standard in a folder with one entry:

Python API

resolve_instruction_sources() resolves a list of entries into combined text — the same function the CLI uses.
resolve_instruction_sources is a wrapper-only helper — it adds no Agent parameters and does not change the Agent core. The praisonai wrapper re-exports it, so from praisonai.integration.context_files import resolve_instruction_sources also works.

Best Practices

Put rules that should always apply in the instructions: config key so every run and every teammate picks them up. Reach for --instructions when you need an extra source for a single command — a CI-only review checklist, or a temporary spec.
Group per-language standards under one folder and reference them with a glob (docs/standards/*.md). Matches expand sorted, so the merged order is stable across machines and CI.
Remote sources are fetched best-effort, capped at 256 KB, and time out after 5 seconds. Point at public, stable URLs. For internal hosts, prefer committing the file to the repo over enabling the SSRF opt-out.
--instructions normally layers on top of auto-discovered rules. Add --no-rules when you want the declared sources to be the only instructions, replacing the AGENTS.md / CLAUDE.md walk-up entirely.

Context Files

Auto-discovered AGENTS.md / CLAUDE.md injection

Rules

Auto-discovered instruction files

Run CLI

The praisonai run command reference