---
title: "Deletes agent server directories."
method: DELETE
path: "/chats/{session_ids}/agent_server_directories"
tags: ["Chat"]
deprecated: true
---

# Deletes agent server directories.

`DELETE /chats/{session_ids}/agent_server_directories`

## Request

- Base URL: `https://h2ogpte.genai.h2o.ai/api/v1`
- URL: `https://h2ogpte.genai.h2o.ai/api/v1/chats/{session_ids}/agent_server_directories`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/h2o/apis/h2ogpte-rest-api/docs/chats/:session_ids/agent_server_directories/delete.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

Deletes agent server directories.

Deprecated: this endpoint will be removed in a future release. Agent
directories are now cleaned up automatically as part of the
chat-session delete cascade — call `DELETE /chats/{session_ids}`
instead. Deleting agent files mid-conversation leaves the agent in
an inconsistent state (see h2oai/h2ogpte#7302), so this standalone
path is no longer recommended.

## Path parameters

- `session_ids` string[], required

## Query parameters

- `dir_types` string[]

## Response `204`

Successful operation

## Other responses

- `400`: Bad request
- `401`: Unauthorized - Invalid or missing API key
- `409`: Conflict
- `default`: Unexpected error

---

[API](https://skmtc.dev/h2o/apis/h2ogpte-rest-api.md) - [All operations](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/revisions/a82a117320f4?raw)
