List events for a specific task and agent.
Optionally filter for events after a specific sequence ID. Results are ordered by sequence_id.
List Events
import os
from agentex import Agentex
client = Agentex(
api_key=os.environ.get("AGENTEX_SDK_API_KEY"), # This is the default and can be omitted
)
events = client.events.list(
agent_id="agent_id",
task_id="task_id",
)
print(events)[
{
"id": "id",
"agent_id": "agent_id",
"sequence_id": 0,
"task_id": "task_id",
"content": {
"author": "user",
"content": "content",
"attachments": [
{
"file_id": "file_id",
"name": "name",
"size": 0,
"type": "type"
}
],
"format": "markdown",
"style": "static",
"type": "text"
},
"created_at": "2019-12-27T18:11:19.117Z"
}
]Returns Examples
[
{
"id": "id",
"agent_id": "agent_id",
"sequence_id": 0,
"task_id": "task_id",
"content": {
"author": "user",
"content": "content",
"attachments": [
{
"file_id": "file_id",
"name": "name",
"size": 0,
"type": "type"
}
],
"format": "markdown",
"style": "static",
"type": "text"
},
"created_at": "2019-12-27T18:11:19.117Z"
}
]