Skip to main content

Vanguard Modeling Language

VML is a compile-time DSL compiler for agentic AI: define an agent's system prompt, constraints, fine-tuning examples, and conversation flow declaratively in .vml files, and compile them into deterministic artifacts (prompts, fine-tuning JSONL, flow graphs, judge prompts) that stay consistent across models and sessions.

Repository: github.com/Selkomark/vanguard-modeling-language

Use VML in your project

pip install vanguard-modeling-language

A minimal project — a vml.json config plus one model — and compiling it:

mkdir -p my-agent/models
cat > my-agent/vml.json <<'JSON'
{ "project": { "name": "my-agent" } }
JSON
cat > my-agent/models/support.vml <<'VML'
model Support {
  system "You are a support agent. Be concise and ask for an order id on shipping issues."
  constraints {
    must "ask for an order id when the user reports a shipping problem"
  }
}
VML

vml compile my-agent --out my-agent/dist

That writes my-agent/dist/prompts/Support.md and my-agent/dist/manifest.json. Depending on what your .vml files declare, vml compile also writes:

Path Description
dist/prompts/<Model>.md Rendered system prompt + constraints (markdown docs)
dist/system/<Model>.txt Plain-text system prompt — for sending directly to a live LLM, not documentation
dist/finetune/openai/<Model>.jsonl OpenAI chat fine-tuning JSONL
dist/finetune/anthropic/<Model>.jsonl Claude fine-tuning JSONL (Amazon Bedrock format — Anthropic has no hosted fine-tuning API)
dist/finetune/gemini/<Model>.jsonl Gemini supervised fine-tuning JSONL (Vertex AI format)
dist/flows/<Flow>.flow.json Conversation flow IR
dist/flags/<Flow>.flags.json Flag definitions
dist/judges/<Judge>.judge.md Judge validation prompts
dist/manifest.json Project artifact index

Full walkthrough, including the programmatic Python API for getting compiled data back as in-memory objects instead of files: docs/integration.md. Three runnable example projects (fine-tuning export, a multi-persona prompt library, a flow router) live in examples/.

VML is compile-time by default: it does not invoke MCP, run conversations, or manage session state. That's the job of whatever consumes these artifacts, not this library — see docs/orchestrator.md for the artifact contract an orchestrator would build against. The one deliberate exception is vml train below — it does call an LLM provider's own fine-tuning API, as a bounded, one-shot job submission, not a runtime.

Fine-tuning and training

vml train <project> <provider> --model <Name> --base-model <id> [...] submits a fine-tuning job for one model's compiled finetune examples — the same records dist/finetune/<provider>/<Model>.jsonl already contains, sent straight to the provider rather than requiring a separate upload step.

Provider Backs Install
openai OpenAI fine-tuning API pip install vanguard-modeling-language[openai]
gemini Vertex AI supervised tuning pip install vanguard-modeling-language[gemini]
bedrock (aliases: claude, anthropic) AWS Bedrock custom models — the only way to fine-tune Claude; Anthropic has no hosted fine-tuning API of its own pip install vanguard-modeling-language[bedrock]
local Unsloth LoRA/QLoRA, in-process, GGUF export — for self-hosted models (e.g. served via Ollama) pip install vanguard-modeling-language[local] (heavy: torch/unsloth, needs a CUDA GPU)
# Submit and wait for an OpenAI fine-tune (needs OPENAI_API_KEY)
vml train my-agent openai --model Support --base-model gpt-4o-mini

# Submit and immediately return with a job id instead of blocking
vml train my-agent openai --model Support --base-model gpt-4o-mini --no-wait

# Local LoRA fine-tune + GGUF export, on a CUDA machine with the `local` extra installed
vml train my-agent local --model Support --base-model unsloth/Qwen3-4B-Instruct --output-dir ./out

Each provider's dependency is genuinely optional — plain pip install vanguard-modeling-language still gets you a dependency-light compiler; nothing imports a provider's SDK until you actually select that provider. See AGENTS.md's "Fine-tuning and training" section for the module layout (src/vml/train/) if you're calling these from Python instead of the CLI.

Language

  • Models with extends, use logic, implements traits
  • Flows with stages, routing, flags, MCP actions, and judges
  • Imports for DRY composition across .vml files

Full syntax reference: docs/language.md.

Develop this repo

Clone the repo, then set up an environment (Python 3.10+):

python3 -m venv .venv && source .venv/bin/activate   # or: conda create -n vml python=3.10 && conda activate vml
pip install -e ".[dev]"

dev pulls in the lightweight fine-tuning provider SDKs too (openai, google-cloud-aiplatform, boto3) so their tests actually run. It deliberately does not include local's extra (unsloth/torch — heavy, CUDA-only); tests/test_train_local.py detects that and skips the parts that need it, so a normal dev machine still gets a full green pytest run.

Compile the bundled full-featured example:

vml compile examples/support_project
vml compile examples/support_project --check-only   # validate only, no output

Run the test suite:

pytest

VS Code extension (syntax highlighting, snippets, compile diagnostics) lives in vscode-extension/:

  1. Open vscode-extension/ in VS Code (or the whole repo).
  2. Press F5 (Run Extension) to open an Extension Development Host.
  3. In that window, open a folder with vml.json (e.g. examples/support_project) and edit .vml files.

To package it: cd vscode-extension && vsce package (requires npm install -g @vscode/vsce), then Extensions → Install from VSIX… in VS Code. The extension runs vml compile <project> --check-only on save; it needs vml on PATH (pip install -e .) or vml.compilerPath set in settings.

See AGENTS.md for project scope and architecture.

Release files for vanguard-modeling-language 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vanguard-modeling-language 1.3.0
File Size Uploaded
vanguard_modeling_language-1.3.0.tar.gz 55.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vanguard-modeling-language 1.3.0
File Interpreter ABI Platform
vanguard_modeling_language-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 95.3 kB

Release files / vanguard_modeling_language-1.3.0.tar.gz

Download URL vanguard_modeling_language-1.3.0.tar.gz
Size 55.2 kB
Tags Source
SHA-256 checksum
How to use checksums
29be7841cf278e2c384b122778f39313cf8b04250f3b839ec1382af6f00fb43f
BLAKE2b-256 checksum
How to use checksums
9707626e56beb34fc5fbcba4963a117086614822884d099cdf29d022740fa793
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / vanguard_modeling_language-1.3.0-py3-none-any.whl

Download URL vanguard_modeling_language-1.3.0-py3-none-any.whl
Size 40.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c5d65160f28641a1d0ac01d4f5638e93ffa7c13b84f6477f40494d096d9c83b
BLAKE2b-256 checksum
How to use checksums
a47583b1982738c8bb05204929e2249d1c91e871ee127127267d715ee66a09af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page