# org open agent

Open an agent in your org's Agentforce Builder UI in a browser.

## Description for org open agent

Use the --api-name flag to open an agent using its API name in the Agentforce Builder UI of your org. Alternatively, use the --authoring-bundle flag to open an agent using the API name of its authoring bundle. The two API names are typically the same for the same agent. Optionally specify the --version flag to open a specific version of the agent.

To generate the URL but not launch it in your browser, specify --url-only.

To open Agentforce Builder in a specific browser, use the --browser flag. Supported browsers are "chrome", "edge", and "firefox". If you don't specify --browser, the org opens in your default browser.

## Flags

| Flag Name (Long)     | Flag Name (Short) | Description                                                                                                                                         |
| -------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--api-name`         | `-n`              | **Type:** Value<br><br>API name, also known as developer name, of the agent you want to open in the org's Agentforce Builder UI.                    |
| `--api-version`      | N/A               | **Type:** Value<br><br>Override the api version used for api requests made by this command                                                          |
| `--authoring-bundle` | N/A               | **Type:** Value<br><br>API name of the agent's authoring bundle to open in Agentforce Builder.                                                      |
| `--browser`          | `-b`              | **Type:** Value<br>**Valid Values:** `chrome`, `edge`, `firefox`<br><br>Browser where the org opens.                                                |
| `--flags-dir`        | N/A               | **Type:** Value<br><br>Import flag values from a directory.                                                                                         |
| `--json`             | N/A               | **Type:** Boolean<br><br>Format output as json.                                                                                                     |
| `--private`          | N/A               | **Type:** Boolean<br><br>Open the agent in the default browser using private (incognito) mode.                                                      |
| `--target-org`       | `-o`              | **Type:** Value<br>**Required**<br><br>Username or alias of the target org. Not required if the `target-org` configuration variable is already set. |
| `--url-only`         | `-r`              | **Type:** Boolean<br><br>Display navigation URL, but don’t launch browser.                                                                          |
| `--version`          | N/A               | **Type:** Value<br><br>Version number of the agent to open in Agentforce Builder. If not specified, the highest version is opened by default.       |

## Examples for org open agent

Open the agent with API name Coral_Cloud_Agent in your default org using your default browser; opens the highest version:

```shell
sf org open agent --api-name Coral_Cloud_Agent
```

Open the agent in an incognito window of your default browser:

```shell
sf org open agent --private --api-name Coral_Cloud_Agent:
```

Open the agent in an org with alias MyTestOrg1 using the Firefox browser:

```shell
sf org open agent --target-org MyTestOrg1 --browser firefox --api-name Coral_Cloud_Agent
```

Open an agent in Agentforce Builder using its authoring bundle API name:

```shell
sf org open agent --authoring-bundle Coral_Cloud_Agent
```

Open a version 1 of an agent in Agentforce Builder:

```shell
sf org open agent --authoring-bundle Coral_Cloud_Agent --version 1
```
