const runs = await client.store.getSessionRuns(
	"SESSION_ID"
);
[
	{
		"at": 000,
		"role": "user",
		"user_id": "USER_ID",
		"request": {
			"message": "Hello!"
		}
	},
	{
		"at": 000,
		"role": "agent",
		"run_id": "RUN_1",
		"session_id": "SESSION_1",
		"agent_id": "AGENT_1",
		"agent_name": "Agent",
		"response": {
			"type": "text",
			"content": "Hey, how can I assist you today?"
		},
		"tools": []
	}
]

Allows you to retrieve a list of interaction records (runs) associated with a specific chat session. This can be useful for displaying chat messages to the user, analyzing conversation history, understanding user behavior within a session, and potentially debugging agent interactions.

Arguments

id
string

The session ID to get the runs of.

Response

runs
RunHistory[]

Returns a list of runs, usually following the patter user -> agent -> user -> agent when running individual agents reflecting a basic back-and-forth conversation flow.

Reference to RunHistory

const runs = await client.store.getSessionRuns(
	"SESSION_ID"
);
[
	{
		"at": 000,
		"role": "user",
		"user_id": "USER_ID",
		"request": {
			"message": "Hello!"
		}
	},
	{
		"at": 000,
		"role": "agent",
		"run_id": "RUN_1",
		"session_id": "SESSION_1",
		"agent_id": "AGENT_1",
		"agent_name": "Agent",
		"response": {
			"type": "text",
			"content": "Hey, how can I assist you today?"
		},
		"tools": []
	}
]