How to Write a Replit Prompt (Agent Mode, With an Example)

Replit Agent builds, runs and deploys in the same window. That is also why a sloppy prompt is expensive: the agent does not stop at a suggestion, it starts working.

Short answer: Replit Agent works best with a goal, a stack and a definition of done. Say it must run with a single Run command, ask for the database and the API keys to live in Replit's own tools (Postgres and Secrets), and finish with a deploy step. Split the work into checkpoints so you can roll back to a known-good version instead of arguing with the agent.

Not tried it yet? Open Replit — that is our referral link; your price does not change.

What Replit actually does well

Replit is the closest thing to a complete workshop: editor, terminal, database, hosting and an AI agent in the same browser tab. For a beginner it removes the two hardest steps — getting the project to run and getting it online.

Its Agent is eager. Ask for "a booking system" and it will build one, choose your schema, add a login page and deploy a preview. That is great when your prompt was precise, and painful when it was not, because undoing an agent's decisions costs more than making them well the first time.

Why most Replit prompts fail

The structure Replit Agent responds to

BlockWhat to write
GoalOne paragraph: what the app does and for whom. No feature list yet.
StackSomething that runs in Replit without ceremony: React + Node/Express, or plain Node with Postgres. Say "single Run command".
DataTables and fields, and the rule that migrations run automatically on start.
Screens / endpointsThe pages and the API routes, named.
Secrets"API keys go in Replit Secrets, read from process.env, never hardcoded."
Definition of doneThe short list of things that must work before it reports back — including deploy.
Prompt that makes the agent improvise
Create an app to manage my gym classes with payments and a booking page. Use whatever you think is best.
Prompt with a finish line
Build "ClaseFit", a web app for a small gym to publish classes and take bookings. It must run in Replit with a single Run command and be deployable from here.

Stack:
- React (Vite) front end, Node + Express API in the same project.
- Postgres from Replit's built-in database.
- On start: run pending migrations automatically, then serve the API and the built front end.

Data:
- classes(id, title, coach, weekday, start_time, duration_min, capacity, room)
- bookings(id, class_id, member_name, member_email, status, created_at)
- members(id, name, email, phone)

Screens:
1. Public timetable: week view with the classes, seats left per class, "Book" button.
2. Booking form: name, email, phone; refuses to book a full class.
3. Admin (password protected): create/edit classes, see the booking list per class, cancel a booking.
4. Admin: simple list of members with their booking history.

Rules:
- Store the admin password and any API key in Replit Secrets and read them with process.env. Never hardcode a secret.
- No double booking for the same email in the same class.
- Capacity is respected at the server, not only in the UI.

Definition of done (check all of these before telling me you are finished):
1. The app starts with one Run command with no errors in the console.
2. I can book a class from the public page and see it in the admin list.
3. Booking a full class shows a clear error message.
4. The schema is created automatically on a fresh start.
5. You tell me the exact steps to deploy it.

Work in checkpoints: data + API first, then the public timetable, then the booking form, then the admin. Tell me when each checkpoint is ready.

Replit-specific rules

Checklist before you press send

Or let Inputo write it for you

Inputo asks you the questions Replit Agent would otherwise answer for you — the ones that decide whether the project is usable or a puzzle — and gives you back a complete master prompt, structured for Replit: stack, data, screens, secrets and a definition of done.

Free to start; the full prompt is €5/month, or a one-off €5 for 7 days.

Try Replit →

Referral link: you get Replit, we may earn a commission at no extra cost to you.

Frequently asked questions

Is Replit good for beginners?

Yes — it is one of the few places where a beginner can build, run and publish without installing anything. The catch is that the Agent needs clear instructions, because it acts on what you say rather than asking you questions.

Does Replit Agent cost extra?

Agent work is billed on top of your plan, in effort, so long agent runs are the expensive ones. A precise prompt is not just faster, it is cheaper: fewer checkpoints, fewer rollbacks, fewer rebuilds.

Replit or Lovable?

Lovable if you want the prettiest app with the least effort. Replit if you want the whole workshop — database, terminal, hosting — and are willing to work a bit more precise. Compare them in our builder comparison.

Tell the agent exactly what to build.

Inputo turns your idea into a structured Replit prompt — stack, data, secrets and a definition of done — in about three minutes.