Skip to main content
View Python Example on Github This example demonstrates a complete Xpander coding agent implementation with AgentOps instrumentation using callback handlers. The example shows how to build a single-file agent that combines the MyAgent class and XpanderEventListener for comprehensive monitoring.

Key Features

  • Single-file implementation combining agent logic and event handling
  • Callback-based instrumentation using XpanderEventListener
  • Async tool execution with proper error handling and logging
  • AgentOps integration with custom trace names and tags

Running the Example

  1. Set up your environment variables in a .env file or export them:
  2. Run the agent:
The agent will start an interactive session where you can ask coding questions and see the results tracked in your AgentOps dashboard.