| Method | HTTP request | Release Stage |
|---|---|---|
| get | GET /v2/aipAgents/agents/{agentRid}/sessions/{sessionRid}/sessionTraces/{sessionTraceId} | Public Beta |
Get the trace of an Agent response. The trace lists the sequence of steps that an Agent took to arrive at an answer. For example, a trace may include steps such as context retrieval and tool calls. Clients should poll this endpoint to check the realtime progress of a response until the trace is completed.
| Name | Type | Description | Notes |
|---|---|---|---|
| agent_rid | AgentRid | An RID identifying an AIP Agent created in AIP Agent Studio. | |
| session_rid | SessionRid | The Resource Identifier (RID) of the conversation session. | |
| session_trace_id | SessionTraceId | The unique identifier for the trace. | |
| preview | Optional[PreviewMode] | Enables the use of preview functionality. | [optional] |
SessionTrace
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# AgentRid | An RID identifying an AIP Agent created in [AIP Agent Studio](https://palantir.com/docs/foundry/agent-studio/overview/).
agent_rid = "ri.aip-agents..agent.732cd5b4-7ca7-4219-aabb-6e976faf63b1"
# SessionRid | The Resource Identifier (RID) of the conversation session.
session_rid = "ri.aip-agents..session.292db3b2-b653-4de6-971c-7e97a7b881d6"
# SessionTraceId | The unique identifier for the trace.
session_trace_id = None
# Optional[PreviewMode] | Enables the use of preview functionality.
preview = None
try:
api_response = client.aip_agents.Agent.Session.SessionTrace.get(
agent_rid, session_rid, session_trace_id, preview=preview
)
print("The get response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling SessionTrace.get: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | SessionTrace | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]