---
title: "Listar contextos do agente"
method: GET
path: "/api/management/ai/agents/{agentId}/contexts"
tags: ["ai-agents", "agents", "contexts"]
---

# Listar contextos do agente

`GET /api/management/ai/agents/{agentId}/contexts`

Lista os contextos do agente na ordem em que são aplicados ao prompt. Em contextos do tipo `file`, `content` vem como um endereço temporário para baixar o arquivo.

## Response `200`

Sucesso

- object
  - `contexts` object[]
    - `id` string
    - `ai_agent_id` string
    - `type` string
    - `content` string
    - `order` integer
    - `is_active` boolean
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `404` — Agente não encontrado

## Changes

- **2026-09-22** `b43a04f35145` — 2 warning
  - removed the optional property `contexts/items/deleted_at` from the response with the `200` status
  - removed the optional property `contexts/items/mime_type` from the response with the `200` status
- **2026-09-18** `468063611950` — 2 info
  - added the media type `application/json` for the response with the status `200`
  - added the non-success response with the status `404`

[Change history](https://skmtc.dev/olie-ai/apis/olie-api/changes/api/management/ai/agents/:agentId/contexts/get.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/b43a04f35145?raw)
