---
title: 'flexkit memory'
description: 'Read, edit and clear what the Flexkit agent remembers about you in a project.'
---

# `flexkit memory`

The Chat Agent and the [MCP server](/docs/cli/mcp) keep one [memory](/docs/ai/memory) document per person and project: a Markdown summary of what they learned about you and your work (exact type names, data quirks, how you like answers). They read it at the start of every session and rewrite it as they learn. `flexkit memory` shows that document, lets you replace or edit it, and clears it.

Next to your own memory, the agent reads the project's **company memories**: facts several members' sessions confirmed. They are read-only here.

## Synopsis

```bash
flexkit memory <subcommand> [arguments] [options]
```

Without a subcommand, `flexkit memory` runs `show`.

## `memory show`

Show your preferred name, when the memory last changed, its size, the document itself and the company memories.

```bash
flexkit memory show [--content] [--json] [--project <id>]
```

`--content` prints only your document on stdout, so you can save it to a file.

### Examples

```bash
# Show your memory
flexkit memory show

# Save it to a file to edit it
flexkit memory show --content > memory.md

# Print the company memories
flexkit memory show --json | jq -r '.companyMemories[]'
```

## `memory set`

Replace your memory document with a Markdown file, or with stdin when you pass `-`. The whole document is replaced. The document is limited to 20,000 characters.

```bash
flexkit memory set <file|-> [--name <name>] [--json] [--project <id>]
```

`--name` also sets how the agent addresses you. Without it, the stored name is kept.

### Examples

```bash
# Replace the memory with a file
flexkit memory set memory.md

# Also set your preferred name
flexkit memory set memory.md --name Dani

# Append a note from a script
{ flexkit memory show --content; echo "- Prices are in EUR"; } | flexkit memory set -
```

## `memory edit`

Open your memory document in your editor and save it when the editor closes. The CLI uses `$VISUAL`, then `$EDITOR`, then `vi` (`notepad` on Windows). Nothing is saved when the document didn't change or the editor exits with an error. `edit` needs a terminal; use `memory set` in scripts.

```bash
flexkit memory edit [--name <name>] [--project <id>]
```

### Examples

```bash
# Edit the memory
flexkit memory edit

# Edit it in VS Code
EDITOR="code --wait" flexkit memory edit
```

## `memory clear`

Empty your memory document. Your preferred name and the company memories stay. The CLI asks for confirmation; `--yes` skips it, and is required without a terminal. The agent starts learning again from your next sessions, and its hourly review of your recent chats may add notes back.

```bash
flexkit memory clear [--yes] [--json] [--project <id>]
```

### Examples

```bash
# Clear the memory
flexkit memory clear

# Clear it without the prompt
flexkit memory clear --yes
```

## Options

| Option                 | Applies to        | Description                                                    |
| ---------------------- | ----------------- | -------------------------------------------------------------- |
| `--content`            | `show`            | Print only your memory document on stdout.                     |
| `--name <name>`        | `set`, `edit`     | How the agent addresses you, up to 100 characters.             |
| `--yes`, `-y`          | `clear`           | Skip the confirmation prompt.                                  |
| `--json`               | all except `edit` | Print JSON on stdout.                                          |
| `--project <ID>`, `-p` | all               | Project to use. Default: the [linked](/docs/cli/link) project. |

See also the [global options](/docs/cli/global-options).

## Permissions

Your memory is personal. Every project member can read and change their own memory, never someone else's, and it needs a signed-in session from [`flexkit login`](/docs/cli/login). Project API tokens can't read or change it, not even their creator's, and are refused with `A user session is required.`


---

[View full sitemap](/docs/sitemap.md)
