Skip to main content
Related concepts: Agent, Agent Version Agents constantly need updates to their prompts, tools and configuration to meet evolving user expectations. This cookbook walks you through how to add version tracking to your agents.

What you’ll build

  • Detect breaking changes or improvements in agent performance
  • Measure the impact of engineering effort on agent optimization (resolution rate + cost per resolution)
Jump to results

Pre-requisites

  • An existing agent implementation (Python 3.10+ or Node.js 20+)
  • Voker API key (get one here)
  • OpenAI API key (get one here)

Implementation

Step 1: Project setup

Install the Voker SDK for Python and add your API key.
Add your Voker API key to your .env file.
To obtain your Voker API key, sign up for a free Voker account here. You will be taken to the setup page where you can copy the value.
Screenshot of the Voker API key setup page

Navigate to the Voker dashboard to find your API key

Step 2: Set Voker parameters in LLM calls

In your project, swap the import for your LLM provider and add these parameters to your LLM calls:
  • voker_session, groups calls into the same session
  • voker_agent, identifies the agent making the call
  • voker_agent_version, sets an initial agent version

Step 3: Make an LLM call and view in dashboard

Make an LLM call with the new parameters. Then go back to Voker, reload the page, and navigate to the Agent tab.You should see your agent listed with the specified version.
Screenshot of the Agent tab on the Voker platform

Navigate to 'Agents' in the sidebar

Click on the agent to view the details page. You will see the session and version information for the call you just made, along with any associated metrics.
Screenshot of the Agent details page on the Voker platform

Navigate to 'Agents' in the sidebar and click into the agent to view sessions in the 'Sessions' tab

Step 4: Modify your agent configuration and increment version

In your codebase, update your agent prompt, tools or configuration. Increment the voker_agent_version field and update the voker_session field for your next call.

Step 5: Make a new LLM call and compare performance

Make another LLM call with the updated configuration. Then go back to the agent details page in the Voker dashboard. You should see the new session with the updated version.
Screenshot of the Agent details page on the Voker platform

Navigate to 'Agents' in the sidebar and click into the agent to view sessions in the 'Sessions' tab

Now as you make changes to your agent, Voker will keep track of how those changes impact your agent performance and user experience. Use these insights to continuously optimize your agent over time.

What you’ll get

  • Overview of all Intent Categories for your agent, along with their resolution and correction rates. Filter by Agent Version to compare performance across changes and identify which ones led to improvements or potential regressions.
Screenshot of the Agent details page on the Voker platform - Intent Categories tab

Navigate to the 'Intent Categories' tab in the agent details page to view performance metrics by intent category


Screenshot of the Agent details page on the Voker platform - Intent Categories tab

Use the dropdown selector to filter by agent version and compare performance across versions

  • Version history of your agent
Screenshot of the Agent details page on the Voker platform - Versions tab

Navigate to the 'Versions' tab in the agent details page to view a history of all versions of your agent.