---
schema_version: "1"
id: e7d908e7e8e1ba617fc5aefdcc6e03c16459feb9c6ca910eae7bc3d6e3539396
title: agent validate authoring-bundle
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/sfclireference/guides/agent/cli_reference_agent_validate_authoring-bundle.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-cli-reference/guide/cli_reference_agent_validate_authoring-bundle.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 70544ea050949fb7352b8b41d78b919d0252b40c4ac953441506545be9cd9b40
products:
  - Salesforce CLI Command Reference
  - salesforcedx
---
<!-- prettier-ignore-start -->

# agent validate authoring-bundle

Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.

## Description for agent validate authoring-bundle

An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension ".agent") that fully describes the agent using the Agent Script language.

This command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you code the Agent Script file to ensure that it's valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.

This command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.

## Flags

| Flag Name (Long) | Flag Name (Short) | Description |
|------------------|-------------------|-------------|
| <code>&#8209;&#8209;api&#8209;name</code> | <code>&#8209;n</code> | **Type:** Value<br><br>API name of the authoring bundle you want to validate; if not specified, the command provides a list that you can choose from. |
| <code>&#8209;&#8209;api&#8209;version</code> | N/A | **Type:** Value<br><br>Override the api version used for api requests made by this command |
| <code>&#8209;&#8209;flags&#8209;dir</code> | N/A | **Type:** Value<br><br>Import flag values from a directory. |
| <code>&#8209;&#8209;json</code> | N/A | **Type:** Boolean<br><br>Format output as json. |
| <code>&#8209;&#8209;target&#8209;org</code> | <code>&#8209;o</code> | **Type:** Value<br>**Required**<br><br>Username or alias of the target org. Not required if the `target-org` configuration variable is already set. |

## Examples for agent validate authoring-bundle

Validate an authoring bundle by being prompted for its API name; use your default org:

```shell
sf agent validate authoring-bundle
```

Validate an authoring bundle with API name MyAuthoringBundle; use the org with alias "my-dev-org":

```shell
sf agent validate authoring-bundle --api-name MyAuthoringBundle --target-org my-dev-org
```
<!-- prettier-ignore-end -->
