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
-
Install Docker on the machine from which you want to run local deployments and tests.
-
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.
|
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. |
-
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.
-
-
Review the local deploy and test terms and conditions, and click Accept.
-
On the first run, the terminal prompts you to enter values for the variables defined in your
exchange.jsonfile.Variables and secrets are stored in plain text on your local machine.
-
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.
Test Your Brokers
After a successful local deployment, use the testing panel to chat with your brokers using the A2A protocol.
-
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.
-
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.
-
-
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.
Panel Actions
The testing panel header provides these actions:
| Action | Description |
|---|---|
New Chat |
Starts a fresh chat session with a new context ID. Clears the current conversation. |
Redeploy |
Restarts the local deployment and clears all chat history. |
Stop |
Stops the local runtime. Chat history remains visible, but you can’t send messages until the next run. |
… (overflow menu) |
Contains Export logs and Stop. |