Skip to content

Project Context

Polytoken reads an AGENTS.md file from your project root and adds its contents to what the model sees every turn. This is where standing instructions about the project live: how to build it, which conventions to follow, what to avoid. You write it once, and Polytoken loads it for every session in that project.

AGENTS.md is the cross-agent convention other coding tools already use, and Polytoken reads the same file. An existing one works as written, with no Polytoken-specific syntax. If a project has no AGENTS.md, Polytoken falls back to CLAUDE.md, then GEMINI.md, and uses the first one it finds.

Polytoken reads two locations: your global Polytoken config directory first, then the project root. The global file holds instructions you want in every project; the project file holds instructions for your current project. To include another file, reference it with @path/to/file.md, and Polytoken adds that file’s contents too.

Polytoken uses a plain AGENTS.md as written. It can also render the file as a template before the model sees it, so the instructions can adapt to the active model or the current setup. To turn this on, add a front-matter block with polytoken: true:

---
polytoken: true
---
Build the project with `just build` and run the tests with `just test`.
{% if is_model_variant("claude") %}
Prefer small, focused commits.
{% endif %}

Without polytoken: true, Polytoken uses the file verbatim, braces and all. With it, the body is a template: the example above adds a line only when a Claude-family model is active. A template can read the same variables and functions facets use, which Templating describes.

  • Templating covers the template system and what your instructions can adapt to.
  • Template Reference lists every variable and function a template can read.
  • Facets cover writing the personas that guide how the model executes your prompts.