> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.kurator.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# /agents/{agentId}/predict

> Call an agent.

### Authentication headers

<ParamField header="X_SUPERAGENT_API_KEY" required="true" type="string">
  The ID of the agent.
</ParamField>

### Params

<ParamField path="agentId" required="true" type="string">
  The ID of the agent.
</ParamField>

### Body

<ParamField body="input" type="object">
  An object containing the request to the Agent

  <Expandable title="input object">
    <ResponseField name="input" type="string">
      The message to the agent
    </ResponseField>
  </Expandable>
</ParamField>

<ParamField body="has_streaming" type="boolen">
  Whether or not to return the response as an `EventSource` stream
</ParamField>

<ParamField body="session" type="string">
  An optional session identifier.
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates whether the call was successful.
</ResponseField>

<ResponseField name="data" type="object">
  Agent object
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
  curl --location --request POST 'https://api.kurator.ai/api/v1/agents/{agentId}/predict' \
  --header 'Content-Type: application/json' \
  --header 'X_SUPERAGENT_API_KEY: <api_token>'
  --data-raw '{
      "input": {"input": "Hi"},
      "has_streaming": true
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": "Hi, how may I help you?",
    "trace": {}
  }
  ```
</ResponseExample>
