Skip to main content

Installation & Setup

AgentTest makes it easy to run A/B tests on your AI agents or prompt variations. This guide shows you how to quickly get started using either our JavaScript SDK or the REST API. Use the AgentTest SDK to seamlessly integrate A/B testing in your Node.js or browser-based agents.

1. Install the SDK

2. Initialize the client

3. Assign a variant

4. Log the result

🌐 Option 2: REST API

Prefer using raw HTTP requests? Use our simple, stateless REST API.

1. Assign a variant

Headers:
Request Body:
Response:

2. Log a result

Headers:
Request Body:

✅ That’s It!

You’re now ready to start testing your agents with AgentTest. For more advanced use cases, explore:
  • Creating and managing experiments
  • Tracking custom metrics
  • Using with LangGraph, LangChain, or other frameworks
Need help? Reach out via GitHub or open an issue.