Start a chat session with an agent

Start a chat session with an agent. Given a user query, the agent responds by leveraging the language model and tools associated with it. Although this API is stateless, users can ensure conversation continuity by including the cursor from the previous response in subsequent requests. Providing the cursor allows the agent to maintain the context of the conversation and deliver more accurate responses. When the cursor is provided, there is no need to include the previous message history in the messages field.

Note: A cursor is short-lived and may expire over time. Clients should not cache or rely on its long-term availability.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
header Parameters
content-type
required
string (Content-Type)
Request Body schema: application/json
required
agentId
required
string (Agentid) ^[^\x00]{1,128}$

External id that uniquely identifies the agent.

cursor
string (Cursor)

The cursor to use for continuation of a chat session. Use this to create multi-turn conversations, as the cursor will keep track of the conversation state. In nearly all cases, besides starting a new conversation, the cursor should be provided.

required
Array of any (Messages) [ 1 .. 1000 ] items

A list of one or many input items to the agent, containing different content types, used to generate a response.

Responses
200

Successful Response

400

The response for a failed request.

post/ai/agents/chat
Request samples
application/json
{
  • "agentId": "string",
  • "cursor": "string",
  • "messages": [
    • {
      }
    ]
}
Response samples
application/json
{
  • "agentId": "string",
  • "response": {
    • "cursor": "string",
    • "messages": [
      ],
    • "type": "result"
    }
}