Skip to main content
Create prompts as .prompt.mdx files in your editor, or use the visual editor in the Dashboard — both produce the same format and are fully interchangeable. Run them via SDK, CLI, or the Dashboard Playground.

What are AgentMark Prompts?

AgentMark prompts are .prompt.mdx files that combine the readability of Markdown with the power of JSX templating. They provide a structured, version-controllable way to define LLM prompts with type safety and reusability.
  • Readable — Human-friendly syntax that’s easy to review and understand
  • Reusable — Share components across prompts and use variables for dynamic content
  • Type-Safe — Full TypeScript support for props and outputs
  • Version-Controlled — Store prompts in git alongside your code
  • Testable — Run experiments with datasets and automated evaluations

Basic Structure

Every AgentMark prompt consists of two parts:

1. Frontmatter (YAML)

Defines the prompt’s metadata and configuration:
example.prompt.mdx
---
name: example
text_config:
  model_name: gpt-4o-mini
  temperature: 0.7
---

2. Template Content

The actual prompt using message tags and dynamic content:
<System>
You are a helpful assistant.
</System>

<User>
Summarize the following text: {props.text}
</User>

Creating Prompts

Use the Dashboard’s visual editor to create and edit prompts — no coding or git knowledge required.Creating a prompt in the Dashboard visual editor
  • Write and edit prompts with syntax highlighting
  • Test prompts directly in the editor
  • Configure model settings through visual controls
  • Preview outputs in real-time
Step-by-step guide →

Key Features

Message Tags

Structure conversations with role tags:
  • <System> — System-level instructions
  • <User> — User messages
  • <Assistant> — Assistant responses (for few-shot examples)

Dynamic Variables

Access runtime data using props:
<User>
Hello {props.userName}, you have {props.messageCount} new messages.
</User>
Learn about Props →

Conditional Logic and Loops

<User>
  {#if props.isPremium}
    You have access to premium features.
  {/if}

  Products:
  {#each props.products as product}
    - {product.name}: ${product.price}
  {/each}
</User>
Learn about TemplateDX syntax →

Generation Types

AgentMark supports multiple output formats:
  • Text — Natural language responses
  • Object — Structured JSON with schema validation
  • Image — Image generation
  • Speech — Audio generation
Explore Generation Types →

Advanced Features

Next Steps

Running Prompts

Execute prompts in your application via SDK

Generation Types

Explore text, object, image, and speech generation

Tools & Agents

Build multi-step agents with function calling

TemplateDX Syntax

Learn the full template syntax

Have Questions?

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