Who the rules bind
Each project’s rules have one setting for who they apply to (applies_to):
- Agents only (
agents, the default): every caller that is not a person signed in to the console. That covers connected agents, Agent Registrations, agent accounts and API keys. The local MCP server signs in with an API key, so it counts as an agent too. - Everyone (
everyone): people in the console as well as agents.
- Repository sync and knowledge connector sync.
- A documents pipeline’s S3 sync.
- A person approving a memory that automatic capture proposed.
The rules
Every rule is optional. A rule you leave out stays at the system limit.Memories
title_min cannot be more than title_max.
Documents
The file types are named by content type:
text/plain, text/markdown,
application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document
and text/html.
Hookie checks the rules strictly when you save them. An unknown key, a value of the
wrong type, a kind or file type Hookie does not have, an empty list, or a limit looser
than the system’s is refused with 400.
Who can change them
Only an owner or admin of the project can change its rules, and only as a person in the console. An agent or API key is refused with403, whatever its scope: agents can
read the rules but never set them. Other members see the rules read-only.
Every change is recorded in the audit log as project_updated, with the rules before
and after.
Set rules in the console
Open the project, go to Sources → Capture & storage and find What agents may store, below Automatic memory capture.- Under Who the rules apply to, choose Agents only (recommended) or Everyone.
- Under Memories, set:
- Kinds agents may store: Memories, Decisions, Thread summaries.
- Minimum tags, Shortest title (characters), Longest title (characters) and Longest memory (characters).
- A memory must name the chat it came from.
- Under Documents, set:
- Kinds agents may upload: PRDs, Specs, ADRs, Runbooks, Agentic context, Generated, Other.
- File types agents may upload: Markdown, Plain text, PDF, Word (.docx), HTML.
- Largest file (MiB), up to 10 MiB.
- A document must say where it came from (source reference).
- Choose Save rules.
When a write is refused
A write that breaks a rule is refused with422 and the code storage_rule_violation.
The body lists every rule that was broken, with its limit and the actual value:
What is checked
The rules that bind the caller are checked when:- A memory is saved, including saving again under a
memory_key, and when a decision is recorded. - A memory is edited and its title, content, tags or kind change. A move to another project is checked against that project’s rules.
- An earlier version of a memory is restored, against that version’s own text.
- A merge proposal is accepted by the kept memory’s author and the kept memory’s text or tags change, including when it takes the tags of both memories, as it does by default. See Stale memories and duplicates.
- Automatic memory capture runs. The allowed kinds and limits are added to the model’s instructions. A proposal that still breaks a rule is dropped and listed in
refused_by_rules, with itstitle,ruleandmessage. The capture is refused with422only when every proposal breaks a rule. - A project document is uploaded, before it is converted.
- A document is uploaded through a documents pipeline. It is checked against the pipeline’s project (the Default project for an older pipeline), as kind
otherwith nosource_ref. - An earlier version of a project document is restored, against that version’s kind, file type, size and
source_ref. A version that was converted from a PDF, Word or HTML file keeps only its text, so its file type is read from its name and its size is not checked.
What is not checked
- The syncs and approvals listed under Who the rules bind.
- An edit that changes only a memory’s sharing,
superseded_by,expires_ator nothing but the revision.
For agents
Agents read a project’s rules so they can store within them.get_project_context also returns
storage_rules: {applies_to, effective} when the project has rules.
Every tool that stores something says it may be refused with storage_rule_violation:
save_memory, update_memory, restore_memory_version, record_decision,
extract_memories, accept_memory_merge, upload_project_document,
restore_project_document and upload_brain_document. No tool sets the rules.
Over the API
The routes are under/admin/api/projects/{project_id}. /admin/api/storage-rules is
the same for the Default project.
GET storage-rules: any role, and agents athookie:read. Returnsproject_id,applies_to,rules(as set),effective,revision(0 when there are none),updated_byandupdated_at.PUT storage-ruleswith{applies_to, rules, revision}: an owner or admin, as a person. It replaces the whole rule set, so a rule you leave out goes back to the system limit. Send therevisionyou read;0creates the rules. If the rules changed since you read them, the request is refused with409and the codestorage_rules_changed. Read them again and resend.DELETE storage-rules: an owner or admin, as a person. Removes the rules and returns the same shape asGET, withrevision0.
PUT body that lets agents store only memories and decisions with at least one tag
and a named chat thread, and only Markdown or PDF files up to 2 MiB that say where they
came from:
Export and import
A project’s configuration export carries its rules asstorage_rules, and a workspace
export includes them. Importing a configuration applies the rules only when a person
imports it, and never over rules the project already has: an existing set is skipped
and reported. When an agent, an API key or a member below admin imports it, the rules
are skipped and reported.