Agent Logs
Read Agent Logs
Retrieves agent requests based on the provided query.
Supports offset pagination (pageNumber, pageSize) and cursor pagination (next, prev). Cursor pagination is active when next or prev is provided.
In cursor mode:
nextandprevcannot be used together and return400.pageNumberis ignored.the
X-Total-Countrequest header is ignored and theX-Total-Countresponse header is not returned.
If no sort is provided, results are returned in _id:ASC order. If a sort is provided, _id:ASC is appended as a tie-breaker when _id is not already part of the sort.
- : Needed to read AI agents.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
A standard query parameter is used to search for specific values.
The number of documents to be retrieved per page.
The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.
Opaque cursor from the X-Next-Cursor response header. Use it to retrieve the next set of results.
Cannot be combined with prev in the same request; sending both returns 400 Bad Request.
When provided, cursor pagination is active: pageNumber is ignored and the X-Total-Count request header is ignored (the X-Total-Count response header is not returned).
Opaque cursor from the X-Prev-Cursor response header. Use it to retrieve the previous set of results. Cannot be combined with next in the same request; sending both returns 400 Bad Request. When provided, cursor pagination is active and pageNumber is ignored.
List of properties used to sort the results, separated by colons.
Fields to be returned in the response.
Flag indicating whether the total number of retrieved results should be returned.
List of agent requests.
The request was syntactically incorrect.
The authorization token is invalid or has expired.
Authorization scopes of the access token are not sufficient and do not match the scopes required by the endpoint.
GET /ai-service/{tenant}/agentic/logs/requests HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "req-123e4567-e89b-12d3-a456-426614174000",
"sessionId": "sess-123e4567-e89b-12d3-a456-426614174000",
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"triggerAgentId": "complaint-agent",
"collaborationAgents": [
"complaint-agent-categorization"
],
"severity": "INFO",
"messages": [
{
"timestamp": "2025-01-15T10:30:27.167Z",
"severity": "INFO",
"message": "Agent started processing request",
"agentId": "complaint-agent",
"agentVersion": 3,
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"isBusinessLog": false
},
{
"timestamp": "2025-01-15T10:30:28.234Z",
"severity": "INFO",
"message": "Retrieved order details successfully",
"agentId": "complaint-agent",
"agentVersion": 3,
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"isBusinessLog": true
}
],
"duration": 45,
"promptTokens": 1234,
"completionTokens": 567,
"agentVersion": 3,
"metadata": {
"version": 1,
"createdAt": "2025-01-15T10:30:27.167Z",
"modifiedAt": "2025-01-15T10:30:28.234Z"
}
}
]Retrieves the agent request by given ID.
- : Needed to read AI agents.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
Fields to be returned in the response.
A single agent request.
Unique identifier of the request log.
Unique identifier of the session.
Unique identifier of the request.
Unique identifier of the agent that triggered the request.
List of agent IDs that collaborated in this request.
Severity level of the log entry.
Duration of the request in seconds.
Cumulative LLM prompt token count for this request.
Cumulative LLM completion token count for this request.
Version of the agent which triggered the request.
The authorization token is invalid or has expired.
Authorization scopes of the access token are not sufficient and do not match the scopes required by the endpoint.
Example response
GET /ai-service/{tenant}/agentic/logs/requests/{requestId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "req-123e4567-e89b-12d3-a456-426614174000",
"sessionId": "sess-123e4567-e89b-12d3-a456-426614174000",
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"triggerAgentId": "complaint-agent",
"collaborationAgents": [
"complaint-agent-categorization"
],
"severity": "INFO",
"messages": [
{
"timestamp": "2025-01-15T10:30:28.234Z",
"severity": "INFO",
"message": "Retrieved order details successfully",
"agentId": "complaint-agent",
"agentVersion": 3,
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"isBusinessLog": true
},
{
"timestamp": "2025-01-15T10:30:29.456Z",
"severity": "WARNING",
"message": "Order status check returned unexpected value",
"agentId": "complaint-agent",
"agentVersion": 3,
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"isBusinessLog": false
}
],
"duration": 45,
"promptTokens": 1234,
"completionTokens": 567,
"agentVersion": 3,
"metadata": {
"version": 1,
"createdAt": "2025-01-15T10:30:27.167Z",
"modifiedAt": "2025-01-15T10:30:29.456Z"
}
}Searches for agent requests based on the provided query.
Supports offset pagination (pageNumber, pageSize) and cursor pagination (next, prev). Cursor pagination is active when next or prev is provided.
In cursor mode:
nextandprevcannot be used together and return400.pageNumberis ignored.the
X-Total-Countrequest header is ignored and theX-Total-Countresponse header is not returned.
If no sort is provided, results are returned in _id:ASC order. If a sort is provided, _id:ASC is appended as a tie-breaker when _id is not already part of the sort.
- : Needed to read AI agents.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
The number of documents to be retrieved per page.
The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.
Opaque cursor from the X-Next-Cursor response header. Use it to retrieve the next set of results.
Cannot be combined with prev in the same request; sending both returns 400 Bad Request.
When provided, cursor pagination is active: pageNumber is ignored and the X-Total-Count request header is ignored (the X-Total-Count response header is not returned).
Opaque cursor from the X-Prev-Cursor response header. Use it to retrieve the previous set of results. Cannot be combined with next in the same request; sending both returns 400 Bad Request. When provided, cursor pagination is active and pageNumber is ignored.
List of properties used to sort the results, separated by colons.
Fields to be returned in the response.
Flag indicating whether the total number of retrieved results should be returned.
A standard query parameter is used to search for specific values.
List of agent requests.
The request was syntactically incorrect.
The authorization token is invalid or has expired.
Authorization scopes of the access token are not sufficient and do not match the scopes required by the endpoint.
POST /ai-service/{tenant}/agentic/logs/requests/search HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 23
{
"q": "name:~Complaint"
}[
{
"id": "req-123e4567-e89b-12d3-a456-426614174000",
"sessionId": "sess-123e4567-e89b-12d3-a456-426614174000",
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"triggerAgentId": "complaint-agent",
"collaborationAgents": [
"complaint-agent-categorization"
],
"severity": "INFO",
"messages": [
{
"timestamp": "2025-01-15T10:30:27.167Z",
"severity": "INFO",
"message": "Agent started processing request",
"agentId": "complaint-agent",
"agentVersion": 3,
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"isBusinessLog": false
},
{
"timestamp": "2025-01-15T10:30:28.234Z",
"severity": "INFO",
"message": "Retrieved order details successfully",
"agentId": "complaint-agent",
"agentVersion": 3,
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"isBusinessLog": true
}
],
"duration": 45,
"promptTokens": 1234,
"completionTokens": 567,
"agentVersion": 3,
"metadata": {
"version": 1,
"createdAt": "2025-01-15T10:30:27.167Z",
"modifiedAt": "2025-01-15T10:30:28.234Z"
}
}
]Retrieves agent sessions based on the provided query.
Supports offset pagination (pageNumber, pageSize) and cursor pagination (next, prev). Cursor pagination is active when next or prev is provided.
In cursor mode:
nextandprevcannot be used together and return400.pageNumberis ignored.the
X-Total-Countrequest header is ignored and theX-Total-Countresponse header is not returned.
If no sort is provided, results are returned in _id:ASC order. If a sort is provided, _id:ASC is appended as a tie-breaker when _id is not already part of the sort.
- : Needed to read AI agents.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
A standard query parameter is used to search for specific values.
The number of documents to be retrieved per page.
The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.
Opaque cursor from the X-Next-Cursor response header. Use it to retrieve the next set of results.
Cannot be combined with prev in the same request; sending both returns 400 Bad Request.
When provided, cursor pagination is active: pageNumber is ignored and the X-Total-Count request header is ignored (the X-Total-Count response header is not returned).
Opaque cursor from the X-Prev-Cursor response header. Use it to retrieve the previous set of results. Cannot be combined with next in the same request; sending both returns 400 Bad Request. When provided, cursor pagination is active and pageNumber is ignored.
List of properties used to sort the results, separated by colons.
Fields to be returned in the response.
Flag indicating whether the total number of retrieved results should be returned.
List of agent sessions.
The request was syntactically incorrect.
The authorization token is invalid or has expired.
Authorization scopes of the access token are not sufficient and do not match the scopes required by the endpoint.
GET /ai-service/{tenant}/agentic/logs/sessions HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"sessionId": "sess-123e4567-e89b-12d3-a456-426614174000",
"triggerAgentId": "complaint-agent",
"severity": "INFO",
"agents": [
"complaint-agent",
"complaint-agent-categorization"
],
"messages": [
{
"timestamp": "2025-01-15T10:30:27.167Z",
"severity": "INFO",
"message": "Session started",
"agentId": "complaint-agent",
"agentVersion": 3,
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"isBusinessLog": false
},
{
"timestamp": "2025-01-15T10:30:28.234Z",
"severity": "INFO",
"message": "Handed off to categorization agent",
"agentId": "complaint-agent",
"agentVersion": 3,
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"isBusinessLog": true
}
],
"duration": 120,
"promptTokens": 2468,
"completionTokens": 890,
"metadata": {
"version": 1,
"createdAt": "2025-01-15T10:30:27.167Z",
"modifiedAt": "2025-01-15T10:30:29.234Z"
}
}
]Retrieves the agent session by given ID.
- : Needed to read AI agents.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
Fields to be returned in the response.
A single agent session.
Unique identifier of the session.
Unique identifier of the agent that triggered the session.
Severity level of the log entry.
List of agent IDs that participated in this session.
Duration of the session in seconds.
Cumulative LLM prompt token count for this session.
Cumulative LLM completion token count for this session.
The authorization token is invalid or has expired.
Authorization scopes of the access token are not sufficient and do not match the scopes required by the endpoint.
Example response
GET /ai-service/{tenant}/agentic/logs/sessions/{sessionId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"sessionId": "sess-123e4567-e89b-12d3-a456-426614174000",
"triggerAgentId": "complaint-agent",
"severity": "INFO",
"agents": [
"complaint-agent",
"complaint-agent-categorization"
],
"messages": [
{
"timestamp": "2025-01-15T10:30:28.234Z",
"severity": "INFO",
"message": "Retrieved order details successfully",
"agentId": "complaint-agent",
"agentVersion": 3,
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"isBusinessLog": true
},
{
"timestamp": "2025-01-15T10:30:30.789Z",
"severity": "INFO",
"message": "Categorization agent processing request",
"agentId": "complaint-agent-categorization",
"agentVersion": 2,
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"isBusinessLog": false
}
],
"duration": 120,
"promptTokens": 2468,
"completionTokens": 890,
"metadata": {
"version": 1,
"createdAt": "2025-01-15T10:30:27.167Z",
"modifiedAt": "2025-01-15T10:30:30.789Z"
}
}Searches for agent sessions based on the provided query.
Supports offset pagination (pageNumber, pageSize) and cursor pagination (next, prev). Cursor pagination is active when next or prev is provided.
In cursor mode:
nextandprevcannot be used together and return400.pageNumberis ignored.the
X-Total-Countrequest header is ignored and theX-Total-Countresponse header is not returned.
If no sort is provided, results are returned in _id:ASC order. If a sort is provided, _id:ASC is appended as a tie-breaker when _id is not already part of the sort.
- : Needed to read AI agents.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
The number of documents to be retrieved per page.
The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.
Opaque cursor from the X-Next-Cursor response header. Use it to retrieve the next set of results.
Cannot be combined with prev in the same request; sending both returns 400 Bad Request.
When provided, cursor pagination is active: pageNumber is ignored and the X-Total-Count request header is ignored (the X-Total-Count response header is not returned).
Opaque cursor from the X-Prev-Cursor response header. Use it to retrieve the previous set of results. Cannot be combined with next in the same request; sending both returns 400 Bad Request. When provided, cursor pagination is active and pageNumber is ignored.
List of properties used to sort the results, separated by colons.
Fields to be returned in the response.
Flag indicating whether the total number of retrieved results should be returned.
A standard query parameter is used to search for specific values.
List of agent sessions.
The request was syntactically incorrect.
The authorization token is invalid or has expired.
Authorization scopes of the access token are not sufficient and do not match the scopes required by the endpoint.
POST /ai-service/{tenant}/agentic/logs/sessions/search HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 23
{
"q": "name:~Complaint"
}[
{
"sessionId": "sess-123e4567-e89b-12d3-a456-426614174000",
"triggerAgentId": "complaint-agent",
"severity": "INFO",
"agents": [
"complaint-agent",
"complaint-agent-categorization"
],
"messages": [
{
"timestamp": "2025-01-15T10:30:27.167Z",
"severity": "INFO",
"message": "Session started",
"agentId": "complaint-agent",
"agentVersion": 3,
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"isBusinessLog": false
},
{
"timestamp": "2025-01-15T10:30:28.234Z",
"severity": "INFO",
"message": "Handed off to categorization agent",
"agentId": "complaint-agent",
"agentVersion": 3,
"requestId": "req-123e4567-e89b-12d3-a456-426614174000",
"isBusinessLog": true
}
],
"duration": 120,
"promptTokens": 2468,
"completionTokens": 890,
"metadata": {
"version": 1,
"createdAt": "2025-01-15T10:30:27.167Z",
"modifiedAt": "2025-01-15T10:30:29.234Z"
}
}
]Last updated
Was this helpful?

