Pagination

Paginated resource lists return this envelope:

JSON
{
  "data": [...],
  "has_more": true
}

Parameters

Use these parameters on the endpoints below:

ParameterTypeDescription
limitintMax results per page (1–100, default 20)
starting_afterintCursor: ID of the last item from the previous page

Fetching the Next Page

Pass the last item’s ID as starting_after to fetch the next page. When has_more is false, there are no more results.

page = client.agents.list(limit=10, user_id="customer_123")
for agent in page.data:
    print(agent.name)

# Fetch next page
if page.has_more:
    next_page = client.agents.list(limit=10, user_id="customer_123", starting_after=page.data[-1].id)

Supported Endpoints

These resource lists support cursor pagination:

  • GET /agents
  • GET /runs
  • GET /tasks
  • GET /webhooks
  • GET /memories
  • GET /permissions
  • GET /users
Was this page helpful?