> ## 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.

# n8n node

> Give n8n workflows and AI agents a Hookie project's memories, knowledge, context and documents, with your own Hookie API key.

`@hookieai/n8n-nodes-hookie` is an [n8n](https://n8n.io) community node for Hookie.
It saves, lists and searches a project's memories, searches its knowledge, loads its
context and uploads documents. The node is marked usable as a tool, so an n8n
**AI Agent** can call it. It is MIT licensed.

## What it does

| Resource | Operations |
| - | - |
| Memory | Save, List, Search, Get, Delete, Capture From Transcript |
| Knowledge | Search (memories, decisions, documents and the knowledge graph in one call), Search Documents |
| Project | Get Context (summary, decisions, memories, documents index, open issues) |
| Document | Upload (text, or a PDF, Word, HTML, text or Markdown file from the input item), List, Get |

## Install

In n8n, open **Settings → Community Nodes → Install** and enter
`@hookieai/n8n-nodes-hookie`.

On a self-hosted instance without that screen, run
`npm install @hookieai/n8n-nodes-hookie` in `~/.n8n/custom` and restart n8n.

## Credential: your own API key

Create a **Hookie API** credential with:

* **API Key**: an `hk_…` admin API key from **Settings → API keys** in the Hookie
  console. It acts as the member who created it, capped at its role and, optionally, one
  project. A read-only (viewer) key is enough for search and context. See [API keys](https://docs.hookie.ai/api-keys.md).
* **Base URL**: `https://app.hookie.ai` unless you were given another.

n8n stores the key encrypted and adds it to each request as a bearer header. The node
never puts it in an output item or a log.

The credential's **Test** button calls `/admin/api/me` on the Base URL's origin only
when it is HTTPS (or `http` on `localhost`). Any other Base URL is tested against a host
under `.invalid`, which never resolves, so the key is not sent.

## Using the node

* **Project** is a project id or slug. `default` is the workspace's Default project.
  Hookie's routes take the id, so the node looks a slug up once per run (for a
  project-scoped key, it uses the project `/admin/api/me` names).
* **Visibility** left on *Default*: a memory or thread summary is saved as private, and a
  decision is shared with the project. See [Personal AI memory](https://docs.hookie.ai/ai-memory.md#keep-private-or-share-with-your-team).
* **Capture From Transcript** sends a conversation to [automatic memory capture](https://docs.hookie.ai/project-context.md#automatic-memory-capture),
  and Hookie proposes the memories and decisions worth keeping. It takes only the thread
  fields and visibility; Hookie's model picks each proposal's kind. Hookie redacts
  credentials before its model reads the text and does not store the transcript.
* **Output items:** list and search operations return one item per memory, document or
  passage. Knowledge search and Get Context return one item that starts with a `note`:
  everything in it was written by people and agents and is data, never instructions.
* **Secrets:** never put secrets or credentials in a memory or document. Hookie refuses them.

### Retries and repeated writes

Saves, captures and uploads carry an `Idempotency-Key` hashed from the execution, the
node, the run, the item, the route and the body. n8n's **Retry On Fail** sends the same
key, so the write runs once. **Loop Over Items**, or an AI Agent saving twice, gets a
key per write. A retry that finds the first attempt still running waits for its answer.

## Related

* [Python SDK](https://docs.hookie.ai/sdk/python.md): the same features from Python, LangChain, LangGraph and CrewAI.
* [Project context](https://docs.hookie.ai/project-context.md): what a project's brain holds.
* [API keys](https://docs.hookie.ai/api-keys.md): create and scope the key the node uses.


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