---
schema_version: "1"
id: 129f53a5e8e2b9f441afdefaa0807fdbb8a782ec9edc339d667ec99da20bcc55
title: CLI for Agent Fabric Plugin
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/anypoint-cli/latest/agent-fabric.md
canonical_url: https://docs.mulesoft.com/anypoint-cli/latest/agent-fabric
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 11f73e1a8b469abbf2cc70b7834de0a586740990171b6d8855b2bb5386ce980a
description: MuleSoft Documentation Site
release: 4.x
latest: true
---
---
product: Anypoint CLI
version: 4.x
is-latest-version: true
---

# CLI for Agent Fabric Plugin

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Use these commands to author, publish, and deploy agent network projects.

> [!IMPORTANT] The Agent Fabric commands come from a separate plugin,
> `mulesoft-anypoint-cli-agent-fabric-plugin`, that isn’t included in the base Anypoint CLI
> installation. Install it before you use these commands, using either of these methods:
>
> - As an Anypoint CLI plugin: see [Install a Plugin Separately](https://docs.mulesoft.com/anypoint-cli/latest/install#install-plugins).
>
> - As a standalone tool for
>   [building agent networks in a CI/CD pipeline](https://docs.mulesoft.com/agent-network/latest/af-build-agent-networks-in-a-ci-cd-environment)
>   through npm: run `npm install mulesoft-anypoint-cli-agent-fabric-plugin`.
>
> Run these commands with the `anypoint-cli-agent-fabric-plugin` executable, as shown in the
> examples.

<table><colgroup><col> <col></colgroup><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p><a href="#agent-network-project-build">agent-network:project:build</a></p></div></div></td><td><div><div><p>Builds the agent network project and validates configuration</p></div></div></td></tr><tr><td><div><div><p><a href="#agent-network-project-create">agent-network:project:create</a></p></div></div></td><td><div><div><p>Creates a new agent network project and generates the initial configuration files</p></div></div></td></tr><tr><td><div><div><p><a href="#agent-network-project-deploy">agent-network:project:deploy</a></p></div></div></td><td><div><div><p>Deploys the agent network project to the target environment</p></div></div></td></tr><tr><td><div><div><p><a href="#agent-network-project-publish">agent-network:project:publish</a></p></div></div></td><td><div><div><p>Publishes the agent network project to Anypoint Exchange</p></div></div></td></tr><tr><td><div><div><p><a href="#agent-network-project-undeploy">agent-network:project:undeploy</a></p></div></div></td><td><div><div><p>Undeploys the agent network project and removes all deployed runtime resources</p></div></div></td></tr><tr><td><div><div><p><a href="#agent-network-project-unpublish">agent-network:project:unpublish</a></p></div></div></td><td><div><div><p>Unpublishes the agent network project asset versions from Anypoint Exchange</p></div></div></td></tr><tr><td><div><div><p><a href="#agent-network-setup-gateways">agent-network:setup:gateways</a></p></div></div></td><td><div><div><p>Sets up the gateways for the agent network</p></div></div></td></tr></tbody></table>

## agent-network:project:build

\> anypoint-cli-agent-fabric-plugin agent-network project build \[flags\]

Builds the current agent network project using the Maven wrapper (`mvnw` or `mvnw.cmd`). This
command validates the configuration and generates the artifacts required for publishing and
deployment.

In addition to the [default flags](https://docs.mulesoft.com/anypoint-cli/latest/#default-options), this command accepts these flags:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Flag</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><div><div><p><code>--bearer &lt;value&gt;</code></p></div></div></td><td><div><div><p>Bearer token<br>You can also set it with <code>ANYPOINT_BEARER</code> env variable</p></div></div></td><td><div><div><p><code>--bearer myBearerToken</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_id &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client ID<br>You can also set it with the <code>ANYPOINT_CLIENT_ID</code> env variable</p></div></div></td><td><div><div><p><code>--client_id myClientID</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_secret &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client Secret<br>You can also set it with the <code>ANYPOINT_CLIENT_SECRET</code> env variable</p></div></div></td><td><div><div><p><code>--client_secret myClientSecret</code></p></div></div></td></tr><tr><td><div><div><p><code>--[no-]collectMetrics</code></p></div></div></td><td><div><div><p>Collect metrics<br>You can also set it with the <code>COLLECT_METRICS</code> env variable</p></div></div></td><td><div><div><p><code>--no-collectMetrics</code></p></div></div></td></tr><tr><td><div><div><p><code>--debug</code></p></div></div></td><td><div><div><p>Enable debug mode</p></div></div></td><td><div><div><p><code>--debug</code></p></div></div></td></tr><tr><td><div><div><p><code>--environment &lt;value&gt;</code></p></div></div></td><td><div><div><p>Environment name<br>You can also set it with the <code>ANYPOINT_ENV</code> variable</p></div></div></td><td><div><div><p><code>--environment Sandbox</code></p></div></div></td></tr><tr><td><div><div><p><code>--forceUpdate</code></p></div></div></td><td><div><div><p>Force update the dependencies</p></div></div></td><td><div><div><p><code>--forceUpdate</code></p></div></div></td></tr><tr><td><div><div><p><code>--host &lt;value&gt;</code></p></div></div></td><td><div><div><p>Host URL<br>Default: <code>anypoint.mulesoft.com</code><br>You can also set it with the <code>ANYPOINT_HOST</code> variable</p></div></div></td><td><div><div><p><code>--host mycompany.anypoint.mulesoft.com</code></p></div></div></td></tr><tr><td><div><div><p><code>--organization &lt;value&gt;</code></p></div></div></td><td><div><div><p>Organization name<br>You can also set it with the <code>ANYPOINT_ORG</code> variable</p></div></div></td><td><div><div><p><code>--organization MyOrg</code></p></div></div></td></tr><tr><td><div><div><p><code>--password &lt;value&gt;</code></p></div></div></td><td><div><div><p>Password<br>You can also set it with the <code>ANYPOINT_PASSWORD</code> variable</p></div></div></td><td><div><div><p><code>--password myPassword</code></p></div></div></td></tr><tr><td><div><div><p><code>--path &lt;value&gt;</code></p></div></div></td><td><div><div><p>Path to the project<br>Default: <code>.</code></p></div></div></td><td><div><div><p><code>--path ./my-agent-network</code></p></div></div></td></tr><tr><td><div><div><p><code>--username &lt;value&gt;</code></p></div></div></td><td><div><div><p>Username<br>You can also set it with the <code>ANYPOINT_USERNAME</code> variable</p></div></div></td><td><div><div><p><code>--username myuser@example.com</code></p></div></div></td></tr></tbody></table>

### Example

$ anypoint-cli-agent-fabric-plugin agent-network project build

## agent-network:project:create

\> anypoint-cli-agent-fabric-plugin agent-network project create --name <projectName> \[flags\]

Creates a new agent network project in the current directory. The command generates a project folder
with initial configuration files, including `agent-network.yaml`.

In addition to the [default flags](https://docs.mulesoft.com/anypoint-cli/latest/#default-options), this command accepts these flags:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Flag</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><div><div><p><code>-n, --name &lt;value&gt;</code></p></div></div></td><td><div><div><p>(Required) Name of the project</p></div></div></td><td><div><div><p><code>--name my-agent-network</code></p></div></div></td></tr><tr><td><div><div><p><code>-o, --output-dir &lt;value&gt;</code></p></div></div></td><td><div><div><p>Output directory for the project</p></div></div></td><td><div><div><p><code>--output-dir ./projects</code></p></div></div></td></tr><tr><td><div><div><p><code>--api-version &lt;value&gt;</code></p></div></div></td><td><div><div><p>API version<br>Default: <code>v1</code></p></div></div></td><td><div><div><p><code>--api-version v2</code></p></div></div></td></tr><tr><td><div><div><p><code>--asset-id &lt;value&gt;</code></p></div></div></td><td><div><div><p>Asset name (GAV). Valid characters are 'A-Z', 'a-z', '0-9', '_' and '-'.</p></div></div></td><td><div><div><p><code>--asset-id my-asset</code></p></div></div></td></tr><tr><td><div><div><p><code>--asset-version &lt;value&gt;</code></p></div></div></td><td><div><div><p>Asset version (GAV)<br>Default: <code>0.0.0</code></p></div></div></td><td><div><div><p><code>--asset-version 1.2.0</code></p></div></div></td></tr><tr><td><div><div><p><code>--bearer &lt;value&gt;</code></p></div></div></td><td><div><div><p>Bearer token<br>You can also set it with the <code>ANYPOINT_BEARER</code> variable</p></div></div></td><td><div><div><p><code>--bearer myBearerToken</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_id &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client ID<br>You can also set it with the <code>ANYPOINT_CLIENT_ID</code> variable</p></div></div></td><td><div><div><p><code>--client_id myClientID</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_secret &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client Secret<br>You can also set it with the <code>ANYPOINT_CLIENT_SECRET</code> variable</p></div></div></td><td><div><div><p><code>--client_secret myClientSecret</code></p></div></div></td></tr><tr><td><div><div><p><code>--[no-]collectMetrics</code></p></div></div></td><td><div><div><p>Collect metrics<br>You can also set it with the <code>COLLECT_METRICS</code> variable</p></div></div></td><td><div><div><p><code>--no-collectMetrics</code></p></div></div></td></tr><tr><td><div><div><p><code>--[no-]create-dir</code></p></div></div></td><td><div><div><p>Create a new directory under <code>output-dir</code> using the project name</p></div></div></td><td><div><div><p><code>--create-dir</code></p></div></div></td></tr><tr><td><div><div><p><code>--environment &lt;value&gt;</code></p></div></div></td><td><div><div><p>Environment name<br>You can also set it with the <code>ANYPOINT_ENV</code> variable</p></div></div></td><td><div><div><p><code>--environment Sandbox</code></p></div></div></td></tr><tr><td><div><div><p><code>--group-id &lt;value&gt;</code></p></div></div></td><td><div><div><p>Group ID (GAV)</p></div></div></td><td><div><div><p><code>--group-id com.myorg</code></p></div></div></td></tr><tr><td><div><div><p><code>--host &lt;value&gt;</code></p></div></div></td><td><div><div><p>Host URL<br>Default: <code>anypoint.mulesoft.com</code><br>You can also set it with the <code>ANYPOINT_HOST</code> variable</p></div></div></td><td><div><div><p><code>--host mycompany.anypoint.mulesoft.com</code></p></div></div></td></tr><tr><td><div><div><p><code>--organization &lt;value&gt;</code></p></div></div></td><td><div><div><p>Organization name<br>You can also set it with the <code>ANYPOINT_ORG</code> env variable</p></div></div></td><td><div><div><p><code>--organization MyOrg</code></p></div></div></td></tr><tr><td><div><div><p><code>--password &lt;value&gt;</code></p></div></div></td><td><div><div><p>Password<br>You can also set it with the <code>ANYPOINT_PASSWORD</code> variable</p></div></div></td><td><div><div><p><code>--password myPassword</code></p></div></div></td></tr><tr><td><div><div><p><code>--tab-size &lt;value&gt;</code></p></div></div></td><td><div><div><p>Tab size for indenting the API specification<br>Default: <code>2</code></p></div></div></td><td><div><div><p><code>--tab-size 4</code></p></div></div></td></tr><tr><td><div><div><p><code>--username &lt;value&gt;</code></p></div></div></td><td><div><div><p>Username<br>You can also set it with the <code>ANYPOINT_USERNAME</code> variable</p></div></div></td><td><div><div><p><code>--username myuser@example.com</code></p></div></div></td></tr></tbody></table>

### Example

$ anypoint-cli-agent-fabric-plugin agent-network project create --name my-agent-network

## agent-network:project:deploy

\> anypoint-cli-agent-fabric-plugin agent-network project deploy \[flags\]

Deploys the agent network application. By default, the command uses single-gateway mode with the
`agent-network-gw` gateway. You can override this using the `-g` flag or switch to separate-gateways
mode using `-i` and `-e` flags.

In addition to the [default flags](https://docs.mulesoft.com/anypoint-cli/latest/#default-options), this command accepts these flags:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Flag</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><div><div><p><code>-e, --egress-gw &lt;value&gt;</code></p></div></div></td><td><div><div><p>Name of the target egress gateway (separate-gateways mode; requires <code>--ingress-gw</code>). When no gateway flags are provided, deploy defaults to single-gateway mode using <code>agent-network-gw</code>.</p></div></div></td><td><div><div><p><code>--egress-gw custom-egress</code></p></div></div></td></tr><tr><td><div><div><p><code>-g, --gateway &lt;value&gt;</code></p></div></div></td><td><div><div><p>Name of the gateway for single-gateway mode (recommended). Mutually exclusive with <code>--ingress-gw</code> and <code>--egress-gw</code>.</p></div></div></td><td><div><div><p><code>--gateway my-gateway</code></p></div></div></td></tr><tr><td><div><div><p><code>-i, --ingress-gw &lt;value&gt;</code></p></div></div></td><td><div><div><p>Name of the target ingress gateway. Combine with <code>--egress-gw</code> for separate-gateways mode; on its own it selects single-gateway mode using this gateway. When no gateway flags are provided, deploy defaults to single-gateway mode using <code>agent-network-gw</code>.</p></div></div></td><td><div><div><p><code>--ingress-gw custom-ingress</code></p></div></div></td></tr><tr><td><div><div><p><code>-t, --target-space &lt;value&gt;</code></p></div></div></td><td><div><div><p>Name of the target space to deploy. In single-gateway mode, optional; when provided it must match the gateway’s target space (validated, not used for lookup). In separate-gateways mode, defaults to <code>agent-network-space</code>.</p></div></div></td><td><div><div><p><code>--target-space my-space</code></p></div></div></td></tr><tr><td><div><div><p><code>--bearer &lt;value&gt;</code></p></div></div></td><td><div><div><p>Bearer token<br>You can also set it with the <code>ANYPOINT_BEARER</code> variable</p></div></div></td><td><div><div><p><code>--bearer myBearerToken</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_id &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client ID<br>You can also set it with the <code>ANYPOINT_CLIENT_ID</code> variable</p></div></div></td><td><div><div><p><code>--client_id myClientID</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_secret &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client Secret<br>You can also set it with the <code>ANYPOINT_CLIENT_SECRET</code> variable</p></div></div></td><td><div><div><p><code>--client_secret myClientSecret</code></p></div></div></td></tr><tr><td><div><div><p><code>--[no-]collectMetrics</code></p></div></div></td><td><div><div><p>Collect metrics<br>You can also set it with the <code>COLLECT_METRICS</code> variable</p></div></div></td><td><div><div><p><code>--no-collectMetrics</code></p></div></div></td></tr><tr><td><div><div><p><code>--disable-tracing</code></p></div></div></td><td><div><div><p>Disable tracing functionalities</p></div></div></td><td><div><div><p><code>--disable-tracing</code></p></div></div></td></tr><tr><td><div><div><p><code>--dont-wait-for-agent-network</code></p></div></div></td><td><div><div><p>Do not wait for the agent network to be ready</p></div></div></td><td><div><div><p><code>--dont-wait-for-agent-network</code></p></div></div></td></tr><tr><td><div><div><p><code>--environment &lt;value&gt;</code></p></div></div></td><td><div><div><p>Environment name<br>You can also set it with the <code>ANYPOINT_ENV</code> variable</p></div></div></td><td><div><div><p><code>--environment Sandbox</code></p></div></div></td></tr><tr><td><div><div><p><code>--host &lt;value&gt;</code></p></div></div></td><td><div><div><p>Host URL<br>Default: <code>anypoint.mulesoft.com</code><br>You can also set it with the <code>ANYPOINT_HOST</code> variable</p></div></div></td><td><div><div><p><code>--host mycompany.anypoint.mulesoft.com</code></p></div></div></td></tr><tr><td><div><div><p><code>--max-retries &lt;value&gt;</code></p></div></div></td><td><div><div><p>Max retries to check the status of the deploying application<br>Default: <code>3</code></p></div></div></td><td><div><div><p><code>--max-retries 5</code></p></div></div></td></tr><tr><td><div><div><p><code>--organization &lt;value&gt;</code></p></div></div></td><td><div><div><p>Organization name<br>You can also set it with the <code>ANYPOINT_ORG</code> variable</p></div></div></td><td><div><div><p><code>--organization MyOrg</code></p></div></div></td></tr><tr><td><div><div><p><code>--password &lt;value&gt;</code></p></div></div></td><td><div><div><p>Password<br>You can also set it with the <code>ANYPOINT_PASSWORD</code> variable</p></div></div></td><td><div><div><p><code>--password myPassword</code></p></div></div></td></tr><tr><td><div><div><p><code>--path &lt;value&gt;</code></p></div></div></td><td><div><div><p>Path to the project<br>Default: <code>.</code></p></div></div></td><td><div><div><p><code>--path ./my-agent-network</code></p></div></div></td></tr><tr><td><div><div><p><code>--process-timeout &lt;value&gt;</code></p></div></div></td><td><div><div><p>Process timeout in milliseconds<br>Default: <code>600000</code></p></div></div></td><td><div><div><p><code>--process-timeout 900000</code></p></div></div></td></tr><tr><td><div><div><p><code>--property &lt;value&gt;</code></p></div></div></td><td><div><div><p>Property to override in <code>name:value</code> format</p></div></div></td><td><div><div><p><code>--property apiKey:sk-xxx</code></p></div></div></td></tr><tr><td><div><div><p><code>--request-timeout &lt;value&gt;</code></p></div></div></td><td><div><div><p>Request timeout in milliseconds<br>Default: <code>60000</code></p></div></div></td><td><div><div><p><code>--request-timeout 120000</code></p></div></div></td></tr><tr><td><div><div><p><code>--username &lt;value&gt;</code></p></div></div></td><td><div><div><p>Username<br>You can also set it with the <code>ANYPOINT_USERNAME</code> variable</p></div></div></td><td><div><div><p><code>--username myuser@example.com</code></p></div></div></td></tr><tr><td><div><div><p><code>--json</code></p></div></div></td><td><div><div><p>Format output as JSON</p></div></div></td><td><div><div><p><code>--json</code></p></div></div></td></tr></tbody></table>

### Example

$ anypoint-cli-agent-fabric-plugin agent-network project deploy

$ anypoint-cli-agent-fabric-plugin agent-network project deploy --property apiKey:sk-xxx

$ anypoint-cli-agent-fabric-plugin agent-network project deploy --property apiKey:sk-xxx --property
role:user

$ anypoint-cli-agent-fabric-plugin agent-network project deploy --path ./my-project --property
myAgent.url:https://api.example.com

## agent-network:project:publish

\> anypoint-cli-agent-fabric-plugin agent-network project publish \[flags\]

Publishes the current agent network project to Anypoint Exchange. The command outputs links and
details for all created assets.

In addition to the [default flags](https://docs.mulesoft.com/anypoint-cli/latest/#default-options), this command accepts these flags:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Flag</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><div><div><p><code>--bearer &lt;value&gt;</code></p></div></div></td><td><div><div><p>Bearer token<br>You can also set it with the <code>ANYPOINT_BEARER</code> variable</p></div></div></td><td><div><div><p><code>--bearer myBearerToken</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_id &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client ID<br>You can also set it with the <code>ANYPOINT_CLIENT_ID</code> variable</p></div></div></td><td><div><div><p><code>--client_id myClientID</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_secret &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client Secret<br>You can also set it with the <code>ANYPOINT_CLIENT_SECRET</code> variable</p></div></div></td><td><div><div><p><code>--client_secret myClientSecret</code></p></div></div></td></tr><tr><td><div><div><p><code>--[no-]collectMetrics</code></p></div></div></td><td><div><div><p>Collect metrics<br>You can also set it with the <code>COLLECT_METRICS</code> variable</p></div></div></td><td><div><div><p><code>--no-collectMetrics</code></p></div></div></td></tr><tr><td><div><div><p><code>--debug</code></p></div></div></td><td><div><div><p>Enable debug mode</p></div></div></td><td><div><div><p><code>--debug</code></p></div></div></td></tr><tr><td><div><div><p><code>--environment &lt;value&gt;</code></p></div></div></td><td><div><div><p>Environment name<br>You can also set it with the <code>ANYPOINT_ENV</code> variable</p></div></div></td><td><div><div><p><code>--environment Sandbox</code></p></div></div></td></tr><tr><td><div><div><p><code>--host &lt;value&gt;</code></p></div></div></td><td><div><div><p>Host URL<br>Default: <code>anypoint.mulesoft.com</code><br>You can also set it with the <code>ANYPOINT_HOST</code> variable</p></div></div></td><td><div><div><p><code>--host mycompany.anypoint.mulesoft.com</code></p></div></div></td></tr><tr><td><div><div><p><code>--organization &lt;value&gt;</code></p></div></div></td><td><div><div><p>Organization name<br>You can also set it with <code>ANYPOINT_ORG</code> env variable</p></div></div></td><td><div><div><p><code>--organization MyOrg</code></p></div></div></td></tr><tr><td><div><div><p><code>--password &lt;value&gt;</code></p></div></div></td><td><div><div><p>Password<br>You can also set it with the <code>ANYPOINT_PASSWORD</code> variable</p></div></div></td><td><div><div><p><code>--password myPassword</code></p></div></div></td></tr><tr><td><div><div><p><code>--path &lt;value&gt;</code></p></div></div></td><td><div><div><p>Path to the project<br>Default: <code>.</code></p></div></div></td><td><div><div><p><code>--path ./my-agent-network</code></p></div></div></td></tr><tr><td><div><div><p><code>--username &lt;value&gt;</code></p></div></div></td><td><div><div><p>Username<br>You can also set it with the <code>ANYPOINT_USERNAME</code> variable</p></div></div></td><td><div><div><p><code>--username myuser@example.com</code></p></div></div></td></tr><tr><td><div><div><p><code>--json</code></p></div></div></td><td><div><div><p>Format output as JSON</p></div></div></td><td><div><div><p><code>--json</code></p></div></div></td></tr></tbody></table>

### Example

$ anypoint-cli-agent-fabric-plugin agent-network project publish

## agent-network:project:undeploy

\> anypoint-cli-agent-fabric-plugin agent-network project undeploy \[flags\]

Undeploys the agent network application, removing all deployed resources.

In addition to the [default flags](https://docs.mulesoft.com/anypoint-cli/latest/#default-options), this command accepts these flags:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Flag</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><div><div><p><code>--api-version &lt;value&gt;</code></p></div></div></td><td><div><div><p>API version used to discover remotely deployed resources when using <code>--gav</code><br>Default: <code>v1</code></p></div></div></td><td><div><div><p><code>--api-version v1</code></p></div></div></td></tr><tr><td><div><div><p><code>--bearer &lt;value&gt;</code></p></div></div></td><td><div><div><p>Bearer token<br>You can also set it with the <code>ANYPOINT_BEARER</code> variable</p></div></div></td><td><div><div><p><code>--bearer myBearerToken</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_id &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client ID<br>You can also set it with the <code>ANYPOINT_CLIENT_ID</code> variable</p></div></div></td><td><div><div><p><code>--client_id myClientID</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_secret &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client Secret<br>You can also set it with the <code>ANYPOINT_CLIENT_SECRET</code> variable</p></div></div></td><td><div><div><p><code>--client_secret myClientSecret</code></p></div></div></td></tr><tr><td><div><div><p><code>--[no-]collectMetrics</code></p></div></div></td><td><div><div><p>Collect metrics<br>You can also set it with the <code>COLLECT_METRICS</code> variable</p></div></div></td><td><div><div><p><code>--no-collectMetrics</code></p></div></div></td></tr><tr><td><div><div><p><code>--dry-run</code></p></div></div></td><td><div><div><p>Preview the deploy-plane resources that would be undeployed without deleting anything</p></div></div></td><td><div><div><p><code>--dry-run</code></p></div></div></td></tr><tr><td><div><div><p><code>--environment &lt;value&gt;</code></p></div></div></td><td><div><div><p>Environment name<br>You can also set it with the <code>ANYPOINT_ENV</code> variable</p></div></div></td><td><div><div><p><code>--environment Sandbox</code></p></div></div></td></tr><tr><td><div><div><p><code>--gav &lt;value&gt;</code></p></div></div></td><td><div><div><p>Parent asset GAV (<code>groupId:assetId:version</code>). Discovers deployed resources remotely. Requires an environment to be selected</p></div></div></td><td><div><div><p><code>--gav myOrgId:my-network:0.0.0</code></p></div></div></td></tr><tr><td><div><div><p><code>--host &lt;value&gt;</code></p></div></div></td><td><div><div><p>Host URL<br>Default: <code>anypoint.mulesoft.com</code><br>You can also set it with the <code>ANYPOINT_HOST</code> variable</p></div></div></td><td><div><div><p><code>--host mycompany.anypoint.mulesoft.com</code></p></div></div></td></tr><tr><td><div><div><p><code>--json</code></p></div></div></td><td><div><div><p>Format output as JSON</p></div></div></td><td><div><div><p><code>--json</code></p></div></div></td></tr><tr><td><div><div><p><code>--organization &lt;value&gt;</code></p></div></div></td><td><div><div><p>Organization name<br>You can also set it with the <code>ANYPOINT_ORG</code> variable</p></div></div></td><td><div><div><p><code>--organization MyOrg</code></p></div></div></td></tr><tr><td><div><div><p><code>--password &lt;value&gt;</code></p></div></div></td><td><div><div><p>Password<br>You can also set it with the <code>ANYPOINT_PASSWORD</code> variable</p></div></div></td><td><div><div><p><code>--password myPassword</code></p></div></div></td></tr><tr><td><div><div><p><code>--path &lt;value&gt;</code></p></div></div></td><td><div><div><p>Path to the project. Discovers deployed resources remotely from the project lock file. Requires an environment to be selected. Mutually exclusive with <code>--gav</code></p></div></div></td><td><div><div><p><code>--path ./my-project</code></p></div></div></td></tr><tr><td><div><div><p><code>--process-timeout &lt;value&gt;</code></p></div></div></td><td><div><div><p>Process timeout in milliseconds<br>Default: <code>900000</code></p></div></div></td><td><div><div><p><code>--process-timeout 900000</code></p></div></div></td></tr><tr><td><div><div><p><code>--request-timeout &lt;value&gt;</code></p></div></div></td><td><div><div><p>Request timeout in milliseconds<br>Default: <code>60000</code></p></div></div></td><td><div><div><p><code>--request-timeout 60000</code></p></div></div></td></tr><tr><td><div><div><p><code>--username &lt;value&gt;</code></p></div></div></td><td><div><div><p>Username<br>You can also set it with the <code>ANYPOINT_USERNAME</code> variable</p></div></div></td><td><div><div><p><code>--username myuser@example.com</code></p></div></div></td></tr></tbody></table>

### Examples

Undeploy from the current project:

$ anypoint-cli-agent-fabric-plugin agent-network project undeploy --environment Sandbox

Undeploy from a specific project path:

$ anypoint-cli-agent-fabric-plugin agent-network project undeploy --path ./my-project --environment
Sandbox

Undeploy using GAV coordinates:

$ anypoint-cli-agent-fabric-plugin agent-network project undeploy --gav myOrgId:my-network:0.0.0
--environment Sandbox

Preview resources that would be undeployed (dry run):

$ anypoint-cli-agent-fabric-plugin agent-network project undeploy --dry-run --environment Sandbox

## agent-network:project:unpublish

\> anypoint-cli-agent-fabric-plugin agent-network project unpublish \[flags\]

Removes the agent network assets from Anypoint Exchange. By default performs a soft-delete; use
`--hard-delete` for irreversible removal.

To prevent orphaned runtime references to deleted Exchange assets, run
`agent-network project undeploy` before `unpublish`.

In addition to the [default flags](https://docs.mulesoft.com/anypoint-cli/latest/#default-options), this command accepts these flags:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Flag</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><div><div><p><code>--api-version &lt;value&gt;</code></p></div></div></td><td><div><div><p>API version used to discover remotely published assets when using <code>--gav</code><br>Default: <code>v1</code></p></div></div></td><td><div><div><p><code>--api-version v1</code></p></div></div></td></tr><tr><td><div><div><p><code>--bearer &lt;value&gt;</code></p></div></div></td><td><div><div><p>Bearer token<br>You can also set it with the <code>ANYPOINT_BEARER</code> variable</p></div></div></td><td><div><div><p><code>--bearer myBearerToken</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_id &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client ID<br>You can also set it with the <code>ANYPOINT_CLIENT_ID</code> variable</p></div></div></td><td><div><div><p><code>--client_id myClientID</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_secret &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client Secret<br>You can also set it with the <code>ANYPOINT_CLIENT_SECRET</code> variable</p></div></div></td><td><div><div><p><code>--client_secret myClientSecret</code></p></div></div></td></tr><tr><td><div><div><p><code>--[no-]collectMetrics</code></p></div></div></td><td><div><div><p>Collect metrics<br>You can also set it with the <code>COLLECT_METRICS</code> variable</p></div></div></td><td><div><div><p><code>--no-collectMetrics</code></p></div></div></td></tr><tr><td><div><div><p><code>--dry-run</code></p></div></div></td><td><div><div><p>Preview the Exchange assets that would be unpublished without deleting anything</p></div></div></td><td><div><div><p><code>--dry-run</code></p></div></div></td></tr><tr><td><div><div><p><code>--environment &lt;value&gt;</code></p></div></div></td><td><div><div><p>Environment name<br>You can also set it with the <code>ANYPOINT_ENV</code> variable</p></div></div></td><td><div><div><p><code>--environment Sandbox</code></p></div></div></td></tr><tr><td><div><div><p><code>--gav &lt;value&gt;</code></p></div></div></td><td><div><div><p>Parent asset GAV (<code>groupId:assetId:version</code>). Discovers assets remotely. Use <code>--environment</code> to enable the active API instances safety check</p></div></div></td><td><div><div><p><code>--gav myOrgId:my-network:0.0.0</code></p></div></div></td></tr><tr><td><div><div><p><code>--hard-delete</code></p></div></div></td><td><div><div><p>Permanently delete assets from Exchange. This cannot be undone</p></div></div></td><td><div><div><p><code>--hard-delete</code></p></div></div></td></tr><tr><td><div><div><p><code>--host &lt;value&gt;</code></p></div></div></td><td><div><div><p>Host URL<br>Default: <code>anypoint.mulesoft.com</code><br>You can also set it with the <code>ANYPOINT_HOST</code> variable</p></div></div></td><td><div><div><p><code>--host mycompany.anypoint.mulesoft.com</code></p></div></div></td></tr><tr><td><div><div><p><code>--json</code></p></div></div></td><td><div><div><p>Format output as JSON</p></div></div></td><td><div><div><p><code>--json</code></p></div></div></td></tr><tr><td><div><div><p><code>--organization &lt;value&gt;</code></p></div></div></td><td><div><div><p>Organization name<br>You can also set it with the <code>ANYPOINT_ORG</code> variable</p></div></div></td><td><div><div><p><code>--organization MyOrg</code></p></div></div></td></tr><tr><td><div><div><p><code>--password &lt;value&gt;</code></p></div></div></td><td><div><div><p>Password<br>You can also set it with the <code>ANYPOINT_PASSWORD</code> variable</p></div></div></td><td><div><div><p><code>--password myPassword</code></p></div></div></td></tr><tr><td><div><div><p><code>--path &lt;value&gt;</code></p></div></div></td><td><div><div><p>Path to the project. Reads the published assets from the project lock file. Select an environment to enable the active API instances safety check. Mutually exclusive with <code>--gav</code></p></div></div></td><td><div><div><p><code>--path ./my-project</code></p></div></div></td></tr><tr><td><div><div><p><code>--username &lt;value&gt;</code></p></div></div></td><td><div><div><p>Username<br>You can also set it with the <code>ANYPOINT_USERNAME</code> variable</p></div></div></td><td><div><div><p><code>--username myuser@example.com</code></p></div></div></td></tr></tbody></table>

### Examples

Unpublish with soft-delete:

$ anypoint-cli-agent-fabric-plugin agent-network project unpublish --environment Sandbox

Unpublish from a specific project path:

$ anypoint-cli-agent-fabric-plugin agent-network project unpublish --path ./my-project --environment
Sandbox

Unpublish with hard-delete (irreversible):

$ anypoint-cli-agent-fabric-plugin agent-network project unpublish --hard-delete --environment
Sandbox

Unpublish using GAV coordinates:

$ anypoint-cli-agent-fabric-plugin agent-network project unpublish --gav myOrgId:my-network:0.0.0
--environment Sandbox

Preview assets that would be unpublished (dry run):

$ anypoint-cli-agent-fabric-plugin agent-network project unpublish --dry-run --environment Sandbox

## agent-network:setup:gateways

\> anypoint-cli-agent-fabric-plugin agent-network setup gateways \[flags\]

Sets up the agent network environment with the required gateways in the specified target space
(private space, RTF, or shared space). This step is required only if the target space doesn’t
already have gateways. In the typical (happy path) workflow, you run it once per target space before
the first deployment.

In addition to the [default flags](https://docs.mulesoft.com/anypoint-cli/latest/#default-options), this command accepts these flags:

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Flag</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><div><div><p><code>-e, --egress-gw &lt;value&gt;</code></p></div></div></td><td><div><div><p>Name of the egress gateway (separate-gateway mode; requires <code>--ingress-gw</code>)</p></div></div></td><td><div><div><p><code>--egress-gw my-egress</code></p></div></div></td></tr><tr><td><div><div><p><code>-g, --gateway &lt;value&gt;</code></p></div></div></td><td><div><div><p>Name of the gateway for single-gateway mode (recommended). Mutually exclusive with <code>--ingress-gw</code> and <code>--egress-gw</code>.</p></div></div></td><td><div><div><p><code>--gateway my-gateway</code></p></div></div></td></tr><tr><td><div><div><p><code>-i, --ingress-gw &lt;value&gt;</code></p></div></div></td><td><div><div><p>Name of the ingress gateway (separate-gateway mode)</p></div></div></td><td><div><div><p><code>--ingress-gw my-ingress</code></p></div></div></td></tr><tr><td><div><div><p><code>-t, --target-space &lt;value&gt;</code></p></div></div></td><td><div><div><p>Name of the target space (private space, RTF, or shared space) where you set up the agent network environment<br>Default: <code>agent-network-space</code></p></div></div></td><td><div><div><p><code>--target-space my-space</code></p></div></div></td></tr><tr><td><div><div><p><code>--bearer &lt;value&gt;</code></p></div></div></td><td><div><div><p>Bearer token<br>You can also set it with the <code>ANYPOINT_BEARER</code> variable</p></div></div></td><td><div><div><p><code>--bearer myBearerToken</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_id &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client ID<br>You can also set it with the <code>ANYPOINT_CLIENT_ID</code> variable</p></div></div></td><td><div><div><p><code>--client_id myClientID</code></p></div></div></td></tr><tr><td><div><div><p><code>--client_secret &lt;value&gt;</code></p></div></div></td><td><div><div><p>Client Secret<br>You can also set it with the <code>ANYPOINT_CLIENT_SECRET</code> variable</p></div></div></td><td><div><div><p><code>--client_secret myClientSecret</code></p></div></div></td></tr><tr><td><div><div><p><code>--[no-]collectMetrics</code></p></div></div></td><td><div><div><p>Collect metrics<br>You can also set it with the <code>COLLECT_METRICS</code> variable</p></div></div></td><td><div><div><p><code>--no-collectMetrics</code></p></div></div></td></tr><tr><td><div><div><p><code>--dont-wait-for-gateways-running</code></p></div></div></td><td><div><div><p>Do not wait for the gateways to be running</p></div></div></td><td><div><div><p><code>--dont-wait-for-gateways-running</code></p></div></div></td></tr><tr><td><div><div><p><code>--environment &lt;value&gt;</code></p></div></div></td><td><div><div><p>Environment name<br>You can also set it with the <code>ANYPOINT_ENV</code> variable</p></div></div></td><td><div><div><p><code>--environment Sandbox</code></p></div></div></td></tr><tr><td><div><div><p><code>--host &lt;value&gt;</code></p></div></div></td><td><div><div><p>Host URL<br>Default: <code>anypoint.mulesoft.com</code><br>You can also set it with the <code>ANYPOINT_HOST</code> variable</p></div></div></td><td><div><div><p><code>--host mycompany.anypoint.mulesoft.com</code></p></div></div></td></tr><tr><td><div><div><p><code>--organization &lt;value&gt;</code></p></div></div></td><td><div><div><p>Organization name<br>You can also set it with the <code>ANYPOINT_ORG</code> variable</p></div></div></td><td><div><div><p><code>--organization MyOrg</code></p></div></div></td></tr><tr><td><div><div><p><code>--password &lt;value&gt;</code></p></div></div></td><td><div><div><p>Password<br>You can also set it with the <code>ANYPOINT_PASSWORD</code> variable</p></div></div></td><td><div><div><p><code>--password myPassword</code></p></div></div></td></tr><tr><td><div><div><p><code>--username &lt;value&gt;</code></p></div></div></td><td><div><div><p>Username<br>You can also set it with the <code>ANYPOINT_USERNAME</code> variable</p></div></div></td><td><div><div><p><code>--username myuser@example.com</code></p></div></div></td></tr></tbody></table>

### Example

$ anypoint-cli-agent-fabric-plugin agent-network setup gateways --target-space my-space
