Goal: Create and test your SWE agent with Claude Code integrationExpected Output: Working agent that can coordinate with Claude Code for development tasks
Test Your Agent
Test your agent with these prompts:Write hello world in different languages
Ask Claude to write hello world in different languages
Notice that the first prompt the agent didn’t call the Claude Tool, and in the second call it called the Claude tool Setup Local Environment
Create a new project folder and set up your Python environment:mkdir swe-agent-workshop
cd swe-agent-workshop
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
Install required dependencies:install-dependencies.bash
pip install "xpander-sdk[agno]" openai requests pypdf pgvector -q
npm install -g xpander-cli
Create your main Python file: Agent Authentication
Login to xpander and get your agent credentials:xpander login
# Get your agent details - copy the Agent ID and API Key from output
xpander agent get "SWE Agent"
Add your credentials to the .env
file:XPANDER_AGENT_ID=your-agent-id-here
XPANDER_API_KEY=your-api-key-here
OPENAI_API_KEY=your-openai-api-key # (If running in an in-person workshop, ask the workshop team)
Replace the placeholder values with your actual credentials from the previous command output.
Test via CLI
# Run the agent via CLI
xpander agent invoke "SWE Agent" "Can you write bubble sort algorithm in Python?"
What Just Happened?
You’ve just witnessed something pretty amazing. Your SWE agent isn’t actually writing code itself – it’s acting like a smart project manager that knows exactly when to bring in the right specialist for the job.
Think of it this way: when you asked for “hello world in different languages,” your agent understood the request, then tapped Claude Code (which has direct access to GitHub and can create pull requests) to handle the actual coding work. Your agent then coordinated the response back to you.
This is multi-agent collaboration in action. Instead of one agent trying to do everything, you have specialized agents working together. Your SWE agent handles strategy and coordination, while Claude Code handles the technical implementation. This means you can scale development work far beyond what any single agent could handle – and it’s all happening seamlessly behind the scenes.
Next Steps
Your agent is now ready for local configuration where we’ll add persistent memory, custom tools, knowledge bases, and SDK integration.