NewWacht Bench is live — AI-assisted development for Wacht

attachAgentSubAgent()

This method manages parent/child relationships between agents.

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 subAgentId: string = 'subagentid-123';  return client.ai.attachAgentSubAgent(agentId, subAgentId);}

Signature

function attachAgentSubAgent(  agentId: string,  subAgentId: string,  client?: WachtClient,): Promise<void>

Parameters

agentId: string;
Target agent id.
subAgentId: string;
Sub-agent id linked to the parent agent.

On this page