List Batches
client.batches.list(BatchListParams { after, before, limit, 2 more } query?, RequestOptionsoptions?): ArrayPage<BatchJob { id, agent_id, background, 15 more } >
/v1/messages/batches
List all batch runs.
Parameters
Returns
List Batches
import Letta from '@letta-ai/letta-client';
const client = new Letta({
apiKey: 'My API Key',
});
// Automatically fetches more pages as needed.
for await (const batchJob of client.batches.list()) {
console.log(batchJob.id);
}
[
{
"id": "job-123e4567-e89b-12d3-a456-426614174000",
"agent_id": "agent_id",
"background": true,
"callback_error": "callback_error",
"callback_sent_at": "2019-12-27T18:11:19.117Z",
"callback_status_code": 0,
"callback_url": "callback_url",
"completed_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by_id": "created_by_id",
"job_type": "job",
"last_updated_by_id": "last_updated_by_id",
"metadata": {
"foo": "bar"
},
"status": "created",
"stop_reason": "end_turn",
"total_duration_ns": 0,
"ttft_ns": 0,
"updated_at": "2019-12-27T18:11:19.117Z"
}
]Returns Examples
[
{
"id": "job-123e4567-e89b-12d3-a456-426614174000",
"agent_id": "agent_id",
"background": true,
"callback_error": "callback_error",
"callback_sent_at": "2019-12-27T18:11:19.117Z",
"callback_status_code": 0,
"callback_url": "callback_url",
"completed_at": "2019-12-27T18:11:19.117Z",
"created_at": "2019-12-27T18:11:19.117Z",
"created_by_id": "created_by_id",
"job_type": "job",
"last_updated_by_id": "last_updated_by_id",
"metadata": {
"foo": "bar"
},
"status": "created",
"stop_reason": "end_turn",
"total_duration_ns": 0,
"ttft_ns": 0,
"updated_at": "2019-12-27T18:11:19.117Z"
}
]