Skip to main content

AgentMark Template Syntax

AgentMark prompts use a powerful template syntax that combines Markdown with JSX-like components. This syntax is provided by TemplateDX, our template engine.

View Full Syntax Documentation

See the complete TemplateDX syntax reference →

Quick Reference

Message Roles

Different prompt types use different tags to structure content:

Text Prompts

<System>You are a helpful assistant</System>

<User>Hello, how are you?</User>

<Assistant>I'm doing well, thank you!</Assistant>

Object Prompts

<System>You extract structured data from text</System>

<User>Extract the name and email from: John Smith ([email protected])</User>

<Assistant>{"name": "John Smith", "email": "[email protected]"}</Assistant>

Image Prompts

<ImagePrompt>
A futuristic cityscape at sunset with flying cars
</ImagePrompt>

Speech Prompts

<System>Read this text clearly and slowly</System>

<SpeechPrompt>
Welcome to AgentMark, your AI prompt management platform.
</SpeechPrompt>

Variables

Use variables to make prompts dynamic:
<User>
  Hello {props.userName}, you have {props.messageCount} new messages.
</User>

Conditionals

Show/hide content based on conditions:
<User>
  <If condition={props.isPremium}>
    Welcome, premium member!
  </If>
  <Else>
    Consider upgrading to premium.
  </Else>
</User>

Loops

Iterate over arrays:
<User>
  Products:
  <ForEach arr={props.products}>
    {(product, index) => (
      <>- {product.name}: ${product.price}</>
    )}
  </ForEach>
</User>

Filters

Transform values with built-in filters:
<User>
  Your name is {capitalize(props.name)}
  Price: {round(props.price, 2)}
</User>

Learn More

For complete documentation on all syntax features, including:
  • Advanced templating
  • Filters and transformations
  • Components and composition
  • Type safety
  • And more…

Visit TemplateDX Documentation

Complete syntax guide →

Have Questions?

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