* Gets recent runs for an agent from IterationStore * @param agentId Agent ID * @param count Number of recent runs to fetch * @returns Array of recent iteration data
(agentId: string, count: number)
| 234 | * @returns Array of recent iteration data |
| 235 | */ |
| 236 | async function getRecentAgentRuns(agentId: string, count: number): Promise<IterationData[]> { |
| 237 | // Oldest first, like the agent saw them |
| 238 | return (await IterationStore.getRuns(agentId, { limit: count, images: true })).reverse(); |
| 239 | } |
| 240 | |
| 241 | /** |
| 242 | * Fetches complete agent reference data |
no test coverage detected