---
title: "Ask Antimetal's AI agent a question"
method: POST
path: "/query"
tags: ["Query"]
---

# Ask Antimetal's AI agent a question

`POST /query`

Sends a question to Antimetal's AI agent and returns a natural language answer. Pass the returned conversation_id in subsequent requests to continue the conversation. Set stream: true (and Accept: text/event-stream) to receive a Server-Sent Events stream.

## Headers

- `Antimetal-Version` string

## Request body

- QueryRequestDto
  - `question` string, required — Natural language question to ask the AI agent
  - `conversation_id` string, uuid — Conversation ID from a previous query response — pass to continue that conversation
  - `stream` boolean — When true, returns a Server-Sent Events stream. Must also send Accept: text/event-stream header.

## Response `200`

- QueryResponseDto
  - `conversation_id` string, uuid, required — Pass in subsequent requests to continue this conversation
  - `answer` string, required — The AI agent's natural language answer
  - `artifacts` object[], required — Artifacts (metrics, logs, traces, etc.) the agent found while answering
    - `id` string, required — Artifact document ID, e.g. 'metric:datadog:abc123'
    - `tool_name` string, required — Name of the tool that produced this artifact
    - `data_type` string — Artifact data type: metric, log, trace, file, event, topology
    - `provider` string — Provider: datadog, gcp, github, etc.
    - `summary` string — Brief description from tool output

## Other responses

- `400` — Validation error or bad request
- `401` — Authentication required
- `403` — Insufficient permissions
- `429` — Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.net/antimetal/apis/antimetal-external-api.md) · [All operations](https://skmtc.net/antimetal/apis/antimetal-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/antimetal/antimetal-external-api/versions/0539acd362bf/schema)
