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

# Chat

`POST /agent/{agent_id}/chat`

## 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}/chat`
- Auth: one of:
  - OpenID Connect (`https://auth.okns.de/realms/overfit-products/.well-known/openid-configuration`)
  - API key in header `X-API-Key`

Chat with an agent. Accepts AgentInteraction Schema as input.
Chat is created allways in contend of the past interactions. A complete chat history is returned orderd by order
Chat Messages can have one of 4 types : USER, ASSISTANT, FUNCTION or SYSTEM. The Function type has allayws a empty message. 
And can be read by using the history endpoint or reading the steps of the response.

## 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)
