---
schema_version: "1"
id: 5417e136241a302c3f89f794ae28e5a83ad89a59b54d27f173bdcfa6f4ec729e
title: Deploy and Test Agent Networks Locally (BETA)
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/agent-network/latest/af-local-deploy-and-test.md
canonical_url: https://docs.mulesoft.com/agent-network/latest/af-local-deploy-and-test
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 60b7b6ba57580310f2114dfc3f14c926ea48043b2fbacbf820f440bb50ccb4a8
description: MuleSoft Documentation Site
release: "2.0"
latest: true
---
---
product: Building Agent Networks
version: 2.0
is-latest-version: true
---

# Deploy and Test Agent Networks Locally (BETA)

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

Deploy your agent network locally and test each broker through an Agent-to-Agent (A2A) chat
interface directly from Anypoint Code Builder. Local deployments let you iterate quickly on your
agent network without publishing or deploying it.

When you deploy locally, Anypoint Code Builder deploys the entire project, including all brokers.
You can then chat with each broker, inspect request and response details, and debug issues before
deploying to a remote target.

## Before You Begin

1.  Install [Docker](https://docs.docker.com/desktop/) on the machine from which you want to run
    local deployments and tests.

2.  To load the local deploy and test feature, ensure you are signed into to Anypoint Code Builder,
    and then restart VSCode.

## Deploy Your Agent Network Locally

Trigger a local deployment from the activity bar, the context menu, or the Command Palette.

> [!NOTE] If your workspace contains multiple agent network projects, the context menu action
> deploys the last active project instead of the one you right-clicked. To deploy a specific
> project, use the **Run** button in the graph or run the command from the Command Palette.

1.  In Anypoint Code Builder, choose one of the following:

    - In the activity bar, click the **Deploy and test locally** icon.

    - In Explorer, right-click your agent network project and select **Deploy and Test Locally**.

    - From the Command Palette, run the command: **MuleSoft: Deploy and Test Locally**.

2.  Review the local deploy and test terms and conditions, and click **Accept**.

3.  On the first run, the terminal prompts you to enter values for the variables defined in your
    `exchange.json` file.

    > [!NOTE] Variables and secrets are stored in plain text on your local machine.

4.  Enter your variable values in the terminal and confirm to start the deployment, or select
    **Cancel** to close without deploying.

    On subsequent runs, your saved variable values are reused automatically and you are not prompted
    again.

### Deployment Results

- **Success**: The Local Deployment and Testing panel opens side-by-side, and a success notification
  appears.

- **Failure**: An error notification appears with a **Try again** button. Check the error details
  and retry. For more information, see
  [Troubleshoot Agent Networks](https://docs.mulesoft.com/agent-network/latest/af-troubleshoot-agent-networks).

## Test Your Brokers

After a successful local deployment, use the testing panel to chat with your brokers using the A2A
protocol.

1.  Use the inline dropdown in the panel header to select a broker. If your project contains
    multiple brokers, you can switch between them without stopping the deployment. Each broker’s
    chat history is preserved while the runtime is running.

2.  View the agent card, which includes:

    - Name and version

    - Protocol and capability tags

    - Description and skills

    - Localhost endpoint URL (with a copy action)

      The agent card collapses to a header strip after you send the first message.

3.  Type a message in the composer to send a request to the selected broker. The broker processes
    the request and returns a response in the chat view.

Each chat session uses a single context ID. To start a fresh session, click **New Chat** in the
panel header.

### Inspect Response Details

Expand any response by clicking **Details** to view:

- State

- Time Used

- Timestamp

- Message ID

- Context ID

- Task ID

- Request (raw JSON, collapsible)

- Response (raw JSON, collapsible)

For multi-part responses, each part appears individually in raw JSON.

## Panel Actions

The testing panel header provides these actions:

<table><colgroup><col> <col></colgroup><thead><tr><th>Action</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>New Chat</strong></p></td><td><div><div><p>Starts a fresh chat session with a new context ID. Clears the current conversation.</p></div></div></td></tr><tr><td><p><strong>Redeploy</strong></p></td><td><div><div><p>Restarts the local deployment and clears all chat history.</p></div></div></td></tr><tr><td><p><strong>Stop</strong></p></td><td><div><div><p>Stops the local runtime. Chat history remains visible, but you can’t send messages until the next run.</p></div></div></td></tr><tr><td><p><strong>…​</strong> (overflow menu)</p></td><td><div><div><p>Contains <strong>Export logs</strong> and <strong>Stop</strong>.</p></div></div></td></tr></tbody></table>

## View Runtime Logs

Runtime logs stream to the standard VS Code Output panel and Debug Console, attached to the run
configuration. Use these logs to debug issues with your brokers, agents, and MCP servers during
local testing.

## See Also

- [Publishing Agent Networks](https://docs.mulesoft.com/agent-network/latest/af-publish-agent-network-assets)

- [Deploying Agent Network Instances](https://docs.mulesoft.com/agent-network/latest/af-deploy-agent-network-targets)

[Publishing Agent Networks](https://docs.mulesoft.com/agent-network/latest/af-publish-agent-network-assets)
[Deploying Agent Network Instances](https://docs.mulesoft.com/agent-network/latest/af-deploy-agent-network-targets)
