agent.toml reference

A fly.toml-style declaration of your agent. Optional at every layer — sky launch scaffolds it, a flags-only path exists for everything, and the file never crosses the wire (the CLI validates and inlines it client-side).

Full schema

Only name is required; type defaults to pi and llm to the type's default model. Long markdown can live inline in triple-quoted strings or in sibling files via file = / prompt_file = — the CLI inlines their content before calling the API.

toml
# agent.toml — everything the create wizard can set. Only `name` is required.
name = "research-agent"
description = "Web research with citations"
type = "hermes"                    # hermes | claude_code | codex | openclaw | pi | dsh | kimi_code | opencode
llm = "deepseek-flash"             # must be compatible with type
reasoning_effort = "high"          # per harness; omit for the harness's own default
capabilities = ["exa.search"]      # capability ids from the catalog
vcpus = 2                          # optional machine size for launch's first session: 1|2|4|8 (launch only)
memory_mb = 4096                   # 256MB steps, 256-2048MB per vCPU
hiring_policy = "deny"             # its sessions work alone; "allow" (default) lets them hire helpers
environment = "env_..."            # the environment its sessions boot in when they name none

# The user prompt layer; the platform preamble is composed server-side.
# Inline here, or `prompt_file = "prompt.md"`.
prompt = """
You are a meticulous research agent…
"""

[[instructions]]                   # additional .md files for the agent
name = "style.md"
file = "instructions/style.md"     # or inline: content = """…"""

[[skills]]                         # a store skill, attached by reference
type = "skill"
skillId = "skill_…"                # from POST /v1/plugins (a skill upload)
version = "latest"                 # or a revision id (skr_…) to pin

[[skills]]                         # or a GitHub repo: its root .claude/skills/
type = "github"                    # is loaded at every session start
url = "https://github.com/org/repo"
ref = "main"                       # optional branch or commit SHA

[[customData]]
id = "prices"
name = "price_sheet"               # lower-case slug: letters, numbers, _
kind = "spreadsheet"               # spreadsheet | doc | private_api | other
uri = "https://…"

Secrets are not spec data and have no key here: set them after launch with sky secrets set <id> KEY=VALUE (values are write-only, encrypted at rest).

Lifecycle

sky launch creates the agent spec + its first session and stamps id = "agent_…" (the agent id — session ids never live in the file); from then on sky deploy re-applies your edits (prompt, display name, description, type, model, capabilities, instruction files, skills, custom data, hiring policy, environment) to the spec, idempotently — the prompt, instruction files and custom data apply to sessions started after the save. A key the file format does not define fails the command, naming it, on launch and deploy; vcpus and memory_mb shape only launch's first session, so sky deploy refuses a file that still carries them (give a new session its machine with sky session create <agent> --vcpus <n> --memory <mb>). -f <path> overrides the ./agent.toml discovery on both commands. A slug left over from before agents were id-addressed is ignored and dropped the next time the file is stamped; stamping rewrites only that line, so the file's comments stay.

Manifest files (apiVersion = "agentsky/v1")

A file that starts with apiVersion = "agentsky/v1" is an agent manifest: the whole agent, one key per POST /agents field with the same names and checks (metadata aside), so it reaches every field the API has, MCP servers, hooks, policies and identity included. A key left out is that field's default. sky agent export <id> -o agent.toml writes one; sky agent apply -f agent.toml creates the agent the first time (stamping its id) and afterwards writes only the fields that differ, printing each change; applying an unchanged file changes nothing, and --dry-run shows the changes without writing them. prompt_file and instructions[].file are read and inlined as here. An unknown key, or a value the API refuses, is printed at its line (agent.toml:12: mcpServers.0.url: url must be https to a public host).

toml
apiVersion = "agentsky/v1"
name = "growth-analyst"
id = "agent_…"                     # stamped by the first sky agent apply
agentType = "codex"
llm = "gpt-5.6-sol"
reasoningEffort = "high"
prompt_file = "prompt.md"
pluginsOff = ["app:gmail"]

[[mcpServers]]
name = "docs"
url = "https://docs.example.com/mcp"

[[hooks]]
event = "pre_tool_use"
command = "./guard.sh"
matcher = "Bash"