genai-runtime

genai-runtime is a skill for Claude Code from mendixlabs/mxcli. It costs 101 tokens per session (3,866 once invoked), scanned A, original, Apache-2.0.

A runtime setup guide for Mendix applications that use generative AI, meaning software that produces text or other results from prompts. It covers AI models, agents, chats, knowledge bases, and usage traces.

In plain words
What is it for?
Use it to register an AI service, create agents from JSON, open or resume chats, connect PgVector or Mendix Cloud knowledge bases, and enable tracing.
Why use it?
It explains how to connect AI services and load application data without confusing startup setup with the separate design of agents and microflows. It also records where common startup errors occur.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to register an AI service, create agents from JSON, open or resume chats, connect PgVector or Mendix Cloud knowledge bases, and enable tracing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mendixlabs/mxcli/genai-runtime
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mendixlabs/mxcli --skill genai-runtime
Clone the repo
git clone --depth 1 https://github.com/mendixlabs/mxcli

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for genai-runtime

README.md
[![agentmods](https://agentmods.dev/badge/skills/mendixlabs/mxcli/genai-runtime/github.svg)](https://agentmods.dev/skills/mendixlabs/mxcli/genai-runtime)
Your own site
<a href="https://agentmods.dev/skills/mendixlabs/mxcli/genai-runtime"><img src="https://agentmods.dev/badge/skills/mendixlabs/mxcli/genai-runtime/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for genai-runtime

Your own site · 80×15
<a href="https://agentmods.dev/skills/mendixlabs/mxcli/genai-runtime"><img src="https://agentmods.dev/badge/skills/mendixlabs/mxcli/genai-runtime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,866 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00101 $0.03866
Opus 5.5 $0.00040 $0.01546
Sonnet 5.5 $0.00020 $0.00773
Haiku 4.5 $0.00010 $0.00387

Measured 15d ago against content hash b58e42d41621, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

genai-runtime scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/mendix/genai-runtime/SKILL.md · 313 lines

How it starts

The opening of the file, as written. The whole thing — 313 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Find it fast

sed -n '<from>,<to>p' SKILL.md one section rather than reading the file; ./mxcli syntax <topic> answers how do I write this for a fraction of either.

lines section
37-47 Startup code must not throw
48-131 Models
132-174 Runtime agents (AgentCommons)
175-231 Chat (Conversational UI)
232-273 Knowledge bases
274-285 Agents attached to knowledge bases
286-300 Traces and token usage
301-312 Gotchas, in one place

GenAI at Runtime (Agents Kit 2)

The agents skill covers the documents (Model, Knowledge Base, Consumed MCP Service, Agent) and calling an agent from a microflow. This skill covers what an app does with the Marketplace modules at runtime: the startup microflows that register models, seed agents and load knowledge bases, and the chat pages. All of it is ordinary microflow logic, so describe microflow, check --references and exec apply as usual.

Measured against the Agent Builder Starter App modules: AgentCommons 4.4.0, ConversationalUI 7.4.0, GenAICommons 7.3.0, MxGenAIConnector 7.4.0, OpenAIConnector 9.4.0, PgVectorKnowledgeBase 7.1.0 (Mendix 11.16). Check the installed versions with list modules before copying a signature.

Startup code must not throw

Every setup step below that stores a secret (an OpenAI key, a PgVector password) goes through Encryption.Encrypt, which raises an error when Encryption.EncryptionKey is empty or not 32 characters. The constant's default is empty, so a run configuration without it (a new environment, or mxcli run --local / test --local on a model that sets it only in Default) throws there. Unhandled in an after-startup microflow, that stops the runtime. Give each such call an on error handler, as below, and set the key per environment.

Models

Mendix Cloud GenAI

The key string from the Mendix Cloud GenAI portal registers the resource and its models in one call. It overwrites a configuration with the same ID, so calling it on every startup is safe:

Read the full file on GitHub · 313 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 15d ago First seen · 313 lines · 101 tokens per session scan A b58e42d41621

Subscribe to this mod's changes

genai-runtime is a skill published in the GitHub repository mendixlabs/mxcli (145 stars, last pushed today), licensed Apache-2.0. It adds 101 tokens to every session and 3,866 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-11.

Related

genai-runtime compared with skills from other repositories

genai-runtime next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
genai-runtimemendixlabs/mxcliSkill145todayApache-2.0A101Claude Code
rag-assistantMerkyorLynn/LynnSkill7314d agoApache-2.0A41Claude Code, Codex
dspyStarryCod/cogitumSkill126mo agoMITA19Claude Code, Codex
molecular-ragsynthetic-sciences/openscienceSkill4.4kyesterdayApache-2.0A40Claude Code, Codex
llmwikiatomicstrata/llm-wiki-compilerSkill2.3kyesterdayMITA66Claude Code, Codex
building-agentsericrisco/rsc-harnessSkill669yesterdayMITA85Claude Code, Codex
bailian-climodelstudioai/cliSkill374todayApache-2.0A542Claude Code, Codex