Skip to content

Check for Agent Editor projects: mxmodule tracked, agent references and model version filled, runtime constants set #778

Closed

Description

@MendixMau

Problem

A Mendix project with Agent Editor agents was green for its builder but broken for every colleague after a plain git pull (Moneta Hub, Nov 2026). Three things the pipeline did not catch:

  1. modules/AgentEditor.mxmodule was not in git. Studio Pro needs this file next to the .mpr to know the agenteditor.agent type. Without it every agent shows unknown type 'agenteditor.agent'. Installing from the Marketplace in Studio Pro adds it; a model sync that copies only .mpr + mprcontents/ drops it.
  2. Agents written by mxcli had empty references and no model version (create agent: tool/entity references stored without documentId and no selectedModel, Studio Pro check fails (Document state could not be determined / AE018) mendixlabs/mxcli#1867): Document state could not be determined and AE018 Model version is required for an agent. mxcli check passes; only Studio Pro's checker sees it.
  3. The GenAI key existed only as an environment variable set by the builder's start script. A colleague running from Studio Pro got a blank key at runtime, and with the key present, startup also needed Encryption.EncryptionKey and GenAICommons.StoreTraces = true, which were set nowhere in the project.

Ask

A check (gate or app-facts line) for projects that contain CustomBlobDocuments$CustomBlobDocument with CustomDocumentType = agenteditor.*:

  • Fail when modules/AgentEditor.mxmodule is missing from the working tree or not tracked by git.
  • Fail when an agent has a tool without document.documentId, an entity with an empty documentId, or a model without selectedModel (until #1867 is fixed upstream).
  • Warn when a constant the agents need at runtime (GenAI key, Encryption.EncryptionKey) has no value in the default or first configuration, so a fresh clone cannot run the agents.

Workaround used

mdlsource/299-agent-reference-repair.py in Moneta Hub (resolve ids, set selectedModel, update Unit.ContentsHash); key and constants set in the Default configuration.

Activity

  1. MendixMau commented on Nov 16, 2026

    @MendixMau
    OwnerAuthor

    Triage: DISCUSS track. Instrument gap. UNVERIFIED: no project with Agent Editor agents is available here.

    Problem: Nothing on master checks Agent Editor projects. skills/mendix-agents.md:34-47,252 covers installing the seven modules and the ASU_AgentEditor after-startup microflow. But no gate, app-facts line or doctor check looks at:

    mxcli check passes on all three, so the defect shows up only for a colleague after git pull.

    Value: H for projects that use Agent Editor: every colleague's clone is broken while the builder's stays green. Zero for every other project.

    Risk of fixing: M.

    • A new FAIL in a gate can flip existing projects to red.
    • Detection relies on CustomBlobDocuments$CustomBlobDocument / CustomDocumentType = agenteditor.*. That needs a captured mxcli output from a real agent project (field-proof rule 1).
    • Both layouts apply: modules/ sits beside the .mpr.

    Rigidity check: this is DISCUSS because the ask adds a FAIL to a gate, which changes what blocks.

    Process cost (#687): per gate or app-facts run. One model query plus one git ls-files, a few seconds. Nothing per build row. A FAIL can force rework, by design.

    Needs clarification: yes. Can you share (or capture) mxcli output listing one agent document from a real Agent Editor project, with names redacted? The detector needs it as its golden input.

    Learning value: learned rule in skills/mendix-agents.md: "commit modules/*.mxmodule with the model; a sync of only .mpr + mprcontents/ drops extension types."

    Options:

    1. Warn first. Add an app-facts / doctor WATCH line for all three findings, add the learned rule to mendix-agents.md, and add no gate FAIL. Applies in every entry mode. Risk L, effort S.
    2. Gate as asked. Stage 5/6 FAILs on a missing or untracked .mxmodule and on empty references, with WARN on missing constants. Risk M (new red), effort M. It needs the captured golden input.
    3. Docs only. Add the learned rule plus a hand-over checklist row. Risk none, effort XS. It catches nothing mechanically.

    Proof: a scoped fixture over a captured agent document with the reference removed. It must fail on master.

    Effort: S (1) / M (2). Recommendation: DISCUSS, option 1 now, and option 2 once the upstream #1867 status and a golden capture exist. Decision needed: warn now, or gate now?

    Privacy note: the issue body names a real project. Please consider editing that name out, since this repo is public.

    Labels: kept enhancement, size/s.

    Reply go option N. Fix PRs still get an independent review and your merge.


    Generated by Claude Code

  2. MendixMau commented on Nov 16, 2026

    @MendixMau
    OwnerAuthor

    Maintainer decision (in chat, 2026-11-16): go option 1, warn only. A fix PR follows.


    Generated by Claude Code

  3. MendixMau commented on Nov 16, 2026

    @MendixMau
    OwnerAuthor

    Fix PR opened: #786 (option 1, warn only). It adds two status.sh WATCH lines, one for an untracked modules/*.mxmodule and one for a project that uses Agent Editor but has no AgentEditor module. It also adds the learned rule to mendix-agents.md. The agent-reference and runtime-constant checks wait for option 2, because they need a captured agent document. The PR is in independent review.


    Generated by Claude Code

  4. MendixMau commented on Nov 16, 2026

    @MendixMau
    OwnerAuthor

    Option 1 shipped in #786. The issue closed automatically. Option 2 is still open: the gate checks for empty agent references and model version (mendixlabs/mxcli#1867), and for runtime constants. It needs a captured mxcli output of a real agent document, names redacted. Reopen this issue, or file a new one, once a capture exists.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions