AgentMark Syntax
Learn the core syntax and features of AgentMark
AgentMark combines markdown-like syntax with JSX components to create powerful, dynamic prompts. It provides a flexible way to structure prompts while supporting advanced features like conditionals, loops, and dynamic content.
Basic Structure
Every AgentMark file (.prompt.mdx
) consists of:
Learn more about the basic structure and components.
Dynamic Content
Props and Variables
Access variables using the props
object:
Learn more about using props.
Conditional Logic
Use <If>
, <ElseIf>
, and <Else>
for dynamic content:
Learn more about conditionals.
Loops
Iterate over arrays using <ForEach>
:
Learn more about loops.
Model Settings
Configure model behavior in the frontmatter:
Learn more about model settings.
Advanced Features
Structured Output
Define expected response formats using JSON Schema:
Learn more about object schemas.
Tools and Agents
Extend functionality with custom tools:
Learn more about tools and agents.
Reusable Components
Import and reuse prompt components:
Learn more about reusable components.
Filter Functions
Transform values using built-in or custom filters:
Learn more about filter functions.
Have Questions?
We’re here to help! Choose the best way to reach us:
Join our Discord community for quick answers and discussions
Email us at hello@puzzlet.ai for support
Schedule an Enterprise Demo to learn about our business solutions
Was this page helpful?