---
id: clear-bank-memories
title: "Clear memory bank memories"
description: "Delete memory units for a memory bank. Optionally filter by fact_type (world, agent, opinion) to delete only specific types. This is a destructive operation that cannot be undone. The memory bank profile (personality and background) will be preserved."
sidebar_label: "Clear memory bank memories"
hide_title: true
hide_table_of_contents: true
api: eJzlVlFz2zYM/is49qXNqXaa25PfvMbpcteuvSbrS5PrIRQssaFIlaCcej7/9x1ISZGXZu26x/kligR8AL8PBLBTEStWi49qWZGL8AYdVtSQi+q6UCWxDqaNxju1UKdkKRI01Piwhc6ZyLD2AdABivMM3iZTtHYLa2MjBbjZwhp1/BS3LcHTOx9sWWTrAnxrnPHuGUQPZcb2zm6BW9JmbTSIE8/gsjYMhgGhJI6h09FsCHxLASUcxBojaHTOR7gh6FzpHYkb5UjQBr82luBpS4ElPxO3gK6EG9S3VfCdK5/BnbFW3NtATGFD5UwVagxyXqqF0pYwfEqYnxILhlgVqsWADUUKwuNOOWxILVQ2M6UqlBH2Woy1KlSgL50JVKpFDB0VinVNDarFTslp1UJxDMZVqlDRRCsvsjDnpdrvixF9JHWA/9JR2B7gr9HyQQB027frlOJhKIHt37jOWrV/oPyga9IyyTLo+4ikk/TPxOVS4Pf/HVZSC8Std0wsZzo5PpY/h7gXndbEvO4svO+NVaG0d1HqWphoW2t0Enb+mcVnN+GpDSJ7NDkCZ7CJQjfeW0I3OWMfUE7YEDNW9E+CvulN9vtisPE3n0nHA/k+jpHvQa/vQfJlnBzvkILhAzS+JJuu6XDFhpJmKXD6ik1rU7pj5uLsu6CpdymBR0Kt1NhIiZTwXn6F+uXk5KEQH9CaMl/SVQg+/LwKJUU0Vp5MpIYfGlivD77+QLEbF6mioPbX90JgCLidaPXa5wSTtFz9kKwD2OOmiYz+UnynCORcOXRvN6mBe3ozu48f4zTT961gg8lvl5fvHgBmbRuKtZcGmOshtbxYq4WaY2vmmxfzdE15vht63n4+aY/GrX0i46CfvclTZPnu/EHtXrklRGpaH9A+Z2rQRaOHscNbjtSkgl6e5/7AeQJw9IG4gEAxGNrIo/T4QMjeMfgNBRjSml25K/fkCZwRxi4Qy79HcHT0K0ZdD7ldRB+woqOjRXokaDobTWtphAFar4025KLdwp2JNWAXfYOSb+pp9DUG1HKujH8xnOaCMOhaoM9MStLSBl28R+7YuAqcpIcWLLqqw4pA2ryRfAVtbK1wltqmcVVKNmED6uCZIXXSlA33/RRyRj0/fW9lYJJBFsluM/plbdwtrFzZeuOiAL8iJ72DIF3ir7FDC+j4jgLDDTKV4PtVAExJLg5jdjhUxn0VsK3hg+EOrfkzVZuAn7tIiavNuGJUyXIztcwQp153sqPAZUB92x87Ped4aYkZUMremLNCXcsUInDXtj7Evg6WQdcmkpZikFeyO/SV1jHx4so9F0b6ooTXxt2yxHzpnSM9kS1VIgYCbT0TGAfRNJTdR/EfuA9FnjYnNo2xGCasifMq0/mdyHLOvBIRMDYESYUR5KINhKUU1lKIPuDeWpOUiwE3FBjz0Og57O8U2isH/a/v5ahTL+/XkuHmJOqkH1mjSebTvcmyRV0TnMyOVaG6YNVC1TG2vJjP7+7uZpg+z3yo5r0vz1+fv1z9frF6fjI7ntWxsQIsOeZ28WJ2PDuWV63n2KCbxHopC1tfkZOOdNBudvcj6f+44fbjQK7zvLVo0qRLsuz6Lv9RYWtUoTYvVJG3WuFwMdlvR2qvC1V7juKz20lH+CPY/V5e5/VUxnFpGG/sZEF9VI2f2jq/dZxb2v5tZd6g7cQuLZQbDEZS+pfpPX3fj+ln8FjgYRq77TTmkNDIYFpAasKSQsohf15qTW2cOD7YlyT5cTafrl6vLldqv/8LyLPVmQ==
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={"Clear agent memories"}
>
</Heading>

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



Delete memory units for a memory bank. Optionally filter by fact_type (world, agent, opinion) to delete only specific types. This is a destructive operation that cannot be undone. The memory bank profile (personality and background) will be preserved.

<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":"bank ID"}},{"name":"fact_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional fact type filter (world, agent, opinion)","title":"Fact Type"},"description":"Optional fact type filter (world, agent, opinion)"}]}
>
  
</ParamsDetails>

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

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"DeleteResponse","description":"Response model for delete operations.","example":{"message":"Resource deleted successfully","success":true}}}}},"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>


      