---
id: list-documents
title: "List documents"
description: "List documents with pagination and optional search. Documents are the source content from which memory units are extracted."
sidebar_label: "List documents"
hide_title: true
hide_table_of_contents: true
api: eJzFV01z2zYQ/SsY5NJ6aIlS4gtvamKnnnGaD6s51PZo1uRKRAwCDLCUrWr03zsLghQVx3Hb6Ux1MQku3i7ePuyut5Jg5WV2Jd/YvKnQkJc3iSzQ507VpKyRmbxQnkTRfRf3ikpRw0oZYAMBphA22IIWHsHl5Uj0cAIcCipReNu4HEVuDaEhsXS2EvelyktRYWXdRjRGRXN8IAc5YTGSibQ1uuDovJCZ1MrToo9FJrIGBxUSOj7FVhqoUGYSVmhooQqZSMVHqIFKmUiHXxvlsJAZuQYT6fMSK5DZVtKm5n2enDIrmUhSpHlhxkDivJC7XdKjf+1gvzboNge4S9D+ABjM5v0yhHboguHiimm0lrubvdOPB960qhT9A48RVRnCFTrJ2VxCo0lmkzTdO7kIsENHdrn0+N94Gvh536Lu+IAOfW2NR8+7p2nKfw61dtnkOXq/bLT4FI1lIqNoAp91rVUeBDH+4nnPdhBR7VgupFoPirA6fICiUK1SPwwsWzHE09jbL5iT3PUL4BxsBpI4D2D83RLo7/LQmc6DxS6JOfyRaUxH0mXhR7Y9pd8GPczWVTx1F2fSCyl6uBk699Tf2AHvh7npPojKFqjF0jqhD0sDmqK2yhDfW3yAqmb0nv6r7f5eZrLx6CbTl/vsLkrwJfN9m8d1h0BYLIBkJqfp9NVxOjmenMwnafYyzdL0D5YqQ3n0XlmzmMhEtsVkwcVkkduGRTM5SSThAy00mhWVMjt5NU0T2dTFM/As2Zi5cHW61KR97k/SHf8S+Wo6fSzmz6BV0RbJU+es+/dKLpBA6QMpHxpomx8K/fmy0+lqd/O01i9sGyALs/KrH1XKd+g9rHB/cZ42DWSIOX99TsN8rtZ1tBuodk9vy+7Tx3jT0vc9Z53Jr/P5h0eAbW4rpNKyzlahOoZekskx1Gq8noyDpP1420l7Nx62J2WWNlBx0E/etR1v9uH80SW7NjNBWNXWgT72WIEhlXct0m88YRVu3uxctJ4FlUDCk3XoE+GQnMI1P3JfdgjeGi/sGl0LotCPrs21efFCnCFQ49Dz65E4OvoFKC+72C7JOljh0VEWHlFUjSZVa+xhBC6XKldoSG/aoQAashVwvEvIqWvjykb8y+40l2FIYOgzFYLUuAZDe+TGK7MShsMDLTSYVQMrFNySFMfLaGfsgjUkzpQmZImFYAO2gNxZ78W9dboI0TAhgfs2osiPrZXhN+GRBwlCvWnR56Uyd+I01jMGfouGB5E4wTxQA1qA8ffovLgFj4XgWSi4UAUaUrQJLrpDtbhvHdSl+Kx8A1r9GbTG4OeGMHC1xi7Xq2C5Hlq2EF2hFnMH+V08dnhu/YFhriLKN2NbU3t0JHxT19ZR1MHM5aUizFkMvDTnaa1VWuPRZ9fmmBmJohQXytx59vnaGoP5IG1BiTzA5dp6FMoIUhW22/vkP9reiRy03givKqXBDVjjzactnc945nNyrQ3TJlQoQhZ6kMvaIRQsrBkTfcC91ipkjhys0Xlou1vkMN4p0NdGxF+s5JCHSh7np+7mBOrarp8jN9K9yayGvEQxHaUykY3TMpMlUe2z8fj+/n4E4fPIutU47vXji/PXp79dnh5PR+mopCqMExxjWy4mo3SU8lJtPVVgBr4Ox/ZvC81234r+5wE/VmS+U+NagwrNJnCzjbX2SkKtZCLX3ODbqicTmQ2G/GL430tpPfGm7Zbv5e9O73a83A603BIL5eFWD0baO9zEsX4NuuFoQqN8wq6bo/6ObT9T741v+MUptv5+NE/m6adPsTP+LJ7irWuAZjP02UXTMxZ6folQoAsxtJ9neY71MNhHIwoH37fDt6dzudv9BQlO5jo=
sidebar_class_name: "get api-method"
info_path: docs/api-reference/endpoints/agent-memory-api
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"List documents"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/api/v1/agents/{agent_id}/documents"}
  context={"endpoint"}
>
  
</MethodEndpoint>



List documents with pagination and optional search. Documents are the source content from which memory units are extracted.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"ListDocumentsResponse","description":"Response model for list documents endpoint.","example":{"items":[{"agent_id":"user123","content_hash":"abc123","created_at":"2024-01-15T10:30:00Z","id":"session_1","memory_unit_count":15,"text_length":5420,"updated_at":"2024-01-15T10:30:00Z"}],"limit":100,"offset":0,"total":50}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}}}
>
  
</StatusCodes>


      