The open-source agent harness - the runtime layer that turns an LLM into a working agent.
docs: correct agent search pagination and list result types (#1032)
Rudy Mizrahi Celekli297fa4491c4f
diff --git a/docs/ui-sdk/reference/server.mdx b/docs/ui-sdk/reference/server.mdxindex 2d5366644..934bb0845 100644--- a/docs/ui-sdk/reference/server.mdx+++ b/docs/ui-sdk/reference/server.mdx@@ -78,8 +78,9 @@ to reference:`SearchAgentsParams`.</Accordion><Accordion title="Pagination">- `PageResult`, `PageParams`, `TokenPagination`, `ListSessionsParams`, `ListSessionsOrder`,- `ListSessionsResponse`, `ListTurnsResponse`, `ListSessionEventsResponse`.+ `ListResult`, `PageParams`, `ListSessionsParams`, `ListSessionsOrder`,+ `ListSessionEventsParams`, `SearchAgentsParams`. List methods return `ListResult<T>`,+ a plain object with `data` and optional `nextPageToken` / `previousPageToken`.</Accordion><Accordion title="Catalog">`ModelCatalogServer`, `ConnectorCatalogServer`, `SkillCatalogServer`,diff --git a/docs/ui-sdk/setup-custom-servers/custom-server.mdx b/docs/ui-sdk/setup-custom-servers/custom-server.mdxindex e3bf61d56..d5fe0042e 100644--- a/docs/ui-sdk/setup-custom-servers/custom-server.mdx+++ b/docs/ui-sdk/setup-custom-servers/custom-server.mdx@@ -77,7 +77,7 @@ export const server: AgentUIServer = {return [];},async searchAgents() {- return [{ agentId: "support-agent", name: "Support agent" }];+ return { data: [{ agentId: "support-agent", name: "Support agent" }] };},async saveAgent() {return {};diff --git a/docs/ui-sdk/setup-custom-servers/server-contract.mdx b/docs/ui-sdk/setup-custom-servers/server-contract.mdxindex 805be10c5..b02c1aa41 100644--- a/docs/ui-sdk/setup-custom-servers/server-contract.mdx+++ b/docs/ui-sdk/setup-custom-servers/server-contract.mdx@@ -222,7 +222,7 @@ interface AgentBuilderServer {getModels(): Promise<ModelSelection[]>;getSkills(): Promise<AgentSkill[]>;getMcp(): Promise<ConnectorState[]>;- searchAgents(req?: SearchAgentsParams): Promise<AgentLibraryEntry[]>;+ searchAgents(req?: SearchAgentsParams): Promise<ListResult<AgentLibraryEntry>>;saveAgent(req: SaveAgentRequest): Promise<SaveAgentResult>;deleteAgent?(req: { agentName: string }): Promise<void>;}@@ -271,7 +271,7 @@ The remaining methods return the minimum each selector renders:Return a non-empty `properties.reasoningEfforts` on a `ModelSelection` and the UI shows a reasoning-effort picker beside the model selector. On `AgentLibraryEntry`, `agentId` is the stable identifier used for selection, history filtering, and session binding; omit it and the row falls back to `name`. Supply `agentSpec` to enable Edit; omit it for try-only agents.</Note>-`SearchAgentsParams` is `{ query?, limit?, offset? }` — offset paging, since it backs a search box rather than an infinite list. `SaveAgentRequest` is `{ agentName, agentSpec, intent, sessionId? }`, where `intent` is `"create"` for a new agent and `"update"` when the chat is already bound to one. It returns a `SaveAgentResult` of `{ agentId?, sessionUpdatedAt? }` — `agentId` is the id the host registry allocated, and `sessionUpdatedAt` is set when the active mutable session was updated in the same call.+`SearchAgentsParams` is `{ query?, limit?, pageToken? }`. `searchAgents` returns `{ data, nextPageToken? }`, using the same token pagination as the session lists; pass the returned token as `pageToken` for the next page. `SaveAgentRequest` is `{ agentName, agentSpec, intent, sessionId? }`, where `intent` is `"create"` for a new agent and `"update"` when the chat is already bound to one. It returns a `SaveAgentResult` of `{ agentId?, sessionUpdatedAt? }` — `agentId` is the id the host registry allocated, and `sessionUpdatedAt` is set when the active mutable session was updated in the same call.## AgentSpec