> ## 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.

# Generate Daily Summary

> Generate the on-demand daily AI summary for an agent/date.

## Overview

Generates an AI-written summary of an agent's session memories for a given date, and triggers a memory export to refresh the local `memory.md` cache. Conflict detection is a separate concern — see [Generate Conflict Report](/api-reference/data/generate-conflicts) or the [scheduled job](/cli/schedule/enable).

## 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>

## Path Parameters

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

## Body

<ParamField body="date" type="string">
  Date string `YYYY-MM-DD`. Defaults to **today** on the server when omitted.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "http://localhost:8000/api/v2/agents/my-agent/daily-summary" \
    -H "X-Session-Token: your_session_token" \
    -H "Content-Type: application/json" \
    -d '{"date": "2026-05-08"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - OK theme={null}
  {
    "agent_id": "my-agent",
    "session_id": "sess_abc123",
    "date": "2026-05-08",
    "summary": {
      "status": "success",
      "summary_path": "~/.memanto/summaries/my-agent_2026-05-08.md"
    },
    "export": {
      "status": "success",
      "total_memories": 42
    }
  }
  ```

  ```json 400 - Bad Request (Invalid Identifier) theme={null}
  {
    "detail": "Invalid summary identifier"
  }
  ```

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

## Next Steps

* [Generate Conflict Report](/api-reference/data/generate-conflicts) to run conflict detection for the same date
* [List Conflicts](/api-reference/data/list-conflicts) to inspect any conflicts already detected
