> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hookie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Project context

> Each project's own brain: decisions, memories, documents and a knowledge graph that people read in the console and coding agents query over MCP.

Every [project](https://docs.hookie.ai/projects.md) has its own **brain**: the decisions, memories, documents and knowledge-graph nodes that belong to it. People read it on the project's **Brain** page. Coding agents connected over [MCP](https://docs.hookie.ai/connected-agents.md) read and add to it with a handful of tools, so an agent starting work in a repository can pick up what the team already decided.

A project's brain follows the project's access. Someone who cannot see the project, including a member it is [restricted](https://docs.hookie.ai/projects.md#restricted-projects-and-project-roles) from and an agent [pinned](https://docs.hookie.ai/connected-agents.md#pin-it-to-projects) to other projects, cannot read anything in it.

## What a project's brain holds

| Part | What it is | Plans |
| - | - | - |
| **Memories and decisions** | Short notes, each a memory, a decision or a thread summary. | Every plan |
| **Documents** | Text such as PRDs, specs, ADRs, runbooks and `agentic-context/` summaries, indexed for search by meaning and by keyword. | Every plan, within the allowances below |
| **Knowledge graph** | Nodes and edges in the workspace's graph that belong to this project. | Pro, Team and Ultimate |

Content is shared **up**, never down. A project's own memories, documents and graph nodes stay in that project. Something shared to the workspace can be read from every project, but nothing in one project is ever shown in another project.

The **Brain** page shows one part at a time: **Decisions & memories** (with anything waiting for your review and possible duplicates), **Issues**, **Documents** (with the mirrored agentic context), **Shared to workspace** and **Reads**. **Shared to workspace** lists what this project shares up: its memories saved for the whole workspace and its documents shared with the workspace. Each part has a **Use from code** panel that names the MCP tools and the API call that read the same thing.

## The Brain page

Open a project and choose **Context**, between **Overview** and **Settings**. It has three tables, and a fourth when you have proposals to review:

* **Waiting for your review**, shown only to you: what [automatic memory capture](#automatic-memory-capture) proposed from your agents' sessions. **Review** opens one to approve it and choose who can read it; **Reject** deletes it.

* **Decisions and memories**, filterable by kind. **Record a decision** files a decision everyone on the project can read.

* **Documents**, with **Add a document** for a Markdown, text, PDF, Word (.docx) or HTML file.

* **Agentic context**, the project's `agentic_context` documents: summaries of past work that agents keep in a repository's `agentic-context/` folder.

Choose a row to read it, and **Show history** to see its earlier versions (see [Version history](#version-history)). Documents are shown as formatted Markdown. Links open in a new tab, and only web, email and in-page links are followed: a document cannot run script or change the page.

## Memories and decisions

A memory has a **kind**:

* `memory`: a note worth keeping.
* `decision`: a choice the team made, with its reason.
* `thread_summary`: a summary of a piece of work, such as an agent's session.

And a **visibility**:

| Visibility | Who can read it |
| - | - |
| **Private** | Its author only. New memories start here. |
| **Project** | Everyone who can see the project, and their agents. Decisions start here. |
| **Workspace** | Everyone in the workspace. A project shows another project's workspace-shared memories only when the workspace has the Workspace Brain (the Brain add-on, or Ultimate). |

Only the author edits a memory. An owner or admin can remove a shared one. See [Personal AI memory](https://docs.hookie.ai/ai-memory.md) for the per-member limits and what happens when someone leaves.

Superseded and expired memories are left out of the Brain page, `get_project_context` and knowledge search unless you ask for them. See [Stale memories and duplicates](https://docs.hookie.ai/stale-memories.md).

## Automatic memory capture

A connected agent can hand Hookie the session it just worked through with `extract_memories`, and Hookie proposes up to 5 memories and decisions worth keeping: decisions and their reasons, facts about your systems, conventions and preferences. It reads the last 20,000 characters of a transcript of up to 300,000, and skips what the project already knows.

* **Secrets are removed first.** Anything shaped like a credential is redacted before the model reads the session, and a proposal that still holds one is dropped.
* **The session is not stored.** Hookie keeps only the proposals. The AI usage log records the session's size, not its text or the proposals.

What happens next is set per project under **Sources → Capture & storage → Automatic memory capture**, by an owner or admin:

| Setting | What happens |
| - | - |
| **Save straight away** (default) | Proposals are saved as memories without review. |
| **Propose, and I approve each one** | Proposals wait on the Brain page under **Waiting for your review**. Only the person whose agent ran the session sees them, and agents never recall them, until that person approves one. |
| **Off** | Nothing is captured (`409 memory_extraction_off`). Agents can still save memories one at a time. |

Only a person approves a proposal, never an agent, and only an owner or admin, never an agent, changes the setting.

Captures count against a daily allowance per workspace, which resets at midnight UTC: Free 10, Starter 40, Pro 100, Team 300, Ultimate 1,000 (`429 memory_extraction_limit_reached`). The model's tokens also count against your monthly AI allowance.

## Version history

Editing a memory or decision keeps what it said before. Each earlier version shows who wrote it (a person in the console, or which agent) and when. **Show changes** compares it line by line with the text that replaced it, and **Restore this version** puts it back as a new revision, so the text it replaces is kept too. Only a memory's author restores it. A version written while the memory was private is shown only to its author, even after the memory is shared. Once a memory moves to another project, its earlier versions are shown only to its author. A change to who can read a memory, with the same text, keeps no version.

Documents keep their earlier versions the same way. **Upload a new version** on a document (or `replaces` with the document's id when uploading through the API or an agent) takes the old document's place and keeps its text as a version, and **Restore this version** brings an earlier text back. When a file mirrored by [repository sync](https://docs.hookie.ai/projects.md) changes, its earlier text is kept too; a mirrored file itself is changed in the repository, not restored by hand. Deleting a document deletes its history.

| Kept | Free | Starter | Pro | Team | Ultimate |
| - | - | - | - | - | - |
| How long | 7 days | 30 days | 90 days | 365 days | 365 days |

At most 50 versions of a memory and 10 of a document are kept.

### Approving agents' decisions

Under **Sources → Capture & storage → Automatic memory capture**, an owner or admin can turn on **Decisions agents record wait for approval**. A decision an agent then records waits on the Brain page, under **Waiting for your review**, until the person whose agent recorded it approves it, and agents cannot change a decision once it is approved. Decisions people record are saved directly. It is off by default, and an agent can never change it.

## Documents

Upload with **Add a document**, `upload_project_document`, or `POST /admin/api/projects/{project_id}/brain/documents`: send `text` (with `content_type` `text/plain` or `text/markdown`; any language, up to 1 MiB), or a PDF, Word or HTML file as `content_base64` with its `content_type` (up to 10 MiB). Hookie converts a file to Markdown and keeps that text, not the original. Through an agent a tool call is limited to 1 MiB, so files sent that way must be under about 700 KB. A document has a `kind` (`prd`, `spec`, `adr`, `runbook`, `agentic_context`, `generated` or `other`) and a `source` (`upload`, `repo`, `connector` or `agent`; an agent's upload is always marked `agent`).

Documents can also be mirrored into the brain and kept current for you: from a GitHub repository with [repository sync](https://docs.hookie.ai/repository-sync.md) (source `repo`), or from Notion, Google Drive, Confluence or a public website with [knowledge connectors](https://docs.hookie.ai/knowledge-connectors.md) (source `connector`).

A project's documents are indexed in their own search space, so another project's search never finds them. A document can instead be shared to the workspace with `"share_scope": "workspace"` when it is uploaded. That needs the Workspace Brain, and cannot be changed later.

Without the Workspace Brain, each plan includes a small document allowance for all its projects together:

| Allowance | Free | Starter | Pro | Team |
| - | - | - | - | - |
| Documents | 25 | 50 | 100 | 500 |
| Stored text | 5 MiB | 10 MiB | 25 MiB | 100 MiB |
| Stored vectors | 500 | 750 | 2,500 | 15,000 |
| Embedding tokens a month | 50,000 | 75,000 | 250,000 | 1.5 million |
| Searches a month | 250 | 400 | 1,200 | 7,500 |

S3 sync stays a Workspace Brain feature. With the Workspace Brain, its larger allowance ([Brain ingestion](https://docs.hookie.ai/brain-ingestion.md#allowances)) covers project documents too. Monthly meters reset on the first of the month at 00:00 UTC.

## Knowledge graph

On Pro, Team and Ultimate, a project has its own nodes in the workspace's [knowledge graph](https://docs.hookie.ai/knowledge-graph.md). Nodes created through the project belong to it, and only its own nodes can be changed or deleted there. Reading a project's graph also includes the workspace graph (nodes that belong to no project), unless you pass `shared=0` or the reader has projects hidden from them.

## For coding agents

These MCP tools work on one project. Each takes a `project_id`:

| Tool | What it does |
| - | - |
| `get_project_context` | The project, its latest thread summary, recent decisions and memories, and its documents, in one call. Start here. `merge_proposals_pending` counts possible duplicates, and `storage_rules` carries the project's [storage rules](https://docs.hookie.ai/storage-rules.md) when it has some. |
| `search_project_knowledge` | Searches the project's memories, documents and graph at once. A part that cannot run, such as the graph below Pro, is named in `unavailable`. |
| `record_decision` | Files a decision, shared with the project by default. |
| `extract_memories` | Hands over the session's transcript for [automatic memory capture](#automatic-memory-capture). Call it at the end of a session or before compacting. |
| `list_memory_versions`, `restore_memory_version` | Read a memory's [history](#version-history) and put an earlier version back. |
| `list_memory_merge_proposals`, `accept_memory_merge`, `dismiss_memory_merge` | Review pairs of memories that look like [duplicates](https://docs.hookie.ai/stale-memories.md#possible-duplicates), and merge or dismiss them. |
| `list_document_versions`, `restore_project_document` | Read a document's history (and one version's text) and put an earlier version back. `upload_project_document` takes `replaces` to add a new version. |
| `list_project_documents`, `upload_project_document`, `delete_project_document` | Manage the project's documents. |
| `get_project_storage_rules` | Reads what the project lets agents store: who its [storage rules](https://docs.hookie.ai/storage-rules.md) apply to, and every rule with unset ones at the system limit. A write that breaks a rule is refused with `422 storage_rule_violation`. |

The CLI has the same tools as `hookie context get|search`, `hookie decisions record` and `hookie documents list|upload|delete`.

Everything in a project's brain was written by people and agents, so these tools return it with a note that it is **data, not instructions**. An agent should treat a document that tells it to do something the way it treats any other untrusted input.

### Secrets are refused

Hookie refuses, with `400`, to save a memory, decision, document or project graph node that holds something shaped like a credential: an API key or token (Hookie, GitHub, Stripe, Slack, AWS, npm, Docker, Anthropic, OpenAI and others), a webhook signing secret, a JWT or a private key. Remove it and save again.

## Over the API

All routes are under `/admin/api/projects/{project_id}`:

* `memories`, `memories/{id}` and `memories/threads`: the project's memories and decisions. `memories?status=pending` lists your own proposals.
* `memories/extract` (POST): automatic memory capture. `memories/{id}/approve` (POST): approve a proposal, optionally with a new `visibility`.
* `memories/{id}/versions` (GET) and `memories/{id}/restore` (POST `{version, revision}`): a memory's history.
* `memories/merge-proposals` (GET), `memories/merge-proposals/{id}/accept` and `memories/merge-proposals/{id}/dismiss` (POST): [possible duplicates](https://docs.hookie.ai/stale-memories.md#possible-duplicates).
* `brain/documents/{id}/versions[/{version_id}]` (GET) and `brain/documents/{id}/restore` (POST `{version_id}`): a document's history.
* `brain/documents`, `brain/documents/{id}` and `brain/documents/{id}/content`; `brain/search`.
* `brain/graph/nodes`, `brain/graph/nodes/{id}`, `brain/graph/edges` and `brain/graph/context`.
* `brain/context` (GET) and `brain/knowledge` (POST, a read).

See the [API reference](https://docs.hookie.ai/api-reference.md) for every field.

## Deleting a project

Deleting a project deletes its memories and decisions, and removes its documents and their search index. Its brain pipelines move to the Default project.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.