NewWacht Bench is live — AI-assisted development for Wacht

updateAgent()

Patches agent configuration and metadata.

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 example() {  const client = await wachtClient();  const agentId: string = 'agentid-123';  const request: UpdateAiAgentRequest = {    name: 'Support Agent v2',  };  return client.ai.updateAgent(agentId, request);}

Signature

function updateAgent(  agentId: string,  request: UpdateAiAgentRequest,): Promise<AiAgent>

UpdateAiAgentRequest

agentId: string;
Target agent id.
request: UpdateAiAgentRequest;
Request payload object sent to the backend API.
name?: string | undefined;
Display name for the target resource.

Return value

id?: string | undefined;
Agent id.
name?: string | undefined;
Agent display name.
instructions?: string | undefined;
Agent instructions/system prompt.

On this page