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.
Get the conversation content for a session between the calling user and an Agent.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:aip-agents-read
.
string
An RID identifying an AIP Agent created in AIP Agent Studio.
string
The Resource Identifier (RID) of the conversation session.
object
list<SessionExchange>
The conversation history for the session, represented as a list of exchanges. Each exchange represents an initiating message from the user and the Agent's response. Exchanges are returned in chronological order, starting with the first exchange.
1
2
3
curl \
-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/aipAgents/agents/ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1/sessions/ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6/content?preview=true"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
"exchanges": [
{
"result": {
"totalTokensUsed": 6448,
"agentMarkdownResponse": "The status of your order is **In Transit**.",
"interruptedOutput": false
},
"userInput": {
"text": "What is the status of my order?"
},
"contexts": {
"objectContexts": [
{
"objectRids": [
"ri.phonograph2-objects.main.object.48668bf6-8878-48d2-b8f8-f0017593feb5"
],
"propertyTypeRids": [
"ri.ontology.main.property.7899aeb4-a389-4f2e-a0fd-e7193a4f6cb1"
]
}
]
}
}
]
}