Replit Agent (flagship Agent 3 in 2026) is an autonomous AI software engineer inside Replit: you describe an app in plain language and it plans, writes code across many files, provisions a database, wires up auth, tests itself in a real browser, and deploys to a live URL. The prompts that land are compact PRDs (product requirement docs), not one-liners.
This is the whole workflow on one page: the 7 parts of a build prompt, when to use Plan Mode vs Build Mode vs Assistant, the native primitives worth naming, the exact debugging and rollback phrases that keep a run on track, a do/don't list, and 6 copy-paste prompts. New to the pattern? Start with the full guide to prompting Replit Agent for full-stack apps, grab reusable skeletons from the prompt templates, or browse the 40 best Replit Agent prompts.
The 7 PRD prompt parts
A strong build prompt names, briefly, all seven of these. Skip a part and the Agent guesses — usually wrong, and usually while burning effort.
| Part | What to write |
|---|---|
| 1. What to build | One-line app description. "A team task manager with a kanban board." |
| 2. Who it's for | The user and their job-to-be-done. "Small agency teams tracking client work." |
| 3. Core user flows | Plain-language steps. "Sign up → create a project → add tasks → invite a teammate → see a dashboard." |
| 4. Data model | Main entities and key fields. "Users, Projects, Tasks(title, status, due date, assignee)." |
| 5. Stack / integrations | "You choose the stack" or name it; call native primitives — Replit Auth, Postgres, Secrets, a deployment type, integrations. |
| 6. Design / style | "Clean and modern, brand color #4F46E5, mobile-responsive, dark mode." |
| 7. Scope guardrails | Must-haves for THIS pass + explicit out of scope. "Build auth and tasks; don't build billing or notifications yet." |
Part 7 is what keeps an autonomous run from wandering. Always state what is out of scope for the current pass.
Plan Mode vs Build Mode vs Assistant
Pick the right tool before you type. Plan Mode thinks first, Build Mode edits code, and Assistant handles surgical one-off edits.
| Tool | What it does | When to use it |
|---|---|---|
| Plan Mode | Proposes an approach, asks clarifying questions, and WAITS for approval; produces a Task Plan (What & Why, Done looks like, Out of scope, numbered steps). Changes no files. | Anything non-trivial — a first build, a risky refactor, a multi-step feature. Approve the plan, then build. |
| Build Mode | Edits and creates code, running the plan; auto-saves a checkpoint after each significant change; self-tests in a real browser. | Once the plan is approved, or for small well-defined changes you're confident about. |
| Replit Assistant | Lighter tool for small, targeted edits and quick questions on the current file/component. | Rename a variable, tweak one component, fix a small style, or ask "what does this line do?" |
Native primitives to name
Naming Replit's built-ins tells the Agent exactly what to wire up instead of hand-rolling it. Mention the ones your app actually needs.
| Primitive | What it is | When to mention it |
|---|---|---|
| Replit Auth | Login and user accounts with no config. | Any app with sign-in, per-user data, or roles. "Use Replit Auth for login." |
| Database (Postgres) | Managed Neon Postgres, provisioned for you. | Any app that stores data. "Use the built-in Postgres database." |
| Secrets | Encrypted store for API keys and tokens. | Any integration or external API. "Put the API key in Secrets." |
| Deployment: Autoscale | Scales with traffic; scales to zero when idle. | Web apps and APIs with variable traffic. "Deploy as an Autoscale deployment." |
| Deployment: Reserved VM | Always-on dedicated machine. | Long-running processes, websockets, background workers. "Deploy on a Reserved VM." |
| Deployment: Static | Static file hosting on a CDN. | Landing pages and static sites with no backend. "Deploy as a Static site." |
| Deployment: Scheduled | Runs a job on a cron schedule. | Cron jobs, digests, syncs. "Run it as a Scheduled deployment every day at 8am." |
| Integrations (OpenInt) | 160+ connectors — Stripe, Twilio, Slack, Google Sheets, SendGrid, OpenAI, and more. | Connecting a third-party service. "Add the Stripe integration; keys go in Secrets." |
Debugging & rollback phrases that work
When something breaks, don't just say "fix it." These phrases give the Agent the context and the guardrails to fix the root cause without spiraling.
| Situation | Phrase to use |
|---|---|
| Reporting a bug | "Here's the exact error: [paste error]. Expected: [X]. Actual: [Y]. Find the root cause before changing any code." |
| Stuck in a debugging loop | "Stop. Roll back to the last working checkpoint. Then fix only [one thing], nothing else." |
| Preventing regressions | "After you fix it, add a test that covers this case and explain what caused the bug." |
| A fix made things worse | "That made it worse — open History and roll back to the checkpoint before your last change." |
| Won't deploy | "The deployment fails with [paste log]. Diagnose the build/deploy config before editing app code." |
| Risky refactor | "Switch to Plan Mode and propose the refactor first; don't change files until I approve." |
| Pointing at a spot | "See the Canvas annotation on the running app — fix the layout there, and don't touch the rest of the page." |
Do & don't
Effort-based billing rewards tight prompts (a simple change is roughly under $0.25; complex builds cost more). Scope discipline is both cheaper and more reliable.
| Do | Don't |
|---|---|
| Write a 7-part PRD with explicit out-of-scope. | Send a vague one-liner like "build me a CRM." |
| Build one feature per prompt, test, then add the next. | Ask for every feature at once in one giant prompt. |
| Run Plan Mode first for anything non-trivial and approve the plan. | Let Build Mode loose on a big change with no plan. |
| State the expected behavior so the Agent can self-test the flow. | Say "make it work" without describing what "working" means. |
| Paste the exact error, file, and expected-vs-actual when debugging. | Say "it's broken, fix it" with no error text. |
| Roll back to a good checkpoint when a fix spirals. | Pile more fixes onto a broken state and burn effort. |
| Name native primitives (Auth, Postgres, Secrets, deployment type). | Make the Agent hand-roll auth or a database from scratch. |
| Add context — screenshots, sample data, Canvas annotations. | Describe a visual bug in words when a screenshot is faster. |
Example copy-paste prompts
Six ready prompts covering the moves you'll make most. Fill the [bracketed placeholders] and paste into the Agent composer.
1. First-build PRD (run in Plan Mode)
Run this in Plan Mode and wait for my approval before building.
Build: [a team task manager with a kanban board].
For: [small agency teams tracking client work].
Core flows: sign up → create a project → add tasks → drag a task between columns → invite a teammate → see a dashboard.
Data model: Users; Projects(name, owner); Tasks(title, description, status, due date, assignee, project).
Stack: you choose a sensible stack. Use Replit Auth for login and the built-in Postgres database.
Design: clean and modern, brand color [#4F46E5], mobile-responsive, light and dark mode.
Scope this pass: auth, projects, tasks, the kanban board, and a basic dashboard. Out of scope: billing, notifications, file uploads — do not build these yet.
Test the sign up → create project → add task flow yourself before finishing.Why it works: All 7 PRD parts are present with an explicit out-of-scope, and Plan Mode forces approval before any code changes.
2. Add one feature (iterate)
Add ONE feature: [due-date reminders on the task list].
Behavior: tasks due today show a red badge; overdue tasks sort to the top of their column.
Don't change: the existing data model, auth, or the dashboard.
Keep it scoped to this one feature. When done, test that a task dated today shows the badge and an overdue task sorts up.Best for: Building on a working app without letting the Agent touch unrelated code.
3. Debug from an error
There's a bug. Here's the exact error:
[paste the full error / stack trace]
Steps to reproduce: [what I clicked].
Expected: [what should happen]. Actual: [what happens].
Find the root cause before changing any code, then make the smallest fix that addresses it. After fixing, add a test covering this case and tell me in one line what caused it.Why it works: Exact error plus expected-vs-actual plus "root cause first" keeps the Agent from guess-patching and looping.
4. Add an integration (Secrets)
Add [Stripe] checkout using the Stripe integration.
Flow: on the pricing page, clicking "Upgrade" starts a Stripe Checkout session for the [Pro] plan and returns the user to a success page that marks their account as paid.
Put the Stripe keys in Secrets — never hardcode them.
Done looks like: I can complete a purchase in Stripe test mode and see the account flip to paid. Don't touch unrelated pages.Best for: Wiring a third-party service cleanly, with keys in Secrets and a clear "done" test.
5. Escape a debugging loop (rollback)
Stop making changes — the last few edits made things worse. Open History and roll back to the last checkpoint where [the login flow worked].
Then, from that clean state, fix ONLY this: [describe the single issue]. Do not refactor anything else. If you're unsure of the cause, switch to Plan Mode and propose a fix before editing.Why it works: Rolling back to a known-good checkpoint and narrowing to one issue is the fastest, cheapest way out of a spiral.
6. Deploy
Deploy this app as an [Autoscale] deployment.
Before deploying: make sure all required environment values are in Secrets, run the build, and confirm the app starts cleanly.
If the deploy fails, paste the deploy log and diagnose the build/deploy config before changing app code. Tell me the live URL when it's up.Best for: Shipping to a live URL — name the deployment type (Autoscale for web apps, Static for sites, Scheduled for cron jobs, Reserved VM for always-on).
Frequently Asked Questions
What is Replit Agent?
Replit Agent (flagship Agent 3 in 2026) is an autonomous AI software engineer inside Replit's browser and mobile app. You describe an app in plain language and it plans the work, writes code across many files, provisions a database, wires up auth, tests itself in a real browser, and deploys to a live public URL — with no local setup or DevOps. It supports 50+ languages and frameworks.
How is a Replit Agent prompt different from a ChatGPT prompt?
A Replit Agent prompt is a compact PRD (product requirements document), not a one-line message. Because the Agent builds a running app autonomously across many files, you brief it like a spec: what to build, who it's for, the core user flows, the data model, the stack or integrations, the design, and scope guardrails. Vague prompts produce sprawling apps, so you pin down the scope up front and iterate one feature at a time.
What is the difference between Plan Mode and Build Mode?
Plan Mode makes the Agent think first: it proposes an approach, asks clarifying questions, and waits for your approval before touching any files, producing a Task Plan with What & Why, Done looks like, Out of scope, and numbered build steps. Build Mode (Start Building) actually edits code and creates a checkpoint after each significant change. Use Plan Mode for anything non-trivial, approve the plan, then let it build.
What are checkpoints and can I roll back?
Yes. Replit Agent creates a checkpoint per prompt or significant change. Open History, find a known-good checkpoint, and choose Rollback here to restore that state. This is your safety net when a fix makes things worse — roll back to the last working checkpoint, scope your prompt down, and try again rather than piling more changes on a broken app.
How much does Replit Agent cost?
Billing is effort-based: a small change is roughly under $0.25, while a complex build or a large refactor costs more. Tight, scoped prompts are cheaper and avoid runaway debugging loops that burn effort. Running Plan Mode first, building one feature at a time, and rolling back instead of fighting a broken state all keep spend down.
Do I need to know how to code to use Replit Agent?
No. You describe the app in plain language and the Agent writes, tests, and deploys the code. Knowing a little about data models and user flows helps you write a clearer PRD and review the result, but you don't need to write code yourself. The better your prompt describes the flows, data, and scope, the closer the first build lands.
When should I use Agent instead of Replit Assistant?
Use the Agent to build a new app or make changes that span many files. Use Replit Assistant for small, targeted edits and quick questions — renaming a variable, tweaking one component, or explaining a line of code. Assistant is the lighter, cheaper tool for surgical work; Agent is for building and larger multi-file changes.
How do I stop Replit Agent from breaking my app or getting stuck in a debugging loop?
Keep every prompt scoped to one feature or one fix, and state the expected behavior so the Agent can self-test it. For bugs, paste the exact error and expected-vs-actual, ask it to find the root cause before editing, and have it add a test so the bug doesn't return. If a fix makes things worse, roll back to the last good checkpoint, narrow the scope, and use Plan Mode for anything risky.