---
id: delete-memory-unit
title: "Delete a memory unit"
description: "Delete a single memory unit and all its associated links (temporal, semantic, and entity links)"
sidebar_label: "Delete a memory unit"
hide_title: true
hide_table_of_contents: true
api: eJy9VlFv2zgM/isC97IVbtIW9+S33JruCnS3Yc320hYDZzOxVlnyRDpdLvB/P1C2k3S97nDAYXmJLZMfqU/kR21BcMWQ38BbqkPcmHcNRRQbPMNdBiVxEW2j75DDOTkSMmjY+pUjU/curbdi0JcGnTNW2CBzKCwKlcZZf8/mpVDdhIguM0w1erFFljzIi5VNb/UKMghj9MsScihTvM99mM8aBjJoMGJNQlGz3oLHmiAHXJGXz7aEDKym2qBUkEGkb62NVEIusaUMuKioRsi3IJtG/Vii9SvIQKw4XZgpkLksoeuyHbqG/j/APypTCftO3bkJnonV4+zkRP8e833dFgUxL1tnPgzGkEERvJAXNcemcbZIhE2/svps91l0Xddl8NvZ2VPgT+hsmdzMPMYQ/wMqNFEPSWyfd0mC1umTFar5qYELxaOv6DfvlunkHpOkbA8r1gutKEJ312XjGsaImwMmr0KfIHQZ1Lz6GelviRlXBDuw500TGWahX7t97PDlKxXy6MBv0r760IPd3R5mT2/P7vPbOO/p+6dgo8kfi8X7J4D92dYkVdg3SmoOqSCHKTZ2uj6dpq7g6Xbsjm6aeskST7dDTXepqJch0fKoBwZBmL2/hB+F4NbPzNjSx2NHj3LAGxaqzTJEM7s0fQpGKhTDEiJxZiJJtLTWRxWBSMjBswlrimZMcHLrb/2LF+aCUNpIrK9H5ujod5SiGnO7lhBxRUdHeXokU7dObDNKkyU2tFzawpIXtzEPViqDrYQaNd8lFmLou0QsdF89/vW4m2vCWFQKfWFTko7W6GWP3KoKGq/poTMO/arFFZlvLennHu1CQ2g9mQvrhLTcUrIJ22ARA7N5CNGVKRslJHHfZzTwExrr9c0wqfgJuU2PvqisvzdzXzbBelHgN+RVQMmkdv4uLTqDnh8osvmCTKUJfghhy0F8NcS4qR73TcSmMp8st+jsX6nuFPzSCyWu1jvpXyXL9aFlD3EeirbWMIuIxf2w7fTcx0OvXA0o5WDM/Qm1DVMUw23ThChDHcxiUVmhQotBlxYVjZXWMnF+64+VkaEozZVOFI35OnhPxcGxpUrESKZwgclYb8TW1LvvDv+J+1jk6NzGsK2tw3jAmjrPezr/JbLuU3VXNH+sqR+BO5DrJhKWWlgzJfoR987ZdHIScU2R0aUeGzgcegrdrTfDb1B1LJKqD6Ns7JxEnSqTswXpYNmbzBosKjJnkxPIoI0OcqhEGs6n04eHhwmmz5MQV9PBl6dXl6/nf17Pj88mJ5NKaqfAmmMvF6eTk8mJLjWBpUZ/EGt3pTi4S/woN9v9cPoFV5BBh7V7po1Dm0ZMYmE7yOsNYGMhg/UpZP3FgyGD/OAKMh65Lo93h7sMqsCi7tut9uLH6LpOl1UxNpDf3GWwxmjxi4rwzRZKy/pcQr5Ex/QTVl5+GCbTK/PcDsYB5HX8rNG1+gYZ3NPm8PqkY/gXxh3JSaO+Iiwppq33X2dFQY0c+D25meg9ajcFz+dX88Ucuu5vWrnCbA==
sidebar_class_name: "delete 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={"Delete a memory unit"}
>
</Heading>

<MethodEndpoint
  method={"delete"}
  path={"/api/v1/agents/{agent_id}/memories/{unit_id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Delete a single memory unit and all its associated links (temporal, semantic, and entity links)

<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":"unit_id","in":"path","required":true,"schema":{"type":"string","title":"Unit Id"}}]}
>
  
</ParamsDetails>

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

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"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>


      