In this module, we’ll explore the SWE (Software Engineering) Agent template on the xpander.ai platform, connect it to GitHub, download the code locally, and test it.

Goal: Learn how to develop an autonomous coding agent and configure it to work with coding tools such as OpenAI Codex and how it can use different tools

Step 1: Template Import

To avoid manual configuration work around adding tools, setting instructions, etc., a SWE agent template is ready to be deployed on the platform. After clicking the Template import button, you will register or log in to xpander.ai and be redirected to the template deployment screen.

Import Codex SWE Agent to your xpander.ai Account

Follow the import steps as seen in the video:

  1. In the agent import wizard, select “New GitHub Pull Requests interface”
  2. The exclamation mark (⚠️) on the GitHub tools indicates that the Connector for Github has not been authorized yet. Click on one of them to see the connector settings.
  3. In the popup window, connect to GitHub with OAuth2.

You are now seeing the AI Workbench - a user interface used to design, deploy, test and observe agents.

Give the Agent permissions to use GitHub

Click on “Authorization required” in the tools view of the agent and complete the OAuth flow.

Change the view to Agent Graph to see the visual representation of your agent or multi-agent team, including its different triggering capabilities and its available tools.

Check out the available tools your agent has. It can interact with GitHub - listing, creating, updating, and commenting on pull requests. More importantly, it can code using the built-in Coding agent, built on an enhanced version of Codex CLI.

If the GitHub tools on the graph are displaying a red exclamation mark, it’s because you still need to authorize the GitHub connector. Click on the exclamation mark and go through the Auth process with OAuth2

Step 2: Test your agent using the visual AI Workbench

Let’s walk through a real GitHub workflow using your agent


Test 1: The agent’s capabilities

In the left tab of the AI Workbench (Tester tab), submit this prompt:

What can you do ?


Test 2: List Pull Requests

In the left tab of the AI Workbench (Tester tab), submit this prompt:

List all pull requests (open or closed) in "xpander-ai/apps-by-agents"

Change the view to Full View and expand the API calls to see the generated parameters from the AI model to the different APIs and the payload returned to the AI model.


Test 3: Summarize the Latest PR

In xpander-ai/apps-by-agents, explain the most recent pull request and what the code changes do.

Click on “Channels” and go to “Chat” and open Markdown rich Web Interface built-in for your agent

Step 3: Load the agent locally (Optional)

Click on the CLI icon at the top left, and run the code snippet that is shown

npm i -g xpander-cli
xpander login
xpander initialize <<your-agent-id>>

xpander-cli requires Node.js v22 or higher and CLI version 0.0.31 or above. If you install the CLI but it shows an old version, your system is likely using a cached or outdated install

Example output

❯ xpander login --new
🚀 Welcome to Xpander!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  Hi David! You've successfully logged in.

  Profile: default
  Organization ID: ********
  API Key: ********

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

💡 Quick Start Tips:
  • Initialize your first agent: xpander agent init
  • Visit the platform: https://app.xpander.ai
  • Switch profiles: xpander profile --switch <name>

✓ Profile saved to ~/.xpander

❯ xpander initialize *****
✨ Initializing agent
────────────────────────────────────────────────────────────
✔ Agents loaded successfully
? Select an agent to initialize: Coding Agent (*****)
ℹ Agent Coding Agent retrieved successfully
✔ Agent initialized successfully

❯ ls
agent_instructions.json Dockerfile              myAgent.py              requirements.txt        xpander_config.json     xpander_handler.py

You can now pull a list of the agents with

xpander agent list

Example output

❯ xpander agent list
🤖 Your Agents
──────────────────────────────────────────────────
┌────────────────────────┬───────────┬────────────────────────────────────────────────────────────────────┐
│ Name                   │ Created   │ Link                                                               │
├────────────────────────┼───────────┼────────────────────────────────────────────────────────────────────┤
│ Coding Agent           │ 6/30/2025https://app.xpander.ai/agents/c1620615-9686-4177-96dc-1de7cc281b3f
├────────────────────────┼───────────┼────────────────────────────────────────────────────────────────────┤
│ AI RSS and Google News │ 6/30/2025https://app.xpander.ai/agents/7887dffd-d30a-4185-b5d6-3d85681df845
└────────────────────────┴───────────┴────────────────────────────────────────────────────────────────────┘
──────────────────────────────────────────────────
Total agents: 2

Step 4: Run the agent locally (Optional)

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Then run python xpander_handler.py to register your machine to receive events to the agent, open the chat URL and send some message then monitor terminal.

You should see something similar to the following log.

❯ python xpander_handler.py
14:14:02 | Listener started; waiting for events...
14:14:03 | Worker registered – id=ff22f89c-d8f9-49b8-8c08-ebd589952ad8
14:14:03 | Agent 'Coding Agent' chat: https://amaranth-whale.agents.xpander.ai | builder: https://app.xpander.ai/agents/c1620615-9686-4177-96dc-1de7cc281b3f
14:15:21 | 🚀 Initializing MyAgent...
14:15:22 | 📋 Agent: Coding Agent
14:15:22 | 🔧 Tools: 8 available
14:15:22 | 💡 Example prompts: 5
14:15:22 |    e.g. "List open PRs in xpander-ai/xpander-sdk."
14:15:22 | ✅ Ready!
14:15:22 | 
📨 Incoming message: hi
👤 From user: ******
📧 Email: ****
14:15:22 | 📝 Task: hi
14:15:26 |   📊 Step tokens: 4253
14:15:31 |   ✅ xpfinish-agent-execution-finished
14:15:31 | ✅ Done! Duration: 8.8s | Total tokens: 4253
14:15:31 | Agent result: Hi David! How can I help you today? If you have any questions or need assistance, just let me know!

Keep the xpander_handler.py running for the remainder of the workshop.

We now have the backend ready. The UI can help us control the agent tools, the model, the events that are coming, the authentication, and all the infrastructure needed for the agent.

What’s Next?

Your Coding Agent is now live and connected - it can generate code with Codex and interact with GitHub.

→ Proceed to Module 2: Frontend Build & Testing to connect a minimal OpenAI Codex-style UI to interact with your agent, track its tasks, etc.