This endpoint is in preview and may be modified or removed at any time.
To use this endpoint, add preview=true
to the request query parameters.
Create a new conversation session between the calling user and an Agent.
Use blockingContinue
or streamingContinue
to start adding exchanges to the session.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:aip-agents-write
.
string
An RID identifying an AIP Agent created in AIP Agent Studio.
object
string
The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time.
object
The created Session
string
The Resource Identifier (RID) of the conversation session.
object
Metadata about the session.
string
The Resource Identifier (RID) of the Agent associated with the session.
string
The version of the Agent associated with the session. This can be set by clients on session creation. If not specified, defaults to use the latest published version of the Agent at session creation time.
1
2
3
4
5
curl -X POST \
-H "Content-type: application/json" \
-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/aipAgents/agents/ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1/sessions?preview=true" \
-d '{"agentVersion":"1.0"}'
1
2
3
4
5
6
7
8
9
10
11
12
{
"metadata": {
"updatedTime": "2024-10-01T22:04:24.962583055Z",
"estimatedExpiresTime": "2024-10-02T22:04:24.962583055Z",
"messageCount": 6,
"createdTime": "2024-10-01T20:04:24.962583055Z",
"title": "What is the status of my order?"
},
"agentRid": "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1",
"agentVersion": "1.0",
"rid": "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6"
}