# The Lovable System Prompt, Explained

- Tool: Lovable
- Difficulty: Beginner
- Fix time: ~10 min
- Compatibility: All Lovable projects
- Last updated: September 2026

## TL;DR

The Lovable system prompt is the hidden instruction set Lovable sends to its AI model on every request — it defines the stack (React, Vite, TypeScript, Tailwind, shadcn/ui, Supabase), coding conventions, and safety rules. Lovable does not officially publish the full system prompt, and you cannot edit it directly. What you can control is everything layered on top of it: an AGENTS.md (or CLAUDE.md) file in your project root, the project's Knowledge/instructions, and Plan Mode. Those are where you actually change how the AI behaves.

## What the Lovable system prompt is — and why you can't see or edit the full one

Every time you send a message in Lovable, your prompt is not the only thing the model receives. Lovable prepends a system prompt: a large, hidden block of instructions that tells the model what stack to use (React + Vite + TypeScript + Tailwind + shadcn/ui, with Supabase as the backend), how to structure files, which conventions to follow, and what it must never do (leak secrets, delete the project, ignore safety rules). This is standard for every AI product built on top of a foundation model — the system prompt is how Lovable turns a general model into a focused app builder.

People search for the 'Lovable system prompt' for two different reasons. Some want to read it out of curiosity or to understand how Lovable steers the model. Others assume they need to edit it to change the AI's behavior. Both run into the same wall: Lovable does not officially publish its system prompt, and it is not user-editable. Partial copies circulate online from prompt-extraction attempts, but they are unofficial, change without notice, and are not a reliable basis for building.

The good news is that you almost never need the system prompt itself. Lovable gives you three official, supported layers that sit on top of it and let you change behavior for your project: a root AGENTS.md (or CLAUDE.md) file with persistent instructions, the project's Knowledge/instructions settings, and Plan Mode for reviewing the AI's approach before it writes code. Those layers are where real control lives.

- The system prompt is internal to Lovable and injected server-side on every request — it is not exposed in the editor
- Lovable does not officially publish it, so any copy you find online is unofficial and can be outdated
- It is not user-editable by design, to keep the stack, safety, and cost guardrails consistent
- Most 'I need to change the system prompt' goals are actually solved by project-level instructions (AGENTS.md / Knowledge)
- Plan Mode already exposes the AI's intended approach, which is what most people are really trying to inspect

## Error messages you might see

**"Where do I find / edit the Lovable system prompt?"**

There is no field for it. The system prompt is injected server-side and is not editable. To change behavior, add an AGENTS.md file to your project root or edit the project's Knowledge/instructions.

**"I pasted a leaked system prompt and results got worse"**

Unofficial copies are outdated and can conflict with Lovable's real instructions, confusing the model. Remove it and use a short, project-specific AGENTS.md instead.

**"The AI keeps ignoring an instruction I gave once in chat"**

One-off chat messages are not persistent. Instructions you want applied on every request belong in AGENTS.md or Knowledge, which are re-sent with each prompt.

## Before you start

- A Lovable project (any plan)
- Access to the project's file tree (to add AGENTS.md) and Project settings
- A rough idea of the conventions you want the AI to always follow

## How to fix it

### 1. Add an AGENTS.md file to your project root for persistent instructions

*AGENTS.md (or CLAUDE.md) is re-sent to the AI on every request, so it behaves like your own layer on top of the system prompt*

In the file tree, create a file named AGENTS.md at the project root. Put your standing rules there: preferred patterns, components to reuse, things the AI must never change, and your tech-stack preferences. Keep it short and specific — a focused 30-60 line file works far better than a long essay. This is the single most effective way to steer Lovable's AI without touching the system prompt.

Before:

```
// No project instructions — the AI relies only on Lovable's
// hidden system prompt and guesses at your conventions.
```

After:

```
// AGENTS.md at project root — applied to every prompt automatically.
```

**Expected result:** The AI follows your conventions consistently across chats without you repeating them each time.

### 2. Use the project's Knowledge / instructions for product context

*Knowledge captures what your app is and who it is for, so the AI stops making generic assumptions*

Open Project settings and find the Knowledge (project instructions) section. Describe your product, your users, naming conventions, and any domain rules. Where AGENTS.md is about how to write code, Knowledge is about what you are building and why. Together they replace most of what people think they need the system prompt for.

