.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.
Write prompts as .prompt.mdx files
An AgentMark prompt is a .prompt.mdx file: Markdown for the prompt text, JSX tags for structure and logic. You write it once and reuse it across your app, version it in git next to your code, and type-check the inputs and outputs against your schema.
- Readable: 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:agentmark/greeting.prompt.mdx
2. Template content
The actual prompt using message tags and dynamic content:Creating prompts
- Cloud
- Local
Use the Dashboard’s visual editor to create and edit prompts. No coding or git knowledge required.The visual editor shows the frontmatter and message-tag body, a model selector, input-variable fields, and a streaming output pane. Everything it edits is the same
.prompt.mdx format you edit locally in your own 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
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:Conditional logic and loops
<> and </> fragment markers on their own lines, as shown. With props.isPremium = true and props.products = [{ name: "Widget", price: 10 }, { name: "Gadget", price: 20 }], the <User> message renders as:
Generation types
AgentMark supports multiple output formats:- Text: natural language responses
- Object: structured JSON with schema validation
- Image: image generation
- Speech: audio generation
Advanced features
- Tools & agents: extend prompts with function calling and multi-step agent workflows
- Components: create shared, reusable components across prompts
- Schema references: reuse JSON schema definitions across prompts
- File attachments: include images and documents in prompts
- MCP integration: connect to Model Context Protocol servers
- Playground: compare prompts across multiple models side-by-side
- Version control: track and manage prompt versions
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?
Reach out any time:
- Email the team at hello@agentmark.co for support
- Schedule an Enterprise Demo to learn about AgentMark’s business solutions