---
title: "Close All Open Files"
method: PATCH
path: "/v1/agents/{agent_id}/files/close-all"
tags: ["agents"]
---

# Close All Open Files

`PATCH /v1/agents/{agent_id}/files/close-all`

Closes all currently open files for a given agent.

This endpoint updates the file state for the agent so that no files are marked as open.
Typically used to reset the working memory view for the agent.

## Path parameters

- `agent_id` string, required

## Response `200`

Successful Response

- string[]

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