Module 3: Expand Your Agent Fleet
Create multiple coding agents with different LLM models and unique behaviors
Module Summary
- Goal: Create specialized developer agents with different LLM models and personalities
- Estimated Time: 10-20 minutes
- Prerequisites: Completion of Module 2, access to AWS Bedrock
π In this module, youβll duplicate your existing agent setup, customize it with new instructions, configure it to use Claude 3.7, and deploy it to the cloud. By the end, youβll have two independent agents with different capabilities that you can compare and contrast!
π Duplicate Your Agent Setup
First, letβs create a copy of your first agent to build upon:
Open the Cursor terminal and create a fresh virtual environment:
Never copy the .venv
directory between projects. Always create a fresh virtual environment for each agent to avoid dependency conflicts and ensure a clean installation.
Got it! Hereβs a concise and clear version tailored for workshop instructions:
π Ensure .env
Exists
Verify that a .env
file exists in the root directory.
If itβs missing, copy it from dev-agent-1
.
No need to run xpander sync-secrets
β secrets are shared across the organizationβs AI agents.
βοΈ Create Different Agent Instructions
Edit the agent_instructions.json
file to give your new agent a different personality and focus (you can also ask Cursor to help with this):
π§ Create the agent
Now, letβs create a new agent using the xpander CLI:
Youβll see the agent creation wizard:
π Change LLM Provider
In coding_agent.py
, update line 33 to switch from OpenAI to Claude 3.7 (via Amazon Bedrock):
This agent will now use Claude 3.7 Sonnet instead of OpenAI.
π§ͺ Test Your Second Agent Locally
Just like with your first agent, you can test this one locally:
The Claude model has different strengths compared to OpenAI GPT. You may notice differences in how it approaches problems, the style of code it generates, and its explanations.
Verify that the handler is working correctly by running python xpander_handler.py
and sending a message from the UI.
Once youβve confirmed that the agent is accepting events, youβre ready to deploy it to the cloud.
π Deploy to the Cloud
Deploy your second agent to the cloud:
Now that you have two agents ready for your commands, the next step is to build a manager for them!
Letβs move forward to the next module where weβll create a manager agent to coordinate your agent fleet.