Get started with evaluating AI agents accessible via HTTP endpoints using the Maxim SDK. This guide will walk you through setting up the SDK and running your first agent evaluation test run.

Installation

First, install the Maxim SDK for your preferred language:

pip install maxim-py

Getting Your API Key

Before you can use the Maxim SDK, you need to obtain an API key from the Maxim platform:

  1. Log in to Maxim: Go to app.getmaxim.ai/login and sign in to your account
  2. Navigate to Settings: Click on “Settings” in the left sidebar
  3. Go to API Keys: Click on “API keys” under “Organization settings”
  4. Generate New Key: Click the “Generate new” button
  5. Name Your Key: Enter a descriptive name for your API key (e.g., “Development”, “CI/CD”, “Local Testing”)
  6. Copy the Key: Once generated, copy the API key immediately - you won’t be able to see it again
Store your API key securely! You won’t be able to view the complete key value again after closing the generation dialog.

Configuration

Initialize the Maxim SDK with your API key and workspace information:

from maxim import Maxim

# Initialize Maxim SDK

maxim = Maxim({"api_key": "your-api-key"})

Basic HTTP Agent Test Run

Here’s how to create and run a basic agent evaluation test run using a workflow stored on the Maxim platform:

# Create a test run using a workflow

result = (
    maxim.create_test_run(
        name="Basic Agent HTTP Evaluation", in_workspace_id="your-workspace-id"
    )
    .with_data_structure({"input": "INPUT", "expected_output": "EXPECTED_OUTPUT"})
    .with_data("your-dataset-id")
    .with_evaluators("Bias")
    .with_workflow_id("your-workflow-id")  # Your agent workflow ID on Maxim platform
    .run()
)

print(f"Test run completed! View results: {result.test_run_result.link}")

Next Steps

Now that you’ve run your first agent evaluation, explore these guides: