POST
/
agent
/
responses
Agent Responses
curl --request POST \
  --url https://{controlPlaneURL}/api/llm/agent/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "<string>",
  "messages": [
    {
      "role": "system",
      "content": "<string>",
      "name": "<string>"
    }
  ],
  "mcp_servers": [
    {
      "integration_fqn": "<string>",
      "url": "<string>",
      "headers": {},
      "enable_all_tools": true,
      "tools": [
        {
          "name": "<string>"
        }
      ]
    }
  ],
  "max_tokens": 123,
  "temperature": 123,
  "top_p": 123,
  "stream": true,
  "top_k": 123,
  "iteration_limit": 5
}'
{
  "id": "<string>",
  "object": "chat.completion.chunk",
  "created": 123,
  "model": "<string>",
  "service_tier": "<string>",
  "system_fingerprint": "<string>",
  "choices": [
    {
      "index": 123,
      "delta": {
        "content": "<string>",
        "role": "<string>",
        "refusal": "<any>"
      },
      "logprobs": "<any>",
      "finish_reason": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Parameters for generating completions with external tools.

model
string
required

Model Name

iteration_limit
integer
default:5
required

Maximum number of iterations to perform with tool calls. Must be a positive integer. Defaults to 5.

Required range: 0 < x <= 20
messages
(System Message · object | User Message · object | Assistant Message · object | Function Message · object | Tool Message · object | Developer Message · object)[]

A list of messages comprising the conversation history

mcp_servers
object[]

A list of MCP servers FQNs or URLs and their tools

max_tokens
number | null

Maximum number of tokens to generate

temperature
number | null

Sampling temperature to control randomness

top_p
number | null

Nucleus sampling parameter

stream
boolean | null

Whether to stream responses

top_k
number | null

Top-k sampling parameter

Response

Chat completions response with tool calls

object
enum<string>
required
Available options:
chat.completion.chunk
created
number
required
model
string
required
choices
object[]
required
id
string
service_tier
string
system_fingerprint
string