freshcrate
Home > Prompt Engineering > agentmark

Description

Markdown for the AI era

README

AgentMark

AgentMark Logo

The open-source platform to develop, test, and observe your AI agents.

Homepage | Docs


AgentMark is a complete platform for building reliable AI agents. Define prompts in Markdown, run them with any SDK, evaluate quality with datasets, and trace every call in production.

Prompt management — Write prompts as .prompt.mdx files with type-safe inputs, tool definitions, structured outputs, conditionals, loops, and reusable components.

Observability — Trace every LLM call with OpenTelemetry. View traces locally or forward them to AgentMark Cloud for dashboards, alerts, and collaboration.

Evaluations — Test prompts against datasets with built-in evals. Run experiments from the CLI and gate deployments on quality thresholds.

What a prompt looks like

---
name: customer-support-agent
text_config:
  model_name: anthropic/claude-sonnet-4-20250514
  max_calls: 2
  tools:
    search_knowledgebase:
      description: Search the knowledge base for shipping, warranty, and returns info.
      parameters:
        type: object
        properties:
          query:
            type: string
        required: [query]
test_settings:
  props:
    customer_question: "How long does shipping take?"
input_schema:
  type: object
  properties:
    customer_question:
      type: string
  required: [customer_question]
---

<System>
You are a helpful customer service agent. Use the search_knowledgebase tool
when customers ask about shipping, warranty, or returns.
</System>

<User>{props.customer_question}</User>

Run it:

agentmark run-prompt customer-support.prompt.mdx

That's it. The prompt is version-controlled, type-checked, and traceable.

Quick Start

# Scaffold a new project (interactive — picks your language and adapter)
npm create agentmark@latest

# Start the dev server (API + trace UI + hot reload)
agentmark dev

# Run a single prompt
agentmark run-prompt my-prompt.prompt.mdx

# Run an experiment against a dataset
agentmark run-experiment my-prompt.prompt.mdx

Features

Feature Description
Multimodal Generation Generate text, structured objects, images, and speech from a single prompt file.
Tools and Agents Define tools inline and build agentic loops with max_calls.
Structured Output Type-safe JSON output via JSON Schema definitions.
Datasets & Evals Test prompts against JSONL datasets with built-in and custom evaluators.
Tracing OpenTelemetry-based tracing for every LLM call — local and cloud.
Type Safety Auto-generate TypeScript types from your prompts. JSON Schema validation in your IDE.
Reusable Components Import and compose prompt fragments across files.
Conditionals & Loops Dynamic prompts with <If>, <ForEach>, props, and filter functions.
File Attachments Attach images and documents for vision and document processing tasks.
MCP Servers Call Model Context Protocol tools directly from prompts.
MCP Trace Server Debug traces from Claude Code, Cursor, or any MCP client.

SDK Adapters

AgentMark doesn't call LLM APIs directly. Instead, adapters format your prompt for the SDK you already use.

Adapter Language Package
Vercel AI SDK v5 TypeScript @agentmark-ai/ai-sdk-v5-adapter
Vercel AI SDK v4 TypeScript @agentmark-ai/ai-sdk-v4-adapter
Mastra TypeScript @agentmark-ai/mastra-v0-adapter
Claude Agent SDK TypeScript @agentmark-ai/claude-agent-sdk-v0-adapter
Claude Agent SDK Python agentmark-claude-agent-sdk-v0
Pydantic AI Python agentmark-pydantic-ai
Fallback TypeScript @agentmark-ai/fallback-adapter

Want another adapter? Open an issue.

Language Support

Language Status
TypeScript / JavaScript Supported
Python Supported
Others Open an issue

Packages

Package Description
@agentmark-ai/cli CLI for local development, prompt running, experiments, and building.
@agentmark-ai/sdk SDK for tracing and cloud platform integration.
@agentmark-ai/prompt-core Core prompt parsing and formatting engine.
@agentmark-ai/templatedx MDX-based template engine with JSX components, conditionals, and loops.
@agentmark-ai/mcp-server MCP server for trace debugging in Claude Code, Cursor, and more.
@agentmark-ai/model-registry Centralized LLM model metadata and pricing.
create-agentmark Project scaffolding tool.

Examples

See the examples/ directory for complete, runnable examples:

Cloud Platform

AgentMark Cloud extends the open-source project with:

  • Collaborative prompt editing and version history
  • Persistent trace storage with search and filtering
  • Dashboards for cost, latency, and quality metrics
  • Annotations and human evaluation workflows
  • Alerts for quality regressions, cost spikes, and latency
  • Two-way Git sync

Contributing

We welcome contributions! See our contribution guidelines.

Community

License

MIT License

Release History

VersionChangesUrgencyDate
agentmark-sdk@0.2.1 ### 🩹 Fixes - fix: set explicit User-Agent on OTLP span exports to bypass Cloudflare BIC ([#584](https://github.com/agentmark-ai/agentmark/pull/584)) Cloudflare's Browser Integrity Check rejects requests bearing the default `Python-urllib/*` User-Agent with HTTP 403 (error code 1010). `JsonOtlpSpanExporter` uses `urllib.request.urlopen` without setting a UA, so every trace export through a Cloudflare-proxied zone (api.agentmark.co, api-stg.agentmark.co) was silently rejected beforeHigh4/16/2026
@agentmark-ai/ui-components@0.5.2 ### 🩹 Fixes - Unify scorer storage format across the eval runner and annotation UI, rename the client `scores` option back to `evals`, and refresh the model catalogue. ([#581](https://github.com/agentmark-ai/agentmark/pull/581)) ### @agentmark-ai/prompt-core - `ScoreSchema.categorical.categories` is now `Array<{ label: string; value: number }>` instead of `string[]`. Each category carries its own numeric value used when posting scores. Consumers constructing categorical score configs muHigh4/15/2026
@agentmark-ai/ui-components@0.5.1 ### 🩹 Fixes - Restore experiment span instrumentation, score posting, and trace drawer I/O display across all adapters. Refs agentmark-ai/app#1860. ([#572](https://github.com/agentmark-ai/agentmark/pull/572)) ### agentmark-sdk (minor) - New `JsonOtlpSpanExporter`: replaces the protobuf OTLP exporter (`opentelemetry-exporter-otlp-proto-http`) with a JSON exporter that sends `Content-Type: application/json` with hex trace IDs. The protobuf exporter was incompatible with the production gatHigh4/13/2026
@agentmark-ai/model-registry@0.2.2 ### 🩹 Fixes - Fix pydantic-ai-v0 webhook crash and eliminate __version__ drift across all Python packages. ([#559](https://github.com/agentmark-ai/agentmark/pull/559)) **Pydantic webhook fix:** Restore `commit_sha` parameter threading across `run_experiment`, `_stream_experiment`, `_stream_text_experiment`, and `_stream_object_experiment` in `pydantic-ai-v0-adapter/webhook.py`. This un-breaks the `dataset-run` webhook path on main, which has been crashing with `TypeError: run_experiment() High4/9/2026
@agentmark-ai/ui-components@0.5.0 ### 🚀 Features - Add unified score registry with typed schemas for human annotation. ([#553](https://github.com/agentmark-ai/agentmark/pull/553), [#517](https://github.com/agentmark-ai/agentmark/issues/517), [#521](https://github.com/agentmark-ai/agentmark/issues/521), [#532](https://github.com/agentmark-ai/agentmark/issues/532), [#544](https://github.com/agentmark-ai/agentmark/issues/544), [#540](https://github.com/agentmark-ai/agentmark/issues/540), [#492](https://github.com/agentmark-ai/agHigh4/8/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

awesome-gpt-image-1.5🎨 100+ selected GPT Image 1.5 prompts with images, multilingual support, and instant gallery preview. Open-source prompt engineering librarymain@2026-04-21
AetherArtifical Ecology For Thought and Emergent Reasoning. The Colony That Builds With You.v1.0.17
awesome-seedream-4.5🍌 100+ hand-picked Seedream 4.5 prompts with images, multilingual support, and instant gallery preview. The best Nano Banana Pro alternative — only 1/3 the cost. Open-source prompt engineering librarmain@2026-04-21
awesome-nano-banana-pro-prompts🍌 World's largest Nano Banana Pro prompt library — 10,000+ curated prompts with preview images, 16 languages. Google Gemini AI image generation. Free & open source.main@2026-04-21
GPT-VoyagerEnhance ChatGPT on the web with session management, prompt reuse, formula and Mermaid support, plus export and backup features.main@2026-04-21