AI Agent Setup
This page shows how to set up a Jmix project for an AI coding agent.
The agent works in a project that is open in Jmix Studio and uses the IDE to check the code it writes. You use Studio to check what the agent did, run the application and make your own changes.
Setup Steps
-
Install the AI coding agent that you want to use, for example Claude Code, Codex or OpenCode.
-
Install Studio and the JDK as described in the Setup section.
-
Enable the MCP server in IntelliJ IDEA: open Settings → Tools → MCP Server and select Enable MCP Server.
-
Create a project with the Jmix Agent Toolkit in one of the following ways.
-
With Studio:
-
Create a project as described in Creating New Project.
-
Run the AI Agents Toolkit action from the Jmix tool window → Settings and follow the wizard.
-
-
With Jmix CLI:
-
Install Jmix CLI and create a project as described in Using Jmix CLI. The CLI adds the toolkit to the project by default.
-
Open the project in Studio as described in Opening Existing Project.
-
-
-
Run the agent in the project folder and make sure Jmix skills and MCP servers are available to the agent.
-
Enter the
/skillscommand and check thatjmix*skills are available. -
Enter the
/mcpcommand and check that the following MCP servers are connected:-
jetbrains -
context7,jmix-docs(at least one of them; both are used to get Jmix documentation) -
playwright
-
-
Your First Request
Describe the task in Jmix terms: entities, attributes, views, roles. A small first task looks like this:
Create a Customer entity with the name, email and phone attributes.
The name is required. Create list and detail views for Customer
and add the list view to the main menu.
For a larger task, ask the agent to write a plan first. Review the plan, then ask the agent to implement it.
Look at the agent’s changes in Studio:
-
The new entity and views appear in the Jmix tool window. Open them in the entity designer and the view designer to check the attributes and the layout.
-
Run the application as described in Starting Application.
-
Log in to the application and open the new view.
If something is wrong, tell the agent what you see and ask it to fix the problem, or change the code yourself in Studio.
Jmix Agent Toolkit
The Jmix Agent Toolkit helps an AI agent follow Jmix patterns, architecture, and best practices. Its source code is available on GitHub.
The toolkit adds the following to your project:
-
Agent skills for Jmix features: entities, views, data access, and more. The skills are installed in
.agents/skillsand linked into.claude/skills. -
A short block in
AGENTS.mdthat points the agent to the Jmix skills. For Claude Code, the toolkit also adds aCLAUDE.mdfile that importsAGENTS.md. -
Configuration of MCP servers:
-
jetbrainslets the agent use the code analysis and inspections of IntelliJ IDEA. To use it, enable the MCP server in IntelliJ IDEA: open Settings → Tools → MCP Server and select Enable MCP Server. Keep IntelliJ IDEA running with the project open while the agent works. -
context7provides the agent documentation and code examples of libraries, including Jmix, from their official sources. -
jmix-docs lets the agent search the Jmix documentation, Java API and UI samples. Its Streamable HTTP endpoint is available at
https://docs-mcp.jmix.io/mcp. -
playwrightlets the agent check the running application in a web browser.
-
Use the AI Agents Toolkit action in Studio or the CLI script to install the toolkit. Projects created with Jmix CLI include it by default.