Skip to main content
Performance Agent reviews your project’s source code and logs to find concrete, fixable problems that make your app slow. Each finding comes with a plain-language summary, a severity, and a recommended fix that Agent can apply for you.

What Performance Agent finds

Performance Agent looks for two types of issues. Each type appears as its own group in the results.
  • Latency: parts of your app that make visitors wait. For example, a page might do slow work one step at a time instead of all at once, or repeat the same work on every visit.
  • Data layer: database problems such as N+1 queries, missing indexes, and loading more data than the page needs.
Performance Agent only reports and fixes issues it can tie to your code. It doesn’t change your machine size or other deployment settings. To give your app more power, see Machine configuration.

Before you start

Performance Agent requires:
  • A paid plan. Performance Agent is available to builders on a paid plan. If you’re on the free plan, the Performance scan card shows an upgrade option.
  • Edit access to the project.
You can scan an app before you publish it. After you publish, Performance Agent can also use your deployment logs to find endpoints that are slow for real visitors. The scan only reads your project. It doesn’t change your code, your database, or your published app. Changes only happen when you choose to fix issues.

Start a scan

1

Open Monitoring

In your project’s Tools pane, open Monitoring under Replit Cloud. Scroll to the Performance scan card.
2

Run a scan

Select Run scan with Agent to scan your whole project with the default settings.To focus the scan, select the arrow next to Run scan with Agent first:
  • Add context (optional): describe the parts of your app you care about, such as “checkout flow and the orders page”.
  • Only scan changes since the last scan: check this box to review only what changed since your previous scan. Performance Agent also rechecks the issues from that scan to see whether they are still present.
Then select Start performance scan.
The Performance scan card with the scan options open, showing an Add context field containing Checkout flow and the orders page, a checked Only scan changes since the last scan box, and a Start performance scan button

Add context or limit the scan to recent changes before starting it

3

Wait for the results

The scan runs as a separate task, so you can keep building. While it runs, the card shows Scan in progress. A scan usually takes a few minutes. Select Go to task to follow along.
You can also ask Agent to start a scan from the chat:

Review the results

When the scan finishes, a Performance scan results card appears in the scan task. It shows how many new issues Performance Agent found, grouped into Latency and Data layer. Expand an issue to read its summary, or select View issue to open the full details, including the affected files and the recommended fix.
The Performance scan results card showing 4 new issues in two groups, Latency and Data layer, each issue with a High or Medium severity label, and Fix later and Fix all issues buttons

The scan results group new issues by type and severity

Choose what to do next:
  • Fix all issues: Agent starts a fix task for each group and opens the Monitoring tool so you can track them.
  • Fix later: closes the results without changing anything. The issues stay in the Performance scan card so you can fix them whenever you’re ready.
If the scan finds nothing new, the card says so and you can select Got it.

Fix issues from Monitoring

The Performance scan card in the Monitoring tool keeps track of every open issue, including issues from earlier scans. Issues are grouped into Latency and Data layer, with a Severity and a Status for each one. Expand an issue to read its summary, or select View issue to see the full details.
The Performance scan card in the Monitoring tool with a table of issues grouped under Latency and Data layer, severity labels, and an Unresolved status on each issue. The first Latency issue is expanded to show its summary and a View issue button. Each group has a Fix with Agent button and the header has a Fix all with Agent button

Expand an issue to read its summary, or select View issue for the full details

You can fix issues one group at a time or all at once:
  • Fix with Agent on a group sends every issue in that group to Agent as one task.
  • Fix all with Agent sends every open group to Agent.
Agent works on each fix task in the background, in parallel, so you can keep building. Each issue’s status updates as the work moves along:
  • Fix in progress: Agent is working on the fix. Select Go to task to follow along.
  • Ready for review: the fix is done. Open the task, review the changes, and select Apply changes to main version to add them to your app.
  • Applying fix: Replit is adding the changes to your app.
  • Ready for republish: the fix is in your app but not in your published version yet.
  • Fixed: the fix is live.
The Performance scan card with Latency issues showing Fix in progress, Data layer issues showing Ready for review, and a Go to task button on each group

Issue statuses update as Agent works through each fix task

Republish to apply your fixes

Fixes only reach your visitors after you republish. Once one or more fixes are Ready for republish, a Republish project button appears in the Performance scan card. Select it to publish a new version of your app with the fixes. The status changes to Publishing, then Fixed.
The Performance scan card with every issue marked Ready for republish and a Republish project button in the header next to Run scan with Agent

Select Republish project to put your fixes live

You can also republish from the Publishing tool. See After you publish.
After you republish, run another scan with Only scan changes since the last scan checked. Performance Agent confirms which issues are fixed and checks your recent changes for new ones.

Performance Agent and Monitoring Agent

Both agents live in the Monitoring tool, but they answer different questions:
  • Performance Agent reviews your code when you ask it to, and finds issues that make your app slow, even before visitors notice them.
  • Monitoring Agent watches your published app around the clock and investigates production alerts, such as error spikes and slow responses, as they happen.
Use Performance Agent to find and remove slow code. Use Monitoring Agent to catch problems in production.

Next steps

Monitor your app

Track uptime, request durations, resource usage, and logs for your published app.

Monitoring Agent

Investigate production alerts and attempt fixes automatically.

Machine configuration

Give your app more CPU and memory when it needs more power.

SEO Agent

Run a technical SEO audit and apply one-click fixes.