Skip to main content
weave / SubAgent A nested agent invocation — used when the current agent hands work to another named agent (e.g. a planner calling a researcher). Emits an invoke_agent span tagged with the sub-agent’s name and (optionally) its model. Created by weave.startSubagent() (or turn.startAgent(), or llm.startAgent()) and terminated with end(). Example

Table of contents

Properties

Methods

Properties

model

Readonly model: string

Defined in

genai/subagent.ts:41

name

Readonly name: string

Defined in

genai/subagent.ts:40

Methods

end

end(opts?): void Close the SubAgent span. Idempotent. Pass error to mark it as failed.

Parameters

Returns

void

Defined in

genai/subagent.ts:65

create

create(opts): SubAgent

Parameters

Returns

SubAgent

Defined in

genai/subagent.ts:44