NewWacht Bench is live — AI-assisted development for Wacht

listAgents()

Returns agents as a paginated response with optional limit, offset, and search query params.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function listAgents() {  const client = await wachtClient();  return client.ai.listAgents({ limit: 20, search: 'support' });}

Signature

function listAgents(  options?: {    limit?: number;    offset?: number;    search?: string;  },): Promise<PaginatedResponse<AiAgentWithDetails>>

ListAgentsOptions

limit?: number | undefined;
Maximum agents to return per page.
offset?: number | undefined;
Number of agents to skip.
search?: string | undefined;
Search term for agent name/metadata.

Return value

data?: AiAgentWithDetails[] | undefined;
Agent rows in the current page.
has_more?: boolean | undefined;
Whether another page exists.
limit?: number | undefined;
Effective page size from backend response.
offset?: number | undefined;
Effective page offset from backend response.

Behavior

  • Returns a backend-scoped list response for this resource.
  • Use pagination and filters from this method to build admin list views.

On this page