BRAIN.md is a routing configuration file you commit to your repo root. Every PRYSM client
that runs in that repo — whether in a CI pipeline, a local dev session, or a production deploy —
auto-discovers it and applies its rules to every LLM call.
Think of it as a pyproject.toml for your AI spend.
A complete BRAIN.md
How PRYSM applies the rules
When you callclient.complete() or client.chat.completions.create(), PRYSM:
- Loads
BRAIN.mdfrom the nearest ancestor directory (or from envPRYSM_BRAIN_PATH). - Classifies the prompt’s intent against the ten signal dimensions.
- Walks the
ruleslist in order and applies the first match. - Checks
max_cost_per_request— if the chosen model’s estimated cost exceeds the ceiling, downgrades to the next eligible model. - Removes any
blockedmodels from the candidate set.
Validating your BRAIN.md before committing
Sharing BRAIN.md with your team
CI integration: cost-gate your PRs
The BRAIN.md ecosystem
BRAIN.md is an open specification. Any PRYSM-compatible routing engine can consume it. The
spec lives at prysm1.com/brain-md, and the community shares configs at
prysm1.com/b via prysm brain share.