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

# Memory

> Persistent memory that makes every interaction better over time.

## Overview

a21e maintains persistent memory across sessions. When you correct a response, state a preference, or share project context, a21e remembers it and applies it to future requests automatically.

## How memory works

1. **Capture** — after each interaction, a21e extracts memorable facts (preferences, corrections, context)
2. **Store** — memories are embedded and stored in your personal or org scope
3. **Retrieve** — on each new request, relevant memories are retrieved via semantic search
4. **Apply** — retrieved memories are injected into the prompt as calibration context

## Memory scopes

| Scope  | Visible to      | Example                                    |
| ------ | --------------- | ------------------------------------------ |
| `user` | Only you        | "I prefer Tailwind over styled-components" |
| `org`  | All org members | "Our API uses camelCase for JSON fields"   |

## Viewing your memories

```bash theme={null}
curl https://api.a21e.com/v1/memory \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Returns your stored memories with their scope, content, and creation date.

## Adding a memory manually

```bash theme={null}
curl -X POST https://api.a21e.com/v1/memory \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Our database uses UUIDs for all primary keys, never auto-incrementing integers",
    "scope": "org"
  }'
```

## Deleting a memory

```bash theme={null}
curl -X DELETE https://api.a21e.com/v1/memory/{memory_id} \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Automatic capture

Memory capture happens automatically after Huddle conversations. After a response, you'll see a **Memory capture** section below the composer where you can review and confirm what a21e learned.

You can pause automatic memory capture in your workspace preferences.

## Memory in practice

**Without memory** (first interaction):

> "Write a React component" → Uses class components, JavaScript, CSS modules

**After correction** ("I use functional components with TypeScript and Tailwind"):

> "Write a React component" → Uses functional components, TypeScript, Tailwind CSS

The more you use a21e, the less you need to specify.
