Skip to main content
Storage rules let a project’s owners and admins narrow what goes into its brain. You choose which kinds of memories and documents may be stored, how many tags a memory needs, how long a title or a memory may be, which file types are allowed and how large a file may be. A write that breaks a rule is refused with the rule it broke, so the agent can try again within them. Rules only tighten Hookie’s own limits. They can never loosen one.

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.
Some writes are never checked, whoever makes them:

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 with 403, 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.
  1. Under Who the rules apply to, choose Agents only (recommended) or Everyone.
  2. 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.
  3. 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).
  4. Choose Save rules.
If someone else changed the rules while you were editing, Hookie says Someone changed these rules. Reload to see their version, then make your change again. Remove rules deletes the project’s rules after you confirm. Agents can then store anything within Hookie’s own limits again.

When a write is refused

A write that breaks a rule is refused with 422 and the code storage_rule_violation. The body lists every rule that was broken, with its limit and the actual value:
The message itself names each broken rule and the tool that reads the rules, so an agent that sees only the message can still correct its write. A refused upload stores nothing and counts against nothing.

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 its title, rule and message. The capture is refused with 422 only 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 other with no source_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_at or nothing but the revision.
So tightening the rules never traps a memory that is already stored. It is checked again only when its text, tags or kind change.

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 at hookie:read. Returns project_id, applies_to, rules (as set), effective, revision (0 when there are none), updated_by and updated_at.
  • PUT storage-rules with {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 the revision you read; 0 creates the rules. If the rules changed since you read them, the request is refused with 409 and the code storage_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 as GET, with revision 0.
A 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:
See the API reference for every field.

Export and import

A project’s configuration export carries its rules as storage_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.