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

# Batch Remember

> Store up to 100 memories in one request.

## Overview

Submits multiple memories in a single JSON body. Each item uses the same shape as [Remember](/api-reference/data/remember): `content` plus optional `type`, `title`, `confidence`, `tags`, `source`, and `provenance`.

## Authentication

API clients do not send an API key or `Authorization` header.

<ParamField header="X-Session-Token" type="string" required>
  Session token from [Activate Agent](/api-reference/sessions/activate-agent). Must match `agent_id`.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`
</ParamField>

## Path Parameters

<ParamField path="agent_id" type="string" required>
  The unique identifier of the agent.
</ParamField>

## Body

<ParamField body="memories" type="array" required>
  Non-empty array of memory objects (minimum 1, maximum **100** items per request).
</ParamField>

Each array element supports:

* **`content`** (string, required)
* **`type`** (string, optional, default `fact`)
* **`title`** (string, optional)
* **`confidence`** (number, optional, default `0.8`, range `0.0`–`1.0`)
* **`tags`** (array of strings, optional)
* **`source`** (string, optional, default `agent`)
* **`provenance`** (string, optional, default `explicit_statement`)

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "http://localhost:8000/api/v2/agents/my-agent/batch-remember" \
    -H "X-Session-Token: your_session_token" \
    -H "Content-Type: application/json" \
    -d '{
      "memories": [
        {
          "content": "Alice prefers phone calls.",
          "type": "preference"
        },
        {
          "content": "Bob is the primary contact for billing.",
          "type": "fact"
        }
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - OK theme={null}
  {
    "agent_id": "my-agent",
    "session_id": "sess_982287b6a5f5",
    "namespace": "memanto_agent_my-agent",
    "total_submitted": 2,
    "successful": 2,
    "failed": 0,
    "results": [
      {
        "id": "0ee05291-4f58-4846-9037-19a2cdc26f6e",
        "status": "queued",
        "action": "store",
        "reason": "MVP direct store"
      },
      {
        "id": "2607a8a4-d62f-4a1c-b368-35ba3153f5f9",
        "status": "queued",
        "action": "store",
        "reason": "MVP direct store"
      }
    ]
  }
  ```

  ```json 401 - Unauthorized (Missing Token) theme={null}
  {
    "detail": "Missing session token. Use X-Session-Token header."
  }
  ```

  ```json 401 - Unauthorized (Expired Token) theme={null}
  {
    "detail": {
      "error": "SessionExpired",
      "message": "Session has expired",
      "details": {}
    }
  }
  ```

  ```json 422 - Validation Error theme={null}
  {
    "detail": [
      {
        "type": "missing",
        "loc": ["body", "memories"],
        "msg": "Field required",
        "input": {}
      }
    ]
  }
  ```

  ```json 500 - Server Error theme={null}
  {
    "detail": {
      "error": "InternalServerError",
      "message": "An unexpected error occurred",
      "details": {
        "original_error": "Session is for agent 'other-agent', cannot access 'my-agent'"
      }
    }
  }
  ```
</ResponseExample>

## Next Steps

* [Recall](/api-reference/search/recall) to search the stored memories
* [Generate AI Answer](/api-reference/ai/generate-ai-answer) using the agent's updated context
