---
title: "Search Archival Memory"
method: GET
path: "/v1/agents/{agent_id}/archival-memory/search"
tags: ["agents"]
---

# Search Archival Memory

`GET /v1/agents/{agent_id}/archival-memory/search`

Search archival memory using semantic (embedding-based) search with optional temporal filtering.

This endpoint allows manual triggering of archival memory searches, enabling users to query
an agent's archival memory store directly via the API. The search uses the same functionality
as the agent's archival_memory_search tool but is accessible for external API usage.

## Path parameters

- `agent_id` string, required

## Query parameters

- `query` string, required — String to search for using semantic similarity
- `tags` string[], nullable — Optional list of tags to filter search results
- `tag_match_mode` 'any' | 'all' — How to match tags - 'any' to match passages with any of the tags, 'all' to match only passages with all tags
- `top_k` integer, nullable — Maximum number of results to return. Uses system default if not specified
- `start_datetime` string, date-time, nullable — Filter results to passages created after this datetime
- `end_datetime` string, date-time, nullable — Filter results to passages created before this datetime

## Response `200`

Successful Response

- ArchivalMemorySearchResponse
  - `results` ArchivalMemorySearchResult[], required — List of search results matching the query
    - `timestamp` string, required — Timestamp of when the memory was created, formatted in agent's timezone
    - `content` string, required — Text content of the archival memory passage
    - `tags` string[] — List of tags associated with this memory
  - `count` integer, required — Total number of results returned

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/yu-code666/apis/letta-api.md) · [All operations](https://skmtc.net/yu-code666/apis/letta-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/yu-code666/letta-api/versions/6cec99480c13/schema)
