Website | Source

Statically typed embedded language with flat operators (no precedence) and host-granted capabilities. Full spec fits in 3,200 tokens. Compiles to native via a safe-Rust port of QBE.

Author: Voltropy
Implementation language: Rust
Compilation target: Native (via rqbe, an in-process safe-Rust port of QBE)
Licence: MIT
First seen: March 2026
Maturity: working compiler

Agent tooling:
- docs/context.md ("LLM Context — Compact reference designed to fit in an LLM's context window")
- lang_spec.md
- showcase.mog (755-line single file demonstrating every language feature)
- .mogdecl capability declarations (host-side typing)

Key idea

Mog is a statically typed, embedded-only language explicitly designed for LLMs to write. The full spec fits in 3,200 tokens. Flat operators mean a + b * c is a compile error; capabilities (fs, http, log) must be declared in source with requires or optional and granted by the host. There is no standard library — the host provides every capability. Compiles to native via rqbe, a ~15,000-line safe-Rust port of Quentin Carbonneaux's QBE backend. The first version was authored by Voltropy's Volt coding agent in a single three-week continuous session.

The thesis

Mog's diagnosis sits at the intersection of two camp moves: at the syntactic level, ambiguity is the enemy; at the verification level, ambient authority is the enemy. The flat-operators move makes a + b * c a compile error — every mix of operators requires parentheses, no precedence table to memorise. The capability move makes I/O a declaration: a requires http, log; line at the top of a Mog script declares what the host must provide; everything else is unreachable. The project's site frames it as "statically typed Lua, designed to be written by LLMs."

The full spec fits in 3,200 tokens.

The distinctive move is what Mog refuses to do. It is not standalone; it has no standard library; it ships only as an embedded language inside a host application that provides every capability. Compilation is in-process — no JIT, no interpreter overhead, no process startup cost; the frontend compiles a .mog file via rqbe (a safe-Rust port of QBE, ~15,000 lines) and produces a .dylib or .so the host can dlopen. The first version of Mog itself was authored by Voltropy's Volt coding agent in a single three-week continuous session, using Claude Opus 4.6, Kimi k2.5, and GLM-4.7 with Voltropy's lossless context management preserving working memory across compactions. This puts Mog in the same agent-authored cluster as AILANG.

What it looks like

import agent;
optional log;

// post-compaction hook: re-inject key context
pub fn on_post_compaction(session: agent.Session) {
log.info("post-compaction hook: injecting reminder");

session.messages.push(agent.Message {
role: agent.Role.SYSTEM,
content: "IMPORTANT: Always run tests before committing.",
});
}

A Mog script declaring an agent import and an optional log capability. The host decides whether to provide log; the script runs either way. The agent namespace is host-provided typed data.

Distinctive moves

Maturity

128 commits on main, no tagged release, 1,146+ compiler tests plus 186 rqbe tests passing. The 17-chapter guide on the site covers everything from basics through embedding APIs, capabilities, and tensors. The security model is candidly self-described as unaudited: "Mog has not been audited, and it is presented without security guarantees. It should be possible to secure it, but that work has not yet been done." Zero public stars at the time of cataloguing — like Boruna's initial state, this understates the surface area shipped: a working compiler, a safe-Rust port of QBE, a 17-chapter spec, a capability system, async/await via LLVM-style coroutine lowering.

Agent tooling

docs/context.md is the headline agent-facing surface — the compact reference designed for LLM consumption. The full lang_spec.md and a 755-line showcase.mog (demonstrating every language feature in a single file) accompany it. There are no SKILL.md, AGENTS.md, CLAUDE.md, MCP server, or llms.txt files in the repo; the bet is that a spec small enough to fit in the model's context is the right level of agent tooling, rather than a sprawl of orientation documents. Mog ships less than Vera or Boruna do for agent authors and gets away with it because the language itself is small.

Design DNA


Tags: language   ai   syntactic   verification   native  

Last modified 15 June 2026