---
title: "Query"
method: POST
path: "/agent/{agent_id}/query"
tags: ["agent_interaction"]
---

# Query

`POST /agent/{agent_id}/query`

## Request

- Base URL: `https://api.overfit.de` (the document declares no server; this is the origin it was published from)
- URL: `https://api.overfit.de/agent/{agent_id}/query`
- Auth: one of:
  - OpenID Connect (`https://auth.okns.de/realms/overfit-products/.well-known/openid-configuration`)
  - API key in header `X-API-Key`

Query an agent. Accepts AgentInteraction Schema as input.
Very similar to chat, but the query resets the Agent before answering the query.
The history of the Agent is permanently deleted before answering the query.

## Path parameters

- `agent_id` string, required

## Request body

- AgentInteraction
  - `interaction_data` union, required
    - InteractionChat
      - `interaction_type` 'CHAT', required
      - `message` string, required
    - InteractionFunctionCall
      - `interaction_type` 'FUNCTIONCALL', required
      - `function_name` string, required
      - `function_args` object, required

## Response `200`

Successful Response

- AgentResponse
  - `id` string, required
  - `time_created` string, date-time, required
  - `name` string, required
  - `description` string, nullable
  - `public` boolean
  - `agent_type` 'DEFAULT' | 'PLAN' | 'PRIMED', required
  - `agent_steps` AgentStep[]
    - `id` string, required
    - `agent_id` string, required
    - `order` integer, required
    - `step_type` string, required
    - `step_message` string, required
  - `generative_model` string
  - `temperature` number
  - `tools` Tool[]
    - `name` string, required
    - `description` string, nullable
    - `public` boolean
    - `llm_selection_string` string, nullable
    - `id` string, required
    - `sub` string, uuid, required
    - `tool_type` string, required
  - `sub` string, uuid, required
  - `response` string, required
  - `source_snippets` SourceSnippet[], required
    - `source_id` string, required
    - `snippet_id` string, required
    - `snippet` string, required
    - `score` number

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/overfit/apis/overfit-insights-revolutionizing-data-retrieval.md) · [All operations](https://skmtc.dev/overfit/apis/overfit-insights-revolutionizing-data-retrieval/llms.txt) · [OpenAPI document](https://skmtc.dev/overfit/apis/overfit-insights-revolutionizing-data-retrieval/revisions/0055f7fe41e5?raw)
