AI Tools in Workspace
You can use the latest AI-based tools to jump start your projects in Liferay Workspace. Whether you prefer to code with Claude, Copilot, Cursor, Gemini, Windsurf, or any other AI assistant, the context files provided in Workspace point your assistant in the right direction so you can get your Liferay projects up and running quickly.
Prerequisites
-
Ensure you’re running Blade 8.0 or higher before you create your workspace. To upgrade Blade, run
blade update -
Create a Liferay Workspace using the latest version of Blade:
blade init ai-workspace -
Blade prompts for your Liferay version. Provide it, and your workspace is created!
-
If you are using an existing Workspace, copy the hidden folders from your newly generated Workspace (
.claude,.cursor,.gemini,.github,.windsurf, and.workspace-rules) to your existing Workspace. -
Follow the instructions for your chosen AI agent to install it on your system. For example, Claude, Copilot, and Gemini have CLI tools that must be installed and configured with your API key. Cursor and Windsurf have the agents embedded in their respective editors.
AI Rules
Liferay Workspace includes rules written in Markdown to guide AIs in creating Liferay projects. You can find these rules in hidden folders inside Workspace.

You can use any AI with Workspace, but Liferay provides specific configuration folders for Claude, Cursor, Gemini, GitHub Copilot, and Windsurf. If you use these tools, the rules should be detected and used automatically. If you use another AI, such as one manually downloaded from Ollama, you can point it to the .workspace-rules folder with a prompt like this:
Using the rules in the current working directory's `.workspace-rules` folder, create an object client extension project that....
The rules are important, because they instruct AIs to follow Liferay best practices:
- Agents learn the structure of a Liferay Workspace.
- Agents learn how to connect to and query the Liferay MCP server.
- Agents are pointed at Liferay Learn for documentation, rather than their generic, potentially outdated training data.
- Agents are told to suggest modern Liferay best practices, such as objects, fragments, and client extensions.
- Agents explain why they recommend one path over another based on Liferay best practices.
- Requests to modify the Liferay core (e.g., JSP overrides) trigger a mandatory warning about upgrades, along with a modern alternative substitute.
- Agents show first time users how to set up a Workspace, download a bundle, and start the bundle using Blade.
- Agents can create a functional “Hello World” project in the
/client-extensionsfolder with no boilerplate code. - Agents provide the exact
bladecommand for successfully building and deploying the project. - Agents guide the developer in viewing and interacting with frontend client extensions in a running Liferay instance.
Using AI to Generate Projects and Code
When your environment is set up, all that’s necessary is to use your AI agent from the workspace you generated. After you submit your prompt, your AI agent reads the rules that point it to the best strategy and information for your Liferay projects.
Your AI agent should report its analysis by confirming it is using the rules. If it does not, you can point it to the appropriate rules directory using a prompt similar to what you’d use for a local agent (see above).

It’s important to note that AI agents are no substitute for developers. They can help bootstrap new projects to get you up and running faster, but the code they generate should be reviewed and refined by experienced developers before being used in production. AI agents’ main benefit is to make developers more efficient, and they are excellent at that.
Happy prompting!