Skip to content

agentmark-ai/agentmark

Repository files navigation

AgentMark

AgentMark Logo

Markdown for the AI Era

Homepage | Discord | Docs


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.

Generation Types

Text Generation

---
name: text
text_config:
  model_name: gpt-4o-mini
---
<User>Tell me a good joke</User>

Text

Object Generation

---
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>

Object

Image Generation

---
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>

Img

Speech Generation

---
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>

Audio

Features

AgentMark supports:

  1. Markdown: 📝
  2. Syntax highlighting: 🌈
  3. Type Safety: 🛡️
  4. Unified prompt config: 🔗
  5. JSX components, props, & plugins: 🧩
  6. Loops, Conditionals, and Filter Functions: ♻️
  7. Custom SDK Adapters: 🛠️
  8. JSON Output: 📦
  9. Tools & Agents: 🕵️
  10. Text, Object, Image and Speech generation.📝 🖼 🔊

Read our docs to learn more.

Quick Start

Get started with AgentMark in just 3 steps:

  1. Initialize AgentMark in your project:
npx @agentmark/cli@latest init
  1. Start with npm:
npm install && npm start

Or with yarn:

yarn && yarn start

Supported Adapters

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 ⚠️ Coming Soon ⚠️

Want to add support for another adapter? Open an issue.

Language Support

We plan on providing support for AgentMark across a variety of languages.

Language Support Status
TypeScript ✅ Supported
JavaScript ✅ Supported
Python ⚠️ Coming Soon
Others Need something else? Open an issue

Running AgentMark

You can run AgentMark using any of the following methods:

1. VSCode Extension

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.

Download the VSCode Extension

2. Run AgentMark files with our SDK

Read more about how to run AgentMark files with our SDK here.

Type Safety

AgentMark Studio supports type safety out of the box. Read more about it here.

Contributing

We welcome contributions! Please check out our contribution guidelines for more information.

Community

Join our community to collaborate, ask questions, and stay updated:

License

This project is licensed under the MIT License.