Contact Us 1-800-596-4880

CLI for Agent Fabric Plugin

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

Command Description

Builds the agent network project and validates configuration

Creates a new agent network project and generates the initial configuration files

Deploys the agent network project to the target environment

Publishes the agent network project to Anypoint Exchange

Sets up the gateways for the agent network

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, this command accepts these flags:

Flag Description Example

--bearer <value>

Bearer token
You can also set it with ANYPOINT_BEARER env variable

--bearer myBearerToken

--client_id <value>

Client ID
You can also set it with the ANYPOINT_CLIENT_ID env variable

--client_id myClientID

--client_secret <value>

Client Secret
You can also set it with the ANYPOINT_CLIENT_SECRET env variable

--client_secret myClientSecret

--[no-]collectMetrics

Collect metrics
You can also set it with the COLLECT_METRICS env variable

--no-collectMetrics

--debug

Enable debug mode

--debug

--environment <value>

Environment name
You can also set it with the ANYPOINT_ENV variable

--environment Sandbox

--forceUpdate

Force update the dependencies

--forceUpdate

--host <value>

Host URL
Default: anypoint.mulesoft.com
You can also set it with the ANYPOINT_HOST variable

--host mycompany.anypoint.mulesoft.com

--organization <value>

Organization name
You can also set it with the ANYPOINT_ORG variable

--organization MyOrg

--password <value>

Password
You can also set it with the ANYPOINT_PASSWORD variable

--password myPassword

--path <value>

Path to the project
Default: .

--path ./my-agent-network

--username <value>

Username
You can also set it with the ANYPOINT_USERNAME variable

--username myuser@example.com

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, this command accepts these flags:

Flag Description Example

-n, --name <value>

(Required) Name of the project

--name my-agent-network

-o, --output-dir <value>

Output directory for the project

--output-dir ./projects

--api-version <value>

API version
Default: v1

--api-version v2

--asset-id <value>

Asset name (GAV). Valid characters are 'A-Z', 'a-z', '0-9', '_' and '-'.

--asset-id my-asset

--asset-version <value>

Asset version (GAV)
Default: 0.0.0

--asset-version 1.2.0

--bearer <value>

Bearer token
You can also set it with the ANYPOINT_BEARER variable

--bearer myBearerToken

--client_id <value>

Client ID
You can also set it with the ANYPOINT_CLIENT_ID variable

--client_id myClientID

--client_secret <value>

Client Secret
You can also set it with the ANYPOINT_CLIENT_SECRET variable

--client_secret myClientSecret

--[no-]collectMetrics

Collect metrics
You can also set it with the COLLECT_METRICS variable

--no-collectMetrics

--[no-]create-dir

Create a new directory under output-dir using the project name

--create-dir

--environment <value>

Environment name
You can also set it with the ANYPOINT_ENV variable

--environment Sandbox

--group-id <value>

Group ID (GAV)

--group-id com.myorg

--host <value>

Host URL
Default: anypoint.mulesoft.com
You can also set it with the ANYPOINT_HOST variable

--host mycompany.anypoint.mulesoft.com

--organization <value>

Organization name
You can also set it with the ANYPOINT_ORG env variable

--organization MyOrg

--password <value>

Password
You can also set it with the ANYPOINT_PASSWORD variable

--password myPassword

--tab-size <value>

Tab size for indenting the API specification
Default: 2

--tab-size 4

--username <value>

Username
You can also set it with the ANYPOINT_USERNAME variable

--username myuser@example.com

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, this command accepts these flags:

Flag Description Example

-e, --egress-gw <value>

Name of the target egress gateway (separate-gateways mode; requires --ingress-gw). When no gateway flags are provided, deploy defaults to single-gateway mode using agent-network-gw.

--egress-gw custom-egress

-g, --gateway <value>

Name of the gateway for single-gateway mode (recommended). Mutually exclusive with --ingress-gw and --egress-gw.

--gateway my-gateway

-i, --ingress-gw <value>

Name of the target ingress gateway. Combine with --egress-gw 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 agent-network-gw.

--ingress-gw custom-ingress

-t, --target-space <value>

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 agent-network-space.

--target-space my-space

--bearer <value>

Bearer token
You can also set it with the ANYPOINT_BEARER variable

--bearer myBearerToken

--client_id <value>

Client ID
You can also set it with the ANYPOINT_CLIENT_ID variable

--client_id myClientID

--client_secret <value>

Client Secret
You can also set it with the ANYPOINT_CLIENT_SECRET variable

--client_secret myClientSecret

--[no-]collectMetrics

Collect metrics
You can also set it with the COLLECT_METRICS variable

--no-collectMetrics

--disable-tracing

Disable tracing functionalities

--disable-tracing

--dont-wait-for-agent-network

Do not wait for the agent network to be ready

--dont-wait-for-agent-network

--environment <value>

Environment name
You can also set it with the ANYPOINT_ENV variable

--environment Sandbox

--host <value>

Host URL
Default: anypoint.mulesoft.com
You can also set it with the ANYPOINT_HOST variable

--host mycompany.anypoint.mulesoft.com

--max-retries <value>

Max retries to check the status of the deploying application
Default: 3

--max-retries 5

--organization <value>

Organization name
You can also set it with the ANYPOINT_ORG variable

--organization MyOrg

--password <value>

Password
You can also set it with the ANYPOINT_PASSWORD variable

--password myPassword

--path <value>

Path to the project
Default: .

--path ./my-agent-network

--process-timeout <value>

Process timeout in milliseconds
Default: 600000

--process-timeout 900000

--property <value>

Property to override in name:value format

--property apiKey:sk-xxx

--request-timeout <value>

Request timeout in milliseconds
Default: 60000

--request-timeout 120000

--username <value>

Username
You can also set it with the ANYPOINT_USERNAME variable

--username myuser@example.com

--json

Format output as JSON

--json

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, this command accepts these flags:

Flag Description Example

--bearer <value>

Bearer token
You can also set it with the ANYPOINT_BEARER variable

--bearer myBearerToken

--client_id <value>

Client ID
You can also set it with the ANYPOINT_CLIENT_ID variable

--client_id myClientID

--client_secret <value>

Client Secret
You can also set it with the ANYPOINT_CLIENT_SECRET variable

--client_secret myClientSecret

--[no-]collectMetrics

Collect metrics
You can also set it with the COLLECT_METRICS variable

--no-collectMetrics

--debug

Enable debug mode

--debug

--environment <value>

Environment name
You can also set it with the ANYPOINT_ENV variable

--environment Sandbox

--host <value>

Host URL
Default: anypoint.mulesoft.com
You can also set it with the ANYPOINT_HOST variable

--host mycompany.anypoint.mulesoft.com

--organization <value>

Organization name
You can also set it with ANYPOINT_ORG env variable

--organization MyOrg

--password <value>

Password
You can also set it with the ANYPOINT_PASSWORD variable

--password myPassword

--path <value>

Path to the project
Default: .

--path ./my-agent-network

--username <value>

Username
You can also set it with the ANYPOINT_USERNAME variable

--username myuser@example.com

--json

Format output as JSON

--json

Example

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

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, this command accepts these flags:

Flag Description Example

-e, --egress-gw <value>

Name of the egress gateway (separate-gateway mode; requires --ingress-gw)

--egress-gw my-egress

-g, --gateway <value>

Name of the gateway for single-gateway mode (recommended). Mutually exclusive with --ingress-gw and --egress-gw.

--gateway my-gateway

-i, --ingress-gw <value>

Name of the ingress gateway (separate-gateway mode)

--ingress-gw my-ingress

-t, --target-space <value>

Name of the target space (private space, RTF, or shared space) where you set up the agent network environment
Default: agent-network-space

--target-space my-space

--bearer <value>

Bearer token
You can also set it with the ANYPOINT_BEARER variable

--bearer myBearerToken

--client_id <value>

Client ID
You can also set it with the ANYPOINT_CLIENT_ID variable

--client_id myClientID

--client_secret <value>

Client Secret
You can also set it with the ANYPOINT_CLIENT_SECRET variable

--client_secret myClientSecret

--[no-]collectMetrics

Collect metrics
You can also set it with the COLLECT_METRICS variable

--no-collectMetrics

--dont-wait-for-gateways-running

Do not wait for the gateways to be running

--dont-wait-for-gateways-running

--environment <value>

Environment name
You can also set it with the ANYPOINT_ENV variable

--environment Sandbox

--host <value>

Host URL
Default: anypoint.mulesoft.com
You can also set it with the ANYPOINT_HOST variable

--host mycompany.anypoint.mulesoft.com

--organization <value>

Organization name
You can also set it with the ANYPOINT_ORG variable

--organization MyOrg

--password <value>

Password
You can also set it with the ANYPOINT_PASSWORD variable

--password myPassword

--username <value>

Username
You can also set it with the ANYPOINT_USERNAME variable

--username myuser@example.com

Example

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