Dive

Drafting

builtin__save_agent

Validates a drafted agent file, saves it to the project's agents directory, and loads it immediately.

  • Checks keys, model role, tool patterns, subagents, handoffs, schemas and prompt templates.
  • Won't replace an existing file unless overwrite is true.
Available toEffect
Any agent or plan stepHas side effects

Input

overwriteboolean

Replace an existing file with the same name, only after the user confirms

yamlstringrequired

The whole agent file

Output

errorstring
pathstring
problemsstring[]
savedstring
- id: E1
  tool_name: builtin__save_agent
  input:
    yaml: "{{input.yaml}}"