SubAgent

class SubAgent(val name: String, val description: String, val backend: (ToolApprover) -> ChatBackend)(source)

One delegate of SubAgents: a named agent with its own instructions, model and tools, reached through backend. Any ChatBackend works — an on-device loop, an AG-UI or AI SDK server, or a remote A2A agent.

Parameters

backend

builds the delegate's backend for one delegation, given the approver of the enclosing chat (its tools ask the same user).

Constructors

Link copied to clipboard
constructor(name: String, description: String, backend: (ToolApprover) -> ChatBackend)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard