AGENTS.md file at your project root and every praisonai chat, run, code, and tui command automatically injects it into the agentβs system prompt β no flags needed.
How It Works
Auto-Discovery
Quick Start
1
Create an AGENTS.md at the repo root
praisonai command run inside the repo picks this up automatically:2
Disable for a single run
--no-context flag skips AGENTS.md injection for that run only.3
Disable globally with an env var
4
Tune the token budget
Large AGENTS.md files are trimmed to fit. Set the budget in Default is
.praison.json:8000 characters.Discovery Rules
File names searched (in order):AGENTS.md, CLAUDE.md, PRAISON.md, GEMINI.md
Stop condition: A .git directory β the walk-up never crosses a git repository boundary.
Nearest wins: The first matching file found (starting from cwd and walking up) is used. Deeper files override ancestor files.
Precedence
What to Put in AGENTS.md
Keep it concise β the budget is finite. Useful content includes:- Tech stack β language versions, key frameworks, database
- Code conventions β naming, formatting, patterns to follow
- Do/Donβt rules β specific things the agent should or should not do
- Key file locations β where models, routes, tests live
- Project-specific vocabulary β domain terms, component names
- Long prose the agent doesnβt need for most tasks
- Secrets or credentials (they will end up in logs)
- Entire source files or large schemas β use
--fileflags instead
Best Practices
Commit AGENTS.md to your repository
Commit AGENTS.md to your repository
Everyone on the team benefits when the agent knows the project conventions. Treat AGENTS.md like
.editorconfig β check it in, keep it updated as the project evolves.Keep it under the budget
Keep it under the budget
The default
context_token_budget is 8000 characters (~2000 tokens). Long AGENTS.md files are trimmed from the bottom up β keep the most important rules at the top.Use per-subfolder AGENTS.md for specialised areas
Use per-subfolder AGENTS.md for specialised areas
If your monorepo has a
backend/ with Python conventions and a frontend/ with TypeScript conventions, add separate AGENTS.md files in each subdirectory. The walk-up stops at the nearest one.Disable in CI to save tokens
Disable in CI to save tokens
If your CI doesnβt need project context (e.g., a simple test-and-lint pipeline), disable it:
Related
Context Files
Other ways to inject context into agent sessions
Hierarchical Config
Walk-up discovery for .praison.json project config
Init CLI
Generate a repo-tailored AGENTS.md with
praisonai init --generate