**Expected result:** Generated features match your product's context and vocabulary instead of generic defaults.

### 3. Use Plan Mode to inspect the AI's approach before it writes code

*Plan Mode surfaces the model's intended interpretation — which is what most people are actually trying to read out of the system prompt*

For any non-trivial change, toggle from Agent Mode to Plan Mode above the chat input and describe the feature. The AI returns a step-by-step plan (files it will create or modify, the approach it will take) without changing any code. Review and correct it, then click Implement the plan. This gives you visibility and control over behavior without needing the system prompt at all.

**Expected result:** You see and can correct the AI's plan before any code is generated, catching misinterpretations early.

### 4. Scope every prompt with action verbs, @file references, and constraints

*Precise prompts override ambiguity far more reliably than trying to reverse-engineer the system prompt*

Start prompts with an action verb (Add, Create, Fix), point at the target with @file syntax, and add a Constraints section listing what must not change. If your project needs highly specific implementations and prompt engineering is becoming a time sink, RapidDev's engineers work directly inside Lovable and have refined these patterns across 600+ projects.

**Expected result:** The AI produces the change you intended, in the files you specified, without unwanted side effects.

## Complete code example

File: `AGENTS.md`

```markdown
# Project instructions for the Lovable AI

## Stack (do not change)
- React + Vite + TypeScript + Tailwind CSS + shadcn/ui
- Supabase for database, auth, and storage
- React Router for routing

## Conventions
- Functional components with TypeScript; keep files under ~150 lines
- Reuse existing shadcn/ui components; do not add new UI libraries
- Use @/ root-relative imports
- All database access goes through the Supabase client; never hardcode secrets

## Always
- Enable Row Level Security on every new table and add matching policies
- List which files you changed after each response
- Ask before deleting or renaming existing files

## Never
- Modify the navigation or theme unless explicitly asked
- Introduce a new state-management library
- Put API keys in code — use Cloud tab -> Secrets
```

## Best practices

- Treat AGENTS.md as your editable layer over the system prompt — keep it short, specific, and version it with the project
- Put how-to-code rules in AGENTS.md and what-we're-building context in Knowledge
- Never paste an unofficial 'leaked' system prompt into your project — it is outdated and conflicts with Lovable's real instructions
- Use Plan Mode to inspect and correct the AI's approach instead of trying to read the hidden prompt
- Repeat critical rules (RLS on every table, no secrets in code) in AGENTS.md so they survive long sessions
- Prefer one clear instruction file over scattering rules across many chat messages that don't persist

## Frequently asked questions

### Can I see the full Lovable system prompt?

Not officially. Lovable injects the system prompt server-side and does not publish it. Copies that circulate online come from extraction attempts, are unofficial, and go out of date — they are not a safe basis for building. Plan Mode is the supported way to see how the AI intends to interpret your request.

### Can I edit or override the Lovable system prompt?

You cannot edit the system prompt itself. You override its effect by adding your own layer: an AGENTS.md file in the project root and the project's Knowledge/instructions. Both are re-sent to the AI on every request, so they reliably change behavior.

### What is the difference between AGENTS.md and the system prompt?

The system prompt is Lovable's hidden, fixed instruction set for the model. AGENTS.md is your project-specific instruction file that Lovable sends on top of it. You can't change the former, but the latter gives you most of the control you actually want.

### Why did results get worse after I pasted a leaked system prompt?

Unofficial system prompts are outdated and can contradict Lovable's real, current instructions, which confuses the model. Delete it and replace it with a short AGENTS.md that states only your project's conventions and constraints.

### Which model does Lovable use under the hood?

Lovable runs its builder on frontier models (Claude Opus-class models for building, with other models available for Cloud AI features). The exact model can change over time; your leverage is the instruction layer you control, not the model or the hidden system prompt.

### What if I can't get Lovable to behave the way I need?

If your project needs precise, repeatable behavior and prompt engineering is eating your time, RapidDev's engineers work directly inside Lovable and have tuned instruction files and prompting patterns across 600+ projects. Book a free consultation at rapidevelopers.com.

---

Source: https://www.rapidevelopers.com/lovable-issues/lovable-system-prompt
© RapidDev — https://www.rapidevelopers.com/lovable-issues/lovable-system-prompt
