OptionalannotationsAdvisory labels for the tool, as on any other. Default: none — what a sub-agent does is whatever its own tools do.
What the sub-agent is for, as the parent model reads it. Say what it knows and what it will answer, not that it is an agent.
OptionalinputOverride the tool's input schema. Default: {type: "object", properties: {message: {type: "string"}}, required: ["message"]} — one message, sent to the sub-agent as a user turn. An override must still produce a message property, since that is what the executor sends.
Tool name the parent model calls the sub-agent by. Must be unique within a single B.ai.call invocation.
Options for B.ai.tool.agent().
nameanddescriptionare required.Example: ```javascript const researcher = B.ai.agent({ systemPrompt: "You look things up and answer briefly.", tools: [search] }); const ask = B.ai.tool.agent(researcher, { name: "ask_researcher", description: "Ask for a fact about a resident's chart. One question at a time.", }); ```