Skip to content

What is MAGE?

MAGE (Mesh Architecture Generation Engine, package mmar-mage) generates a CARL chain from a plain-language task. You give it a task, and optionally an input schema, an exact output contract, a tool catalogue and attached files. It returns chain JSON that the installed CARL runtime has already loaded and checked.

MAGE does not run chains. CARL runs them. The usual host is MAESTRO (package care): it collects the task, calls MAGE, checks the chain again, shows it to you and runs it with CARL.

flowchart LR
    Task([Task in plain language]) --> Host["MAESTRO (package care)<br/>or your code"]
    Host -->|task, contracts,<br/>tools, recalled context| MAGE["MAGE<br/>mmar-mage"]
    MAGE -->|admitted CARL chain JSON| Host
    Host -->|chain + input| CARL["CARL runtime<br/>mmar-carl"]
    CARL -->|result| Host
    Host <-.->|save, recall| Memory[("GigaEvo Memory<br/>IdeaL")]
  • v3 strategy (0.2.0 candidate, the default there). Plans the data flow, lets the model write CARL, repairs it against admission and dry-runs it in CARL with simulated tools. See v3 generator.
  • Legacy strategy with two modes (the default in 0.1.3 and in the revisions MAESTRO pins; in 0.2.0 generation_strategy="legacy"). fast: one model call writes the chain. deep (the default mode): four model stages (domain analysis, step plan, DAG, step descriptions), plus optional research and quality stages.
  • Admission before return. Every chain passes deterministic lint and a typed load by the installed CARL runtime. One repair attempt is allowed; a chain that still fails is rejected, not returned.
  • Typed requests (development line). A GenerationRequest separates the safe task from private context, carries an input schema and an exact output contract, and states what may leave the machine and what may be saved.
  • Natural-language edits of an existing chain, applied to a copy and admitted the same way.
  • Optional memory: recall of related saved chains from GigaEvo Memory and saving the result.
  • CLI: mage generate, mage edit, mage validate, mage evolve, mage version.

Three lines exist. The pages in this section label every capability with one of them.

LabelWhat it meansWhere
ReleasedIn mmar-mage 0.1.3 on PyPI (June 2026).Public repository AIRI-MAESTRO/mage, tag v0.1.3.
Development linePackage version 0.2.0, not on PyPI. The release candidate (branch prep/mage-0.2.0, draft PR Glazkoff/carl-mage#21) is prepared for publication; MAESTRO pins older git revisions of this line.Branches of the development repository Glazkoff/carl-mage.
ExperimentalResearch extensions of the v3 generator: generation memory, the IdeaL loop, the tool forges, author-written code steps. They plug into v3 only from evaluation/ and are not part of the package API.Development branches, merged into prep/mage-0.2.0 but not called by MAGEGenerator.

What MAESTRO actually runs is described in MAESTRO as host. The full list is in Capability status and the changelog.

With the legacy strategy, MAGEGenerator writes 16 CARL step types: llm, structured_output, tool, mcp, mcp_resource, memory, transform, conditional, agent_skill, evaluation, human_input, tool_discovery, agent_handoff, parallel_sampling, supervisor, debate. It does not write code, agent, map, command or wait steps. The internal labels eval and aggregator are lowered to llm before export. See the CARL step list.