Coding agents
What a coding agent (Claude Code, Codex, Cursor, Gemini CLI, Elyra Workspace…) needs to work well on an Elyra app, the way Laravel Boost does it for Laravel: guidelines it reads up front, skills it loads when a task needs them, and an MCP server that answers questions about the app.
This is about agents writing the app. An agent using the app, calling its commands as tools, is the app as an MCP server.
In two lines
rata ai:install # AGENTS.md block, skills, and `rata mcp dev` in .mcp.json
rata ai:update # refresh them after upgrading rata
What ai:install writes
-
Guidelines in
AGENTS.md, between<elyra-framework-guidelines>and</elyra-framework-guidelines>: commands and abilities, middleware, the container, models and migrations, live queries,rata codegenafter a type changes, whichratagenerator to use, and the checks. Only the block is rata's. What you write around it stays, andai:updatereplaces only the block. ACLAUDE.mdgets the same block, unless it importsAGENTS.md(@AGENTS.md). -
Skills in
.agents/skills/and.claude/skills/, in the Agent Skills format, loaded only when they apply:Skill For elyra-commandscommands, Ctx, validation, abilities, middleware, events,TestAppelyra-models-and-migrations#[derive(Model)], the query builder, relations, casts, factories, SQL and Rust migrationselyra-resourcesrata make:resource, the registries, changing a generated resourceelyra-live-queries#[command(live)],live.*,depends_on/invalidate, testingelyra-laravel-backendBackend,Auth, Laravel's answers, broadcasting, the outbox, notificationselyra-uiscreens from @elyra/ui: its components on the--elyra-*tokens, that know the live queries, Laravel's validation errors and the user's abilitiesA skill file ends with rata's marker. One without it is yours: rata says so and leaves it, so delete it to get the framework's back.
-
The
elyra-frameworkserver in.mcp.json:rata mcp dev, next to the servers already there (Laravel Boost's, say). Claude Code reads the file, and Elyra Workspace gives its servers to every agent once you allow it.
ai:update refreshes only what's there: a removed skill or server stays
removed. Run it after upgrading rata, so the guidelines match the framework.
rata mcp dev
An MCP server over stdio for the agent working on the code. The tools below only read: nothing is migrated, run or written, and a SQLite database is opened read-only. The running app's tools look at the debug build that's open, and one of them acts in it.
| Tool | What it answers |
|---|---|
app_info |
the crate and its version, the framework's version and features, the frontend and bindings paths, the database driver (never the URL), every #[command] with live, can and middleware, every #[derive(Model)] with its table, the resources |
database_schema |
the tables, and each column's type, null, default and key (table for one) |
migration_status |
the SQL and Rust migrations, applied (with their batch) or pending, against _elyra_migrations, without creating it |
last_error |
the newest ERROR in the app's log, with the entries before it |
read_log_entries |
the last entries (count, at most 200), from a level up |
list_commands |
rata's own commands and flags |
search_docs |
these guides, for this version, embedded in rata: the best sections with their file and heading |
app_check |
rata check: what's wrong between the commands, the grants, the assistant, MCP and the bindings, each with how to fix it |
- The code is read with
syn, asmake:resourcereads a model, soapp_infoneeds no build. - The log is the one
LogProviderwrites (to_app_dir("My App")→<config dir>/my-app/app.log, orto_path(..)), found from the source, then from the bundle name and the crate. Rotatedapp.log.1is read too. Givepathwhen it's elsewhere. - The database comes from
[database].urlorDATABASE_URL, as forrata migrate. A SQLite file that isn't there isn't created. - Protocol: clients that open with
initialize(2025-11-25, 2025-06-18, 2025-03-26), and 2026-07-28 requests carrying their version in_meta.
The running app
While the app runs in a debug build (rata dev, or cargo run), rata mcp dev can see its windows and act in them (RFC 0026), so the agent looks at
what it built instead of asking:
| Tool | What it does |
|---|---|
app_windows |
the open windows: label, title, size in CSS pixels, shown or hidden, focused, the tray's popover, and a matrix frame's look and limits |
window_snapshot |
the window as its accessibility tree in text, with a ref on what can be acted on, the route and title, the page's console errors since the last snapshot, and the window's live queries with their arguments |
window_screenshot |
a PNG of the window, at most 1280 CSS pixels wide |
matrix_screenshot |
a picture of each of the matrix's frames, each under its name and look, at most 640 CSS pixels wide; the frames are opened on the focused window's route when they aren't open |
window_act |
click, type, press, select, scroll or navigate, then the page after it has settled, as a new snapshot |
app_calls |
the window's calls to the app's commands, newest first, as the inspector keeps them |
ui_tasks |
what the developer pointed at and asked to change, not yet done: the note, the elements with the Svelte file and line that drew each, the live queries, the frame, and a picture of the selection |
ui_task_done |
{ id, summary }: marks a task done; the app shows the summary in the window it came from |
window is a label from app_windows; without one, the focused window.
route: /customers
title: "CRM"
- banner
- button "New customer" [ref=e1]
- navigation "Main"
- link "Customers" [current] [ref=e2]
- main
- searchbox "Search" value="acme" [ref=e3]
- table "Customers" (3 rows)
- row "Name Open invoices" [ref=e4]
- row "Acme AS 3" [ref=e5]
- The snapshot is the browser's roles and accessible names: what
aria-*, labels and the elements say.@elyra/ui's components are named and stated already. Hidden things aren't in it; a password's value is•••. A long list shows its first 50 items and how many more; a snapshot stops at 1,000 lines. A ref holds until the next snapshot. Under the tree,showinglists the window's live queries, newest first, with their arguments: what it shows in the app's own words, as the in-app assistant's note of the window has it (RFC 0013). - Acting is the page's own events (
click(),inputandchange, a key'skeydownandkeyup), not the OS's: no permission prompt, and the developer's cursor and keyboard stay theirs. A key's default action isn't the browser's, except Enter in a form's field, which submits it. Then it waits until no call to the app is in flight, up to two seconds. - It acts on the dev build's real data, as the developer would: a Delete deletes.
- The picture is the webview's own (
takeSnapshoton macOS,CapturePreviewon Windows,get_snapshoton Linux), scaled to CSS pixels. A hidden window has none. - How it's reached: the debug build opens a dev endpoint, a
0600socket in the app's folder (~/Library/Application Support/<app>/dev.sockon macOS,$XDG_CONFIG_HOME/<app>/on Linux; loopback on Windows), with a challenge-response on the per-install token, as the MCP endpoint. rata finds it from the app'sAboutInfoname in the source, then[bundle].nameand the crate. A release build has none of it: no endpoint, and no script in the page.
The Laravel half
When the app is the desktop half of a Laravel app
(a Laravel backend), the Composer package
elyracode/elyra-backend in this repository gives the
Laravel app's agents the same knowledge from the other side. Laravel Boost
picks up its guidelines and its elyra-desktop-backend skill: what the
desktop expects of the API (the Sanctum token routes, 422s per field, the
status codes, Idempotency-Key, If-Unmodified-Since, broadcasting,
notifications), and that changing an API resource means changing the
desktop's types and running rata codegen. The package also has the routes
and the idempotency middleware.
A project with both halves then gives an agent both servers: Boost's
laravel-boost for the API, and elyra-framework for the desktop.
Related
- AI agents (MCP) — the app's own commands as tools
- Ratatosk CLI · A Laravel backend