Grenton and AI: an agent for the Lua scripts in your project
OMP Studio can drive an AI agent running on your own computer, under your own account: Claude Code, Codex, opencode or pi. The agent works in a local copy of the project, knows its objects and scripts, and its edits appear in the editor live.
What OMP Studio gives the agent
A plain chat doesn't know what is in your installation. An agent started by OMP Studio runs in the project's working folder, where it finds:
AGENTS.mdandCLAUDE.md, describing the project layout, the Grenton Lua dialect and the editing rules,project-index.json, an inventory of CLUs, objects, features, methods, events, scripts and bindings,- the scripts, at
scripts/<CLU>/<name>.lua, - the
omps script,event,var,param,valueandobjectcommands for structural changes, omps lint, the editor's own rules, to check its work.
The editor also adds the list of open scripts to your prompt, so "this script" means the active tab.
Supported agents
| Agent | Install | Sign in |
|---|---|---|
| Claude Code | npm install -g @anthropic-ai/claude-code | run claude and sign in |
| Codex | npm install -g @openai/codex | codex login |
| opencode | npm install -g opencode-ai | opencode auth login |
| pi | npm install -g @mariozechner/pi-coding-agent | run pi and configure a provider API key |
omps ai shows the detected agents and lets you pick one, and omps ai off turns AI off. Codex also needs settings in ~/.codex/config.toml, described in Grenton and Codex. Asking about ChatGPT? See Grenton and ChatGPT.
Safety and limits
- While the agent runs, the editor is read-only until it finishes.
- The agent can't deploy to a CLU: scripts can't be executed or sent from the working folder. You send them from Object Manager.
- Changes to system files such as
system.xmlmade without theompscommands don't reach the.omp. - Every change lands in a local git history, and
omps restorerolls back to an earlier version. - The agent runs under your account and within your limits. Its provider processes the files it reads under its own terms, so check them before working with client data.
Common questions
Does OMP Studio supply an AI model?
No. You use your own agent and your own account with its provider.
Does AI work in the demo?
Only as an example. The demo shows a sample answer and leaves the script unchanged, because the agent needs a connected project and runs on your computer.
Can the agent test a script?
Not on an installation. It can check it with omps lint and read the code, but it can't run it on a CLU.
Can I change the agent later?
Yes. omps ai shows the choice, omps ai codex sets a specific agent, and omps ai reset clears the choice.