Module 4: Build Your Manager Agent
Create a manager agent that orchestrates your developer agent fleet using the xpander.ai platform
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:
- Go to https://app.xpander.ai and sign in with your credentials
- In the left navigation menu, go to Agents
- 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:
- Click the + button on the right, and go to Apps -> “GitHub Pull Requests”.
- In the popup window, Authenticate to the app and give it a name.
- 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:
- 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.
- In the popup window, Click on the “Generate Details” button.
- 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:
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.
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.
- Click on the plus icon and select “Sources” -> “MCP”
- Once added to the canvas, click “Deploy” to save the changes
- 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
)
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:
- Create a manager agent using the xpander.ai Workbench
- Configure the manager to coordinate your developer agents
- Add GitHub Pull Request capabilities to your manager
- Connect your manager agent to Cursor IDE using MCP
- 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.