max developers SDK 0.4.0
API reference

Create Agent

POST /v1/agents

This operation can change data. Use resources you control.

Request fields

FieldLocationTypeRequired
algorithm_idbodystring | nullOptional
allowed_toolsbodyList of stringOptional
api_key_idbodystring | nullOptional
api_key_namebodystring | nullOptional
categorybodystring | nullOptional
descriptionbodystring | nullOptional
judge_configbodyobject | nullOptional
judge_enabledbodybooleanOptional
judge_prompt_namebodystring | nullOptional
judge_strategybodystring | nullOptional
max_tool_roundsbodyinteger | nullOptional
model_namebodystring | nullOptional
namebodystringRequired
outfitbodyclassic | studio-jacket | field-vest | nullOptional
prompt_refbodystring | nullOptional
prompt_refsbodyList of string | nullOptional
prompt_sourcebodystringOptional
repository_namesbodyList of stringOptional
system_promptbodystring | nullOptional
temperaturebodynumber | nullOptional

Examples

Use the environment settings from Quickstart. Replace sample resource IDs with your own. The examples show the required request shape.

import { MaxClient } from "@elmax/api";

const max = new MaxClient({
  baseURL: process.env.MAX_API_URL,
  apiKey: process.env.MAX_API_KEY,
});

const result = await max.api.postV1Agents({
  "body": {
    "name": "Support helper",
    "description": "Answers common account questions.",
    "system_prompt": "Answer help questions clearly. Ask for clarification when necessary."
  }
});
console.log(result);
import os
from elmax_ai import MaxClient

with MaxClient(base_url=os.environ["MAX_API_URL"], api_key=os.environ["MAX_API_KEY"]) as max:
    result = max.api.post_v1_agents(**{'body': {'name': 'Support helper',
          'description': 'Answers common account questions.',
          'system_prompt': 'Answer help questions clearly. Ask for clarification '
                           'when necessary.'}})
    print(result)
Response fields

Errors and recovery