For the complete documentation index, see llms.txt. This page is also available as Markdown.

iai agents update

Update an agent in a project

Synopsis

Update an agent in a specific project.

Only the flags you pass are applied; everything else is left at its current value.

--file takes a YAML file matching the agent_config schema and replaces the entire agent config in full when provided (no per-field merge). The config schema depends on the agent version — run 'iai agents compatibility-matrix' to find which schema version applies, then 'iai agents schema --schema-version ' to see the expected fields.

When upgrading to a new agent version with a different schema, update your routines and policies first using --schema-version on their create/update commands, then update the agent with the new config and version.

Lists (--env, --secret) replace their user-managed values when provided — pass every value you want to keep. Env names starting with IAI_MCP_ or MCP_KEY_ are reserved.

For schedules, passing --schedule-uptime auto-clears any existing downtime, and --schedule-downtime auto-clears any existing uptime. Pass --schedule-timezone alongside either to change the timezone.

Use --clear-env, --clear-secret, --clear-schedule, or --clear-stack-id to remove those configurations entirely.

Before applying, the CLI prints deploy-awareness output to stderr: the live revision this update replaces; the names of any env vars or secret refs that --env/--secret would drop from the live agent (the flags replace the entire list); and — when the update replaces the agent config — a summary of content pin changes (a stale local manifest silently reverts colleagues' work). The update is refused when it would downgrade or remove a live content pin, or drop live env vars or secret refs via --env/--secret; pass --force to apply anyway. --clear-env and --clear-secret never trigger the gate: clearing is explicit intent. Changes in unrecognized pin-shaped config sections warn without blocking. The checks fail open when live state cannot be fetched; use --expect-revision to fail instead when the live revision differs from what you expect, and --show-diff for a full live-vs-incoming config diff.

iai agents update <agent_name> [flags]

Examples

  iai agents update chat-agent --version 0.0.3
  iai agents update chat-agent --file agent-config.yaml
  iai agents update chat-agent --file agent-config.yaml --expect-revision 13
  iai agents update chat-agent --file agent-config.yaml --show-diff
  iai agents update chat-agent --endpoint=false
  iai agents update chat-agent --schedule-uptime "Mon-Fri 07:30-20:30" --schedule-timezone Europe/Berlin
  iai agents update chat-agent --clear-schedule
  iai agents update chat-agent --stack-id my-stack
  iai agents update chat-agent --clear-stack-id
  iai agents update chat-agent --mcp github
  iai agents update chat-agent --mcp tools-dev --mcp-id tools
  iai agents update chat-agent --mcp tools-dev --mcp-endpoint public
  iai agents update chat-agent --detach-mcp stripe

Options

Options inherited from parent commands

SEE ALSO

  • iai agents - Deploy AI agents with policies, routines, and tools

Last updated

Was this helpful?