Skip to main content
You configure AgentMark projects through two files: agentmark.json for project-level settings, and agentmark.client.ts (or agentmark_client.py) for the prompt loader and your eval registry.

agentmark.json

The agentmark.json file lives at your project root and configures your AgentMark application. It’s read by both the CLI and AgentMark Cloud.

Basic example

A freshly-scaffolded agentmark.json (from npm create agentmark@latest) contains the four base fields plus one seeded model, so the Dashboard prompt editor’s model dropdown isn’t empty on first run:
agentmark.json
Add the other optional properties documented below (scores, mcpServers, and others) as your project needs them.

Configuration properties

$schema (optional)

Points to the JSON Schema for editor autocompletion and validation.

agentmarkPath (required)

The base directory (relative to your project root) where AgentMark looks for the agentmark/ folder containing prompts, components, and datasets. Projects scaffolded with npm create agentmark@latest use ".", which puts the agentmark/ directory at the project root.
In a monorepo, set this to the relative path of the package containing your AgentMark files (for example, "packages/ai").
Use "." (or a relative path like "packages/ai"), not "/". A leading slash resolves to the filesystem root and breaks agentmark build.

version (required)

The AgentMark configuration version. Use "2.0.0" for new projects. AgentMark Cloud uses this to choose the storage folder for deployed prompts: versions >= "2.0.0" use the agentmark/ folder.

mdxVersion (optional)

The prompt format version. Use "1.0".

builtInModels (optional)

An array of model IDs allowed in prompts. When set and non-empty, prompt-core rejects any prompt whose model_name isn’t in the list. IDs use the provider/model format (for example, openai/gpt-5), which carries through to text_config.model_name (or object_config.model_name) on the neutral render so your call site or executor can map it to a provider model. Pricing and settings for these models come from the bundled AgentMark model registry.
Populate it with agentmark pull-models, which emits the correct provider/model format. Run it interactively, or non-interactively with agentmark pull-models --provider <name> --models <csv> (use --provider <name> --list to print the available IDs as JSON first). See Model schemas for pulling models and defining custom schemas.

scores (optional)

Define score schemas for evaluation and human annotation. Each entry declares a score name and its type (boolean, numeric, or categorical).
To add automated eval functions for these scores, define them in your client config using the evals option. See Evaluations for details.

modelSchemas (optional)

Define custom model configurations with settings, pricing, and UI controls. Use this for models not covered by builtInModels, or to customize settings for existing models.
See Model schemas for the full cost and settings reference.

mcpServers (optional)

Configure Model Context Protocol (MCP) servers that your prompts can reference as tools. Servers listed here are available in the AgentMark Dashboard prompt editor, and AgentMark surfaces them on the neutral render for prompts that reference them as mcp://<server-name>/<tool> in the tools: frontmatter. Connecting them at runtime is your call site’s or executor’s responsibility.
For remote MCP servers accessible via HTTP:
See MCP integration for usage in prompts.

Full example

An illustrative config showing every top-level field. The scaffolder doesn’t write all of them; see each field’s section above for when it applies.
agentmark.json

Client configuration

Alongside agentmark.json, your project has a client file (agentmark.client.ts or agentmark_client.py) that loads prompts at runtime and renders them to the neutral shape ({ messages, text_config }); your own code or an executor makes the model call. The only required option is the loader; evals register via the evals option. npm create agentmark@latest scaffolds agentmark.json and the agentmark/ directory but not this file. Create it by following Client setup, which walks through the loader, evals, tracing, and type safety end to end.

Environment variables

See Environment variables for the complete list.

Have questions?

Reach out any time: