automagent init

Create a new agent.yaml definition file

Usage

$ automagent init [options]

Options

FlagDescriptionDefault
--quickSkip interactive prompts, use defaults or flag valuesOff
--forceOverwrite an existing agent.yamlOff
--name <name>Agent name (lowercase, numbers, hyphens only)my-agent
--description <desc>Agent descriptionA helpful assistant
--model <model>Model identifierclaude-sonnet-4-20250514

Interactive mode

When you run automagent init without --quick, the CLI prompts you for each field:

$ automagent init
? Agent name: support-agent
? Description: Handles tier-1 customer support tickets
? Model: claude-sonnet-4-20250514
? Instructions (optional): You are a customer support agent. Be concise, empathetic, and always link to relevant help articles.

Press Enter at any prompt to accept the default value. Instructions are optional — if you skip them, a generic placeholder is used.

Quick mode

Quick mode skips all prompts and writes the file immediately using defaults or any values you pass as flags:

$ automagent init --quick

This generates an agent.yaml with default values (my-agent, claude-sonnet-4-20250514, A helpful assistant).

To customize specific fields in quick mode, pass them as flags:

$ automagent init --quick --name code-reviewer --description "Reviews PRs" --model claude-sonnet-4-20250514

Examples

Create an agent interactively:

$ automagent init

Create with defaults, no prompts:

$ automagent init --quick

Create a named agent in quick mode:

$ automagent init --quick --name data-analyst --description "Analyzes CSV datasets and generates reports"

Overwrite an existing file:

$ automagent init --quick --force --name data-analyst

Generated output

The command produces an agent.yaml with a YAML language server directive for editor autocomplete:

# yaml-language-server: $schema=https://automagent.dev/schema/v1.json
apiVersion: v1
kind: agent

name: data-analyst
version: 0.1.0
description: Analyzes CSV datasets and generates reports

model: claude-sonnet-4-20250514

instructions: |
  You are a helpful assistant.

Notes

  • The command will not overwrite an existing agent.yaml unless you pass --force.
  • The name field must match the pattern ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$ — lowercase alphanumeric characters and hyphens, starting and ending with an alphanumeric character.
  • After generating the file, the CLI prints suggested next steps (automagent validate, automagent run).

See also