@agentmark/agentmark-core v3.1.3
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>
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>
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>
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>
Features
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.
Quick Start
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
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.
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.