Markdown for the AI Era
AgentMark is a readable, markdown-based prompting language for building reliable AI applications and agents.
AgentMark makes prompt engineering intuitive by combining familiar Markdown syntax with JSX components, allowing developers to focus on crafting effective prompts rather than wrestling with complex APIs, or learning a new syntax. You don't need to rewrite your entire application in AgentMark, just your prompts! AgentMark seamlessly integrates with your existing codebase in TypeScript and JavaScript, with Python support coming soon.
AgentMark comes with comprehensive tooling included—featuring full type safety, unified prompt configuration, syntax highlighting, loops and conditionals, custom SDK adapters, and support for text, object, image, and speech generation across multiple model providers, even when they don't support native structured output APIs.
---
name: text
text_config:
model_name: gpt-4o-mini
---
<User>Tell me a good joke</User>
---
name: example
object_config:
model_name: gpt-4
temperature: 0.5
schema:
type: object
properties:
event:
type: object
properties:
date:
type: string
description: The date of the event
attendees:
type: array
items:
type: object
properties:
name:
type: string
description: The name of the attendee
role:
type: string
description: The role of the attendee
required:
- name
- role
required:
- date
- attendees
---
<System>Parse event details from the text.</System>
<User>The company picnic is on July 15th. John (host) and Mary (coordinator) are organizing it</User>
---
name: image
image_config:
model_name: dall-e-3
num_images: 2
size: 1024x1024
aspect_ratio: 1:1
seed: 12345
---
<ImagePrompt>
Cute cats playing
</ImagePrompt>
---
name: speech
speech_config:
model_name: tts-1-hd
voice: "nova"
speed: 1.0
output_format: "mp3"
---
<System>
Please read this text aloud.
</System>
<SpeechPrompt>
This is a test for the speech prompt to be spoken aloud.
</SpeechPrompt>
AgentMark supports:
- Markdown: 📝
- Syntax highlighting: 🌈
- Type Safety: 🛡️
- Unified prompt config: 🔗
- JSX components, props, & plugins: 🧩
- Loops, Conditionals, and Filter Functions: ♻️
- Custom SDK Adapters: 🛠️
- JSON Output: 📦
- Tools & Agents: 🕵️
- Text, Object, Image and Speech generation.📝 🖼 🔊
Read our docs to learn more.
Get started with AgentMark in just 3 steps:
- Initialize AgentMark in your project:
npx @agentmark/cli@latest init
- Start with npm:
npm install && npm start
Or with yarn:
yarn && yarn start
By default, AgentMark doesn't support any models or calling any LLM providers. Instead, we format the input of your prompt through an adapter to match the input of the SDK you're using.
Adapter | Supported | Supports Type-Safety |
---|---|---|
Default | ✅ | ✅ |
Custom | ✅ | ✅ |
Vercel (Recommended) | ✅ | ✅ |
Mastra |
Want to add support for another adapter? Open an issue.
We plan on providing support for AgentMark across a variety of languages.
Language | Support Status |
---|---|
TypeScript | ✅ Supported |
JavaScript | ✅ Supported |
Python | |
Others | Need something else? Open an issue |
You can run AgentMark using any of the following methods:
Run .prompt.mdx
files directly within your VSCode editor. Note: You can test props by using test_settings
in your prompts. This is useful for iterating on prompts quickly.
Read more about how to run AgentMark files with our SDK here.
AgentMark Studio supports type safety out of the box. Read more about it here.
We welcome contributions! Please check out our contribution guidelines for more information.
Join our community to collaborate, ask questions, and stay updated:
This project is licensed under the MIT License.