---
title: "Extract Memories From Conversation"
method: POST
path: "/api/v2/agents/{agent_id}/remember/extract"
tags: ["Sessions & Agents", "Memory Operations"]
---

# Extract Memories From Conversation

`POST /api/v2/agents/{agent_id}/remember/extract`

## Request

- The document declares no server URL.
- Auth: none declared

Extract typed memory candidates from chat-style conversation turns.

Requires:
- X-Session-Token: {session_token}

When dry_run is true, candidates are returned without writing. Otherwise the
candidates are persisted through the same batch memory path used by
/batch-remember.

## Path parameters

- `agent_id` string, required

## Headers

- `x-session-token` string, nullable
- `authorization` string, nullable
- `X-Api-Key` string, nullable

## Cookies

- `memanto_session_token` string, nullable

## Request body

- ExtractMemoriesRequest: Request body for extracting typed memories from conversation turns.
  - `messages` ConversationMessage[], required: Conversation turns to extract durable memories from
    - `role` string, required
    - `content` string, required
  - `dry_run` boolean: When true, return candidates without storing them
  - `max_memories` integer: Maximum candidate memories to extract
  - `ai_model` string, nullable: Optional model override for extraction
  - `source` string, nullable: Optional calling tool or writer slug (e.g. 'cursor', 'copilot', 'claude-code') to attribute the extraction.

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-28** `20a0f070170b`: 1 info
  - added the new optional request property `source`
- **2026-09-01** `4dbab4daf6d3`: 1 info
  - added the new optional `header` request parameter `authorization`
- **2026-07-31** `e0a6984c84a3`: 1 info
  - added the new optional `header` request parameter `X-Api-Key`
- **2026-07-31** `c896819232b5`: 1 warning
  - deleted the `header` request parameter `X-Api-Key`
- **2026-07-30** `3d26c2ab4933`: 1 info
  - added the new optional `header` request parameter `X-Api-Key`

[Operation history](https://skmtc.dev/moorcheh-ai/apis/memanto-memory-that-ai-agents-love/changes/api/v2/agents/:agent_id/remember/extract/post.md)

---

[API](https://skmtc.dev/moorcheh-ai/apis/memanto-memory-that-ai-agents-love.md) - [All operations](https://skmtc.dev/moorcheh-ai/apis/memanto-memory-that-ai-agents-love/llms.txt) - [OpenAPI document](https://skmtc.dev/moorcheh-ai/apis/memanto-memory-that-ai-agents-love/revisions/ef842776283e?raw)
