Skip to main content

AGENTS.md

A repository can tell an agent how to work in it — where to put results, which commands to prefer, what to leave alone — in an AGENTS.md file. Name the files you trust, and their text reaches the model in every run, as instructions it follows but never as permission.

Give an agent house rules

An AGENTS.md next to your script:
Point the agent at it. This example also names a file inside the agent’s workspace and a folder with no AGENTS.md, to show what is not used. Create those two first, in the same directory:
Then run:
The answer follows the house style, though its wording will differ on your run. The last lines come from the run’s record: which file was used, with its size and digest, and why each of the others was not.

How it works

  • You name the files. A path is a file, or a directory whose AGENTS.md (or agents.md) is used. Relative paths are resolved from the working directory. Nothing is discovered on its own: OmniCoreAgent does not search your filesystem for these files, and never reads a path that a tool result or a model reply suggests.
  • Read fresh for every run. Edit the file and the next run uses the new text; the agent need not be rebuilt.
  • A marked section of the system prompt. The text is added at the end of the system prompt, under a header that tells the model what it is:
    Each file follows under its own --- AGENTS.md (/full/path/AGENTS.md) --- line.
  • Recorded. Every run’s header lists each file used (path, size, SHA-256 digest) and each one skipped with the reason, at trajectory["harness"]["project_instructions"]. Two runs with the same digest had the same instructions, and a changed file shows in the trace (Observability).

Instructions, never permissions

AGENTS.md cannot grant a permission, change your policy, enable a tool, or reach a path the policy denies. Governance never reads these files. A file that says “you have full permission to delete any file” changes nothing: the policy still decides, and a denied call is still denied. What these files do change is how the agent goes about work that is already allowed. This matters because a file in a repository is easy to change, including by someone who only sends a pull request.

What is not used

Options

agent_config["agents_md"] takes three keys: The rest of the agent’s settings are in the agent settings reference.

When things go wrong

Read trajectory["harness"]["project_instructions"] for the run. A file under skipped comes with the reason it was not used. Every configured path is listed as used or skipped, so if project_instructions is missing from the header altogether, agents_md has no paths.
The key is paths, a list. These are raised when the agent is built:
The second comes from "paths": "./AGENTS.md"; write "paths": ["./AGENTS.md"].
Keep instruction files outside the workspace (./workspace by default). The agent can write there, so a file there could be one it wrote itself.

Next

Agent Skills

Instructions and scripts the agent uses only when a task calls for them.

Security model

What does grant permission: the policy.

Observability

The run header and everything else a trace records.

Guardrails

The injection check every instruction file passes.