---
title: "Remover contexto do agente"
method: DELETE
path: "/api/management/ai/agents/{agentId}/contexts/{contextId}"
tags: ["ai-agents", "agents", "contexts"]
---

# Remover contexto do agente

`DELETE /api/management/ai/agents/{agentId}/contexts/{contextId}`

Remove um contexto do agente e, quando ele é do tipo `file`, apaga também o arquivo armazenado. Responde sem corpo; os demais contextos mantêm a posição que já tinham.

## Response `204`

Sucesso

- unknown

## Other responses

- `404` — Contexto não encontrado

## Changes

- **2026-09-22** `d71b18b1685d` — 2 breaking
  - the response's body became nullable
  - the response's body type changed from `object` to no type for status `204`
- **2026-09-18** `468063611950` — 1 breaking, 2 info
  - removed the success response with the status `200`
  - added the non-success response with the status `404`
  - added the success response with the status `204`

[Change history](https://skmtc.dev/olie-ai/apis/olie-api/changes/api/management/ai/agents/:agentId/contexts/:contextId/delete.md)

---

[API](https://skmtc.dev/olie-ai/apis/olie-api.md) · [All operations](https://skmtc.dev/olie-ai/apis/olie-api/llms.txt) · [OpenAPI document](https://skmtc.dev/olie-ai/apis/olie-api/revisions/d71b18b1685d?raw)
