Skip to content

Migrating from Laya

mimir.compat.laya.v1 provides Laya 0.3.20's load(...).predict(state, questions) interface, answering in Laya's shape. Existing Laya callers can migrate by changing what they import.

from mimir.compat.laya.v1 import load

agent = load("Mythologic/MIMIR-1")
answers = agent.predict(
    "Help! My payouts have been failing for 3 days.",
    {
        "department": {
            "type": "choice",
            "instructions": "Which department should handle this request?",
            "criteria": {
                "billing": "invoices, payments, refunds",
                "technical": "bugs, outages, system errors",
                "sales": "pricing, new contracts",
                "other": "everything else",
            },
        }
    },
)

Differences from Laya

  • Questions follow Jev's format, extended with list-valued choice criteria and noul labels.
  • predict_batch(states, questions) answers the same set of questions about each state in the batch.
  • Probability values are rounded to 4 decimal places, matching Laya's rounding.
  • MIMIR has no separate act head. action.act_probability is 1.0 when the decision is actionable (DECIDED or ABSTAINED), and 0.0 when it defers — evaluated in the mode passed to load (standard by default).

Limitations

The shim makes no commitment to track later Laya versions. It provides a migration path, not a long-term compatibility guarantee.

For access to the full MIMIR result — the certificate and the relevant context slices — call Mimir directly rather than going through the compat shim.