Concept 15 of 16Run it well

DevOps for agents: metadata, versions, CLI and environments

Treating agents as code: Agent Script and related metadata in source control, agent versions and activation, sandboxes and data dependencies, Salesforce CLI agent commands for generation, deployment and tests, and release practices for agents.

Your confidence:Not rated

Simple explanation

Agents as code

  • Agent Script and agent metadata live in source control with flows, Apex, prompt templates and permission sets βš‘ verify metadata types for the new builder.
  • Review changes like code: diffs of instructions and logic.

Versions and activation

  • Agents have versions; activate a new version after tests pass; keep the previous one to roll back.

Environments

  • Build in sandboxes; Data 360 dependencies (data graphs, retrievers, indexes) need their own promotion (DevOps data kits).
  • Test data must cover verification and edge cases.

CLI and pipelines

  • Salesforce CLI agent commands to generate, deploy and run agent tests in CI βš‘ verify current command set.
  • Pipeline: lint and unit tests (Apex) β†’ deploy to test org β†’ agent test suite β†’ approval β†’ production β†’ activate version.

Release practices

  • Feature flags or limited audiences for big changes.
  • Observability watch after release.

Real-world analogy

An agent release is like updating an airline's procedures manual: drafted, reviewed, tested in the simulator, rolled out to some crews first, with the previous edition kept on hand.

Worked example

A team keeps its service agent's Agent Script, flows and prompt templates in Git. A pull request changes the refund rules; the pipeline deploys to a test sandbox, runs 500 agent tests and Apex tests, and after approval deploys and activates a new agent version in production, with the old version ready for rollback.

Diagram

Rendering diagram…

Key points

  • Agents are metadata and code: version them.
  • Activate versions after tests; keep rollback.
  • Promote Data 360 dependencies separately.
  • Use CLI agent commands for deploy and tests in CI.
  • Release gradually and watch observability.

Limits and gotchas

  • Agent behaviour depends on data and models, not just metadata; tests must run in realistic environments.
  • Model changes by providers can alter behaviour; rerun suites after model updates.
  • Prompt templates and actions are dependencies; deploy them together.

🎀 How to say this in an interview

Show a pipeline with agent tests as a gate, versioned activation and rollback.

Common follow-ups

How do you roll back a bad agent change?

Reactivate the previous agent version and redeploy dependent metadata if needed; observability confirms recovery.

What else can change agent behaviour without a deployment?

Data changes, knowledge updates, index refreshes and model updates; monitor and retest.