Biblioteca de subagentes

save()

api.agents.subagents.save({ name, description, content, tools?, model? }) → Promise<Subagent>

Crea o sostitue un subagente sul conto. Sa descrição è lo que l'agente principale lee al decidir se delegare.

always the accounttools and model optionaldescription decides
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

await api.agents.subagents.save({
  name: "explore",
  description: "Dig through files and data to answer a question, and report the facts.",
  tools: ["read", "list", "glob", "grep", "search", "fetch", "query_storage", "account"],
  model: "gemini-3.5-flash",
  content: [
    "Find what was asked. Quote exactly, with paths.",
    "Do not change anything.",
    "End with the facts, not with advice.",
  ].join("\n"),
});
api.agents.subagents.save(
    name="explore",
    description="Dig through files and data to answer a question, and report the facts.",
    tools=["read", "list", "glob", "grep", "search", "fetch", "query_storage", "account"],
    model="gemini-3.5-flash",
    content="\n".join([
        "Find what was asked. Quote exactly, with paths.",
        "Do not change anything.",
        "End with the facts, not with advice.",
    ]),
)
namestringobrigatório

Letters minuscules, cifres e guillotis.

descriptionstringobrigatório

Una linea, nel sistema prompt. Decide quando l'agente delega a lui.

contentstringobrigatório

Le sue istruzioni, fino a 100 000 caracteres.

toolsstring[]

L'absenta herdita la parentèa.

modelstring

L'absenta herderia del padre.

Scrivendo un buon

  • Dar-lhe il set d'utensilio più ristretto che sa fare il lavoro — un investigator needs no script.
  • Digli di informar i fatti con i sentieri e citazioni: il padre non vede alcuna dei suoi risultati di utensili.
  • Dice che fare quando è bloqué, perché non puès chiedere a ningun.
  • Un modele più barato è a menudo a destra: un delegat lee molto e decide poco.
Comincia con nada

Un subagente non vede parte della conversa — solo il prompt il tschiamt da. Le istruzioni dispunse che, e il tschiamt davs portar l'obiettivo, i percorsi e esattamente che cosa dir.

Nunca scrie al disco

Igual regole di aptitudini: il disco è una fonte de sola lettura, e i files del developpor star loro.