A language for the world's most powerful runtime

MDZ is a superset of markdown designed around LLMs' inherent ability to evaluate programs. Declare interfaces, control flow and composition using a structured format that tools can analyse, and LLMs can execute directly.

---
name: iterative-solver
description: Hypothesis-driven problem solving

types:
  $Hypothesis: /a testable prediction/
  $Outcome: "confirmed" | "refuted"

input:
  $problem: $String
---

## Workflow

DELEGATE /initial research/ TO ~/agent/research
WHILE NOT /problem solved/ DO:
  - Formulate $hypothesis: $Hypothesis
  - USE ~/skill/experiment TO /test hypothesis/
  - IF $outcome = "confirmed" THEN:
    - RETURN $solution

Write in Structured Language

Express complex agent behaviors in a structured format that can be reasoned about, tested, and predicted.

LLM Executes Directly

MDZ is designed to be understood, not compiled. The LLM just reads your program, understands the intent, and executes it.

Tooling Catches Errors

Static analysis validates references, types, and dependencies before runtime – catching structural issues before the LLM sees them.

Compose Complex Systems

Reference and invoke other skills with type-safe interfaces. Build multi-agent workflows with clear, composable modules.

A Little Less Conversation

LLMs aren't just text generators, they're powerful interpreters (abeit ones unable to produce errors).
MDZ treats LLMs as the runtime they are, and provides structure for you to build sound programs.

You Write

Markdown with typed variables, references, and control flow

Tooling Validates

Static analysis catches broken refs, type errors, and cycles

LLM Executes

The LLM reads and runs your skill directly – no transformation

Syntax at a Glance

MDZ extends markdown. Every construct is a signal to both an ecosystem of tools, and to the LLM.

Types

Contracts for tooling to check

$Task: /any executable instruction/
$Strategy: "fast" | "thorough"

Variables

Named values with type annotations

- $task: $Task
- $path = $n => `output-$n.mdz`

Links

Dependencies the tooling validates

~/skill/name
~/skill/name#section
#local-section

Semantic Markers

LLM determines from context

/appropriate location/
/best strategy for $task/

Control Flow

The LLM executes at runtime

FOR $item IN $list
END
WHILE /condition/ DO
END
IF $x = "y" THEN
END

Composition

Skills and agent delegation

USE ~/skill/name TO /task/

DELEGATE /task/ TO ~/agent/name

Get Started in Seconds

# Install
npm install zenmarkdown

# Validate a skill
mdz check skill.mdz

# Compile (validation + output)
mdz compile skill.mdz -o ./dist