Deployment

Deploy and validate agent fleet configurations.

apply

Deploy agents from a YAML configuration file. The diff engine compares desired state against server state and applies only the necessary changes.

lettactl apply [options]

Options

FlagTypeDescription
--file, -fstring = agents.ymlAgent YAML configuration file
--agentstringDeploy only agents matching this name
--matchstringApply template config to existing agents matching glob pattern (merge semantics)
--dry-runbooleanPreview changes without applying them
--forcebooleanStrict reconciliation — remove resources not in config
--rootstringRoot directory for resolving relative file paths
--manifeststringWrite a JSON manifest with resource IDs after deploy
--skip-first-messagebooleanSkip sending the first_message on agent creation
--canarybooleanDeploy canary copies of agents (CANARY- prefix)
--canary-prefixstring = CANARY-Custom prefix for canary agents
--promotebooleanPromote canary config to production agents
--cleanupbooleanRemove canary agents after promotion
--skip-recompilebooleanSkip automatic conversation recompilation after block changes
--fresh-contextbooleanReset message buffer for agents that had changes (agent reads blocks fresh)
--fresh-context-tagsstringOnly reset context for agents matching these tags (comma-separated, AND logic)
--fresh-context-matchstringOnly reset context for agents matching glob pattern
--compactbooleanCompact conversation history for agents that had changes applied (clears stale context)
--compact-tagsstringOnly compact agents matching these tags (comma-separated, AND logic)
--compact-matchstringOnly compact agents matching glob pattern
--recalibratebooleanSend a calibration message to agents that had changes applied
--recalibrate-messagestringCustom calibration message (overrides default)
--recalibrate-tagsstringOnly recalibrate agents matching these tags (comma-separated, AND logic)
--recalibrate-matchstringOnly recalibrate agents matching glob pattern
--no-waitbooleanFire-and-forget recalibration (don't wait for responses)

Examples

Basic deploy
lettactl apply -f fleet.yaml
Dry run preview
lettactl apply -f fleet.yaml --dry-run
Deploy single agent
lettactl apply -f fleet.yaml --agent my-agent
Template application
lettactl apply -f template.yaml --match 'support-*'
Canary deploy + promote
lettactl apply -f fleet.yaml --canary
lettactl apply -f fleet.yaml --canary --promote --cleanup
Skip auto-recompile
lettactl apply -f fleet.yaml --skip-recompile
Fresh context after block rewrite
lettactl apply -f fleet.yaml --fresh-context
Fresh context + recalibrate
lettactl apply -f fleet.yaml --fresh-context --recalibrate
Compact after block updates
lettactl apply -f fleet.yaml --compact
Compact + recalibrate
lettactl apply -f fleet.yaml --compact --recalibrate
Deploy and recalibrate
lettactl apply -f fleet.yaml --recalibrate
Recalibrate with custom message
lettactl apply -f fleet.yaml --recalibrate --recalibrate-message 'Your tools have been updated.'
Recalibrate specific agents
lettactl apply -f fleet.yaml --recalibrate --recalibrate-tags 'role:support'

Notes

Block changes automatically recompile all conversations for affected agents (Letta 0.16.7+). Use --skip-recompile to opt out.

Supports declarative conversations — declare `conversations` in agent YAML with a `summary` field. They are created on apply and matched by summary on re-apply (idempotent).

validate

Check a YAML configuration file for syntax errors and schema violations without deploying.

lettactl validate [options]

Options

FlagTypeDescription
--file, -fstringConfiguration file to validate

Examples

Validate config
lettactl validate -f fleet.yaml