Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agentmark.co/llms.txt

Use this file to discover all available pages before exploring further.

AgentMark prompts use TemplateDX, a syntax that combines Markdown with JSX-like components.

Quick reference

Message roles

Text and Object prompts use message-role tags (<System>, <User>, <Assistant>). Image and Speech prompts use dedicated root tags (<ImagePrompt>, <SpeechPrompt>).

Text prompts

The <Assistant> tag is optional — include it to provide few-shot examples or prior conversation turns.
<System>You are a helpful assistant</System>

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

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

Object prompts

Object prompts produce structured output defined by a schema field in the object_config frontmatter. The <Assistant> tag below is an optional few-shot example showing the model what a valid response looks like — it does not drive the structure itself.
---
name: extract-contact
object_config:
  model_name: gpt-4o-mini
  schema:
    type: object
    properties:
      name: { type: string }
      email: { type: string }
---

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

<User>Extract the name and email from: John Smith (john@example.com)</User>

<Assistant>{"name": "John Smith", "email": "john@example.com"}</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. This is a test of speech generation.
</SpeechPrompt>

Variables

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

Conditionals

Show or 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, components, and type safety:

Visit TemplateDX Documentation

Complete syntax guide →

Have Questions?

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