Module Summary

  • Goal: Create a manager agent to orchestrate your developer agents
  • Estimated Time: 10-20 minutes
  • Prerequisites: Two developer agents from Module 3, GitHub account

🚀 In this module, you’ll use the visual Agent Workbench to design your manager agent, configure it to coordinate your existing agents, test it in the platform, and connect it to your development workflow!

đź”§ Access the xpander.ai Workbench

First, let’s access the xpander.ai platform to create your manager agent:

  1. Go to https://app.xpander.ai and sign in with your credentials
  2. In the left navigation menu, go to Agents
  3. Click the New AI Agent button to open the Workbench and click “Skip” when prompted by the agent builder. This time we’ll create the agent manually.

Creating a new agent in the Workbench

Click on the plus icon on the right, go to Agents, and select the AI Agents you created in the previous modules.

Adding your developer agents to the manager

In just a few minutes, we’ve exposed two agents to the manager agent, allowing it to delegate tasks using the Agent-to-Agent (A2A) protocol. Behind the scenes, the xpander.ai platform creates function calling capabilities with each agent and exposes them at runtime (agent.get_tools() will now return agents as well as tools). This allows you to dynamically add tools or agents and let the xpander platform handle protocols and task delegations.

Now let’s add tools to the manager AI Agent:

  1. Click the + button on the right, and go to Apps -> “GitHub Pull Requests”.
  2. In the popup window, Authenticate to the app and give it a name.
  3. Select two operations and add them to the AI Agent:
    • Create New Pull Request in Repository
    • List Pull Requests in Repository

Your agent should now look like this:

Manager agent with GitHub operations

⚙️ Configure the Manager Agent

Now let’s configure the manager agent:

  1. On the Manager AI Agent (the agent at the top of the canvas), click on the Settings (cog) button on the top right of the AI Agent.
  2. In the popup window, Click on the “Generate Details” button.
  3. Enter the following prompt and click Generate.

An AI agent that manages two AI developers. For each task assigned by the user, both developers independently work on their respective branches. The manager agent reviews both implementations and selects the branch to proceed with a pull request (PR). This setup ensures parallel development and allows the manager to choose the optimal solution.

Configuring manager agent settings

Customize the prompts further

The name and instructions for the manager AI Agent were automatically generated. Let’s go to the Instructions tab in the settings menu and make sure we’re happy with the instructions. You can copy/paste the following:

Role
You are the **AI Development Manager**.
Choose to direct **one or two** developer agents. You own branch hygiene, CI quality, **and the only pull‑request creation**. Finish every job in **≤ 5 minutes**.
Goal
Ship working, test‑passing code on the **specified feature branch** in the **exact repository**, **commit & push**, and **open one clean PR yourself**. You **cannot finish** until that PR exists.
Instructions
| **1 — Inputs**                      | If the prompt already provides the repo URL **and** branch, dive in. Ask only when one is missing. ALWAYS PASS THE REPO TO SUB AGENT!                                                                                                                                                                                                               |
| **2 — Clone & Branch**              | `git clone <repo-url>` → `git checkout -b <branch>` (create if absent). Never invent names or push to *main*.                                                                                                                                                                                                      |
| **3 — Developer Agents**            | • Use **one** agent *or* **two sequential agents**.<br>• If two, split into non‑overlapping tasks and prefix each with:<br>`\nRepo: <repo-url>\nBranch: <branch-name>\nWork only on this repo and branch. Do not open pull requests.\n`<br>• **Developer agents must only commit & push**—they **never** open PRs. |
| **4 — Develop & Test**              | Follow repo conventions; add/adjust tests so CI passes. No secrets, no dead code.                                                                                                                                                                                                                                  |
| **5 — Commit & Push**               | After coding, push all changes to the feature branch with clear commit messages.                                                                                                                                                                                                                                   |
| **6 — Pull Request (Manager Only)** | **You, the manager, must create or update one PR** with summary, implementation notes, and a "tests‑green" checklist.                                                                                                                                                                                              |
| **7 — Finish Signal**               | Call `xpfinish-agent-execution-finished` with a one‑line status and the PR link.                                                                                                                                                                                                                                   |
| **8 — Time & Quality SLA**          | Entire workflow **≤ 5 minutes**; CI must be green before finishing.                                                                                                                                                                                                                                                |
| **9 — Incentives**                  | **+ \$100** for flawless delivery; **– \$50** for each rule breach (missing PR, wrong branch, failing tests, etc.).                                                                                                                                                                                                |
| **10 — Forbidden**                  | Parallel agent execution, developer agents opening PRs, pushing to default branches.                                                                                                                                                                                                                               |
Finish fast, keep CI green, and **never leave without your PR**.

Once you’ve finished configuring your agent, click Save to close the settings menu, and then Deploy.

Your AI Manager is now ready to use:

Deployed manager agent ready for use

đź§Ş Testing Your Manager Agent

Use the Tester tab to interact with your manager agent. Test its ability to create pull requests and coordinate your developer agents.

Prompt-1
Build a simple Todo list app (JS/HTML/CSS, no React);
Clone https://github.com/xpander-ai/apps-by-agents, follow all repo rules, submit to may-2025/{random-positive-2-words}/todo-app, push code, and open a PR.

Example of Vibe-Agent with a Manager

Example of vibe-coding-prompt to the developer agent from the AI Manager

🔌 Connecting to MCP

Now that our AI team is set up, we can add Model Context Protocol (MCP) support and connect our IDE to the manager.

  1. Click on the plus icon and select “Sources” -> “MCP”
  2. Once added to the canvas, click “Deploy” to save the changes
  3. Click on the MCP icon to get a unique server address with your agents ready to receive tasks

Adding MCP to your manager agent

This URL contains API keys for your agents. Don’t share this URL with anyone.

You can add MCP to anything - tools, agents, multiple agents. Think of MCP as a REST API for the agent ecosystem. AI agents use it to load tools, but you can use it to interact with agents or tools directly as well!

Now, load this URL into Cursor by going to Cursor settings -> MCP or (vi ~/.cursor/mcp.json)

{
  "mcpServers":{
	"ai_development_manager": {
	  "command": "npx",
	  "args": [
		"xpander-mcp-remote",
		"https://mcp.xpander.ai/<your-mcp>/"
	  ]
	}
  }
}

You should be able to see the MCP auto-added to all your cursor chat

MCP enabled in Cursor IDE

Trigger your manager agent with Can you ask the AI Manager if it's working today?

🤖 Agent2Agent

Your Manager AI Agent is available to be discovered by other AI Agents via A2A protocol. Click the A2A source node at the top of the canvas to see the skills that it exposes.

a2a card

The manager AI Agent exposes its own available operations (from the GitHub pull request connector) as skills, but also its ability to trigger the dev-agents.

You can also check the agent card in your agent’s A2A URL by adding /.well-known/agent.json in the end of the URL.

âś… Checkpoint

By completing this module, you should now be able to:

  1. Create a manager agent using the xpander.ai Workbench
  2. Configure the manager to coordinate your developer agents
  3. Add GitHub Pull Request capabilities to your manager
  4. Connect your manager agent to Cursor IDE using MCP
  5. Test the manager’s ability to delegate tasks to your developer agents

🔄 Next Steps

Now that you’ve built your manager agent with MCP support, you’re ready to move on to the final step of this workshop - submitting your application. In the next module, you’ll finalize your project and prepare it for submission.