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

# Set up your assistant

> From a brain to a Claude Code assistant that remembers, with the kit

The [quickstart](https://docs.oncortex.ai/quickstart.md) gets you a brain and an agent that can search it. This page goes one step further: an assistant in Claude Code whose memory is your brain, where every session is filed for you, mail and meetings arrive on their own, and a status line tells you each morning that the feeds are alive.

It takes the **cortex-assistant** plugin, three keys and a short block of text. No code.

**1. Get a brain**

If you joined a workspace, you already have one: **My Work Brain**, created from the Personal template and marked as yours. If a workspace admin created your brain instead, check it is marked as yours under **Settings, General**. Your agents write there unless you name another brain.

**2. Connect**

From your brain's **Connect** page, run the `claude mcp add` line it shows in the folder your assistant runs from, then `/mcp` in Claude Code and sign in as yourself. One connection covers every brain you can reach.

Install the [command line](https://docs.oncortex.ai/connect/command-line.md) too: `npm i -g @oncortex/cli`, then `cortex login` with the same URL. The kit uses it for the status line and the health check.

**3. Install the kit**

Four pieces, in this order.

**Enable the plugin.** In Claude Code, `/plugin`, marketplace `sopro`, enable `cortex-assistant`. That installs the two hooks, the scheduled scripts and the skills together. Nothing runs yet: they look for settings they do not have.

**Tell it which brain.** Create `~/.config/cortex/ea.json`:

```json theme={null}
{ "api": "https://api.oncortex.ai", "workspace": "<workspace id>", "brain": "<your slug>", "brainId": "<its id>" }
```

`cortex whoami` prints the ids. From this moment every session starts with a line of brain status.

**Mint three keys** on your brain under **Settings, Service credentials**, and store each in its own file in `~/.config/cortex/`:

| Label | Role | Goes in | Turns on |
| - | - | - | - |
| `claude-code-capture` | Read and Write | `hook.env` as `CORTEX_CAPTURE_TOKEN=ck_...` | the session hook. The label matters: the [health check](https://docs.oncortex.ai/brains/health.md) recognises the hook by it |
| `ea-health` | Read | `health.env` as `CORTEX_HEALTH_TOKEN=ck_...` | the status refresh and the daily health check, without depending on your sign-in. Optional |
| `ea-email-collector` | Write | `collector.env` as `CORTEX_COLLECTOR_TOKEN=ck_...` | the mail collector. Only if mail comes in by collector rather than by forwarding (step 4). A star on a thread files it |

Keys rather than your sign-in because the hook and the scheduled jobs run when nobody is signed in, and a key is pinned to one brain with one role.

**Paste the block** from the plugin's README into your `CLAUDE.md`. Ten lines: the brain is the memory; the brain's own rules govern filing; check what awaits review at session start; search before answering from memory; put facts on pages at the time; use the task tools; plans live in repositories. Everything else in that file is yours.

**4. Turn the feeds on**

* **Meetings:** connect [Granola](https://docs.oncortex.ai/capture/granola.md) or [Read AI](https://docs.oncortex.ai/capture/read-ai.md) under **Settings, Ingest sources**, and catch up a couple of weeks.
* **Mail:** [forward](https://docs.oncortex.ai/capture/your-email.md) threads to your brain's address, or set a Gmail filter to forward from the senders you choose. The address is issued on the same Ingest sources page, and Gmail's confirmation code appears there. If you installed the collector key in step 3, we recommend the collector's [star and archive](https://docs.oncortex.ai/capture/your-email.md#recommended-star-and-archive) habit instead: the people who always matter are watched, and a star on anything else files it, with no waiting before you archive.
* **Filing mode:** **Automatic** on your own brain, so the runner files what arrives and parks only what it is unsure about.
* **A description** of what the brain holds, on Settings, General, and an **Expectations** section on the instructions page: one plain sentence per feed and how stale is too stale. The health check grades against it.

**5. Check it is alive**

Run `cortex health --brain <your slug>`. Each line is one check, worst first, with the one action that fixes it. Then open a new Claude Code session: the first turn starts with six lines of brain status, and ending the session writes one `ok` line to `~/.config/cortex/capture.log`.

Schedule the two scripts the README names: the mail collector every half hour if you use it, and the health check once a morning with the way you want to be told.

## What you get

| Moment | What happens |
| - | - |
| A session starts | Six cached lines: inbox and review counts, whether the hook and the feeds are alive, the runner's spend this month, what needs attention, when the capture key was last used. Read from disk, never a wait. |
| A session ends | The session's log is posted to your brain's inbox, and Cortex [cleans it](https://docs.oncortex.ai/capture/agent-conversations.md) before anything reads it: your words, the assistant's, one line per action it took, with keys and passwords masked. A session you resume and end again arrives as a new version of the earlier one. The runner keeps what was durable: a decision, an idea in your words, a fact about someone, a commitment. Most sessions produce nothing, on purpose. |
| Every morning | `/morning` on a schedule: today's meetings with prep from the people pages, tasks due, what changed in the brain, mail needing a reply, documents to prepare. Emailed to you. No daily page is written. |
| Any time | `/emails` turns starred mail into tasks; `/my-tasks` works your task page; `/bootstrap <project>` loads a project's context from a page in your brain. |

## Where next

> [card] [Your personal brain](https://docs.oncortex.ai/brains/your-personal-brain.md)
>
> What makes it yours, and why agents write there by default.

> [card] [Is it still being fed?](https://docs.oncortex.ai/brains/health.md)
>
> The health check, the Expectations section and what each finding means.

> [card] [Capturing agent conversations](https://docs.oncortex.ai/capture/agent-conversations.md)
>
> The session hook on its own, without the plugin.

> [card] [Tasks](https://docs.oncortex.ai/filing/tasks.md)
>
> One task page, fed by meetings and mail.


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