# summary

Generate and deploy an Agentforce agent to a Salesforce org.

# description

Generates Salesforce metadata (BotDefinition, GenAiPlanner, Topics, PromptTemplates) for
a deployable Agentforce agent tailored to the selected profile, then deploys it to the target org.

Use `--dry-run` to generate metadata locally without deploying.

# flags.target-org.summary

Salesforce org alias or username to deploy the agent to.

# flags.target-org.description

The target org where the Agentforce agent metadata will be deployed.
Required unless `--dry-run` is used.

# flags.profile.summary

Role profile to use for agent behavior (default: developer).

# flags.profile.description

Determines which topics, prompt templates, and system instructions the agent will use.
See the --profile flag's help value above for the full current list of valid profile ids.

# flags.dry-run.summary

Generate metadata locally without deploying.

# flags.dry-run.description

When set, the command generates all Agentforce metadata files under `force-app/main/default/`
but does not execute `sf project deploy start`. Useful for reviewing generated metadata before deploying.

# flags.force.summary

Overwrite existing agent metadata files.

# flags.force.description

Force overwrite of all generated metadata files, even if they already exist.

# examples

- Deploy an Agentforce agent with developer profile:

  <%= config.bin %> <%= command.id %> --target-org myOrg --profile developer

- Generate metadata without deploying (dry run):

  <%= config.bin %> <%= command.id %> --dry-run --profile architect

- Deploy with force overwrite:

  <%= config.bin %> <%= command.id %> --target-org myOrg --force

# info.generating

Generating Agentforce metadata for profile: %s

# info.fileCreated

✔ Created: %s

# info.deploying

Deploying Agentforce agent to %s...

# info.deployed

✔ Agentforce agent deployed successfully to %s.

# info.dryRunComplete

Dry run complete. Metadata written to force-app/main/default/. Use without --dry-run to deploy.

# warn.fileExists

Skipped (already exists): %s

# warn.noSfdxProject

No sfdx-project.json found. Cannot determine API version. Using default: %s

# error.deployFailed

Deployment failed: %s

# error.targetOrgRequired

--target-org is required when not using --dry-run.
