How to get started with the Maxim SDK?
Get started with evaluating prompts using the Maxim SDK. This guide will walk you through setting up the SDK and running your first prompt evaluation test run.Installation
First, install the Maxim SDK for your preferred language:Getting Your API Key
Before you can use the Maxim SDK, you need to obtain an API key from the Maxim platform:- Log in to Maxim: Go to app.getmaxim.ai/login and sign in to your account
- Navigate to Settings: Click on âSettingsâ in the left sidebar
- Go to API Keys: Click on âAPI keysâ under âOrganization settingsâ
- Generate New Key: Click the âGenerate newâ button
- Name Your Key: Enter a descriptive name for your API key (e.g., âDevelopmentâ, âCI/CDâ, âLocal Testingâ)
- Copy the Key: Once generated, copy the API key immediately - you wonât be able to see it again
Configuration
Initialize the Maxim SDK with your API key:Basic Prompt Test Run
Hereâs how to create and run a basic prompt evaluation test run using a dataset from the platform:-
createTestRunis the main function that creates a test run. It takes the name of the test run and the workspace id. -
withDataStructureis used to define the data structure of the dataset. It takes an object with the keys as the column names and the values as the column types. -
withDatais used to specify the dataset to use for the test run. Can be a datasetId(string), a CSV file, an array of column to value mappings. -
withEvaluatorsis used to specify the evaluators to use/attach for the test run. You may create an evaluator locally through code or use an evaluator that is installed in your workspace through the name directly -
withPromptVersionIdis used to specify the prompt version to use for the test run. It takes the id of the prompt version. -
runis used to execute the test run.
Next Steps
Now that youâve run your first prompt evaluation, explore these guides:- Local Prompt Testing - Learn how to test prompts with custom logic
- Maxim Prompt Testing - Use prompts stored on the Maxim platform
- Simulation - Run AI-simulated multi-turn conversations
- Prompt Management - Retrieve and use prompts in production workflows
- CI/CD Integration - Automate prompt testing in your CI/CD pipeline
Schedule a demo to see how Maxim AI helps teams ship reliable agents.