Skip to main content
You can add models to your AgentMark project in two ways: pull pre-configured models from supported providers using the CLI, or define custom model schemas with full control over settings and pricing.

Pulling Built-in Models

Use the pull-models command to interactively add models to your agentmark.json:
agentmark pull-models
This will:
  1. Show you the available providers
  2. Let you select which models to add
  3. Update builtInModels in your agentmark.json

Supported Providers

Language models: gpt-4o, gpt-4o-mini, gpt-4, gpt-5, gpt-4-turbo, gpt-3.5-turboImage models: dall-e-3, dall-e-2Speech models: tts-1, tts-1-hd
You still need to register pulled models in your agentmark.client.ts with your adapter’s model registry for them to work at runtime.

Custom Model Schemas

For models not covered by the built-in providers, or when you need custom settings and pricing, define model schemas in your agentmark.json under modelSchemas.

Basic Structure

Each model schema includes:
  • label: Display name shown in the platform UI
  • cost: Pricing configuration for cost tracking
  • settings: Configurable parameters with UI controls
{
  "modelSchemas": {
    "my-custom-model": {
      "label": "My Custom Model",
      "cost": {
        "inputCost": 0.01,
        "outputCost": 0.03,
        "unitScale": 1000000
      },
      "settings": {}
    }
  }
}

Cost Configuration

The cost object defines pricing for cost tracking in the platform:
PropertyDescription
inputCostCost per unit for input tokens
outputCostCost per unit for output tokens
unitScaleNumber of tokens per unit (e.g., 1000000 = cost per million tokens)
"cost": {
  "inputCost": 0.01,
  "outputCost": 0.03,
  "unitScale": 1000000
}
This means 0.01permillioninputtokensand0.01 per million input tokens and 0.03 per million output tokens.

Settings Configuration

Settings define configurable parameters that appear in the platform’s prompt editor. Each setting has:
PropertyDescription
labelDisplay name in the UI
orderDisplay order (lower = higher)
defaultDefault value
The available setting types are:
For numeric values with a range, displayed as a slider:
"temperature": {
  "label": "Temperature",
  "order": 1,
  "default": 0.7,
  "minimum": 0,
  "maximum": 2,
  "multipleOf": 0.1,
  "type": "slider",
  "ui": "slider"
}

Complete Example

Here’s a full example with a text model and an image model:
agentmark.json
{
  "modelSchemas": {
    "gpt-4-custom": {
      "label": "GPT-4 Custom",
      "cost": {
        "inputCost": 0.03,
        "outputCost": 0.06,
        "unitScale": 1000000
      },
      "settings": {
        "temperature": {
          "label": "Temperature",
          "order": 1,
          "default": 0.7,
          "minimum": 0,
          "maximum": 2,
          "multipleOf": 0.1,
          "type": "slider",
          "ui": "slider"
        },
        "max_tokens": {
          "label": "Max Tokens",
          "order": 2,
          "default": 2048,
          "minimum": 1,
          "maximum": 8192,
          "multipleOf": 1,
          "type": "number"
        },
        "response_format": {
          "label": "Response Format",
          "order": 3,
          "default": "text",
          "type": "string",
          "ui": "select",
          "options": [
            { "label": "Text", "value": "text" },
            { "label": "JSON", "value": "json" },
            { "label": "JSON Schema", "value": "json_schema" }
          ]
        }
      }
    },
    "dall-e-3": {
      "label": "DALL-E 3",
      "cost": {
        "inputCost": 0.04,
        "outputCost": 0,
        "unitScale": 1
      },
      "settings": {
        "image_size": {
          "label": "Image Size",
          "order": 1,
          "default": "1024x1024",
          "type": "string",
          "ui": "imageSize"
        },
        "quality": {
          "label": "Quality",
          "order": 2,
          "default": "standard",
          "type": "string",
          "ui": "select",
          "options": [
            { "label": "Standard", "value": "standard" },
            { "label": "HD", "value": "hd" }
          ]
        }
      }
    }
  }
}

Best Practices

  1. Use descriptive labels — Make it clear what each setting does in the platform UI
  2. Set appropriate ranges — Define minimum and maximum values that make sense for your model
  3. Order settings logically — Use the order property to arrange settings in a user-friendly way
  4. Provide sensible defaults — Choose default values that work well for most use cases
  5. Document costs accurately — Ensure the cost configuration matches your provider’s pricing

Have Questions?

We’re here to help! Choose the best way to reach us: