- A basic understanding of Markdown
- A text editor for creating .mda files
- Optionally, the url2mda tool to convert web content to MAGI format
Understanding MAGI Components
Understanding MAGI Components
Understanding MAGI Components
MAGI has three optional components that enhance standard Markdown:
Each component is optional - use only what you need.
- YAML Front Matter: Provides structured metadata (like
title,doc-id). - ai-script blocks: Embeds JSON instructions for AI/LLM processing.
- Footnotes with JSON: Defines typed relationships between documents (e.g.,
[^ref1]: {"rel-type": ...}).
Creating a Simple MAGI File
Create a file with the.mda extension. Here’s an example structure:
Adding AI Instructions
Inside your.mda file, you can add an ai-script block like this:
Convert Web Content with url2mda
The easiest way to test MAGI is with our url2mda service, which converts web pages to MAGI format:Explore the Open Source Toolkit
MAGI is fully open source and includes tools like url2mda that you can run locally:- Clone the repository:
git clone https://github.com/snoai/magi-markdown - Navigate to the url2mda directory:
cd magi-markdown/apps/url2mda - Install dependencies:
pnpm install - Run locally:
pnpm dev
docs/mda-examples directory to see MAGI in action for various use cases.
You’re now ready to create AI-friendly content with MAGI.
That’s it! You’re now ready to create AI-friendly content with MAGI.