ML.ai

Change code

Three layers

Schemaschema.prisma
TSAPI routetasks/route.ts
UITaskCard.tsx

One diff

schema.prisma

14dueDate DateTime?

Read every layerWrite it as one change

Build a feature for about 30% less

ML.ai plans on a lighter model and writes the diff on the frontier tier, so the same change costs about 30% less.

You ask: “Add a due date to tasks”

You get: One diff across the schema, the API and the card, waiting for your OK

See how it works

getUserByIdfindUserById

TSuserService.tsdefinition

function findUserById(id)

TSroute.tscaller

await findUserById(id)

TSuseUser.tscaller

useSWR(id, findUserById)

TSuserService.test.tstest

findUserById("u1")

Every reference renamed, in one diff

Rename a function and every caller with it

ML.ai finds every reference first, then changes the definition and its callers in one diff.

You ask: “Rename getUserById everywhere”

You get: The definition and every caller in one diff, none left on the old name

See how it works

uuid 3.4.0uuid 14.0.3

npm installuuid 14.0.3

Fixed ids.js importnamed v4

npm test2 passed

3 files changed: package.json, lockfile, ids.js

Bumped, fixed and tested

Upgrade a package and fix what breaks

ML.ai installs the new version, fixes the code it breaks, and runs your tests.

You ask: “Upgrade uuid to the latest major and run the tests”

You get: uuid 14.0.3, the broken import fixed, 2 tests passing

See how it works
explore maps itarchitect plans itgeneral edits it
Shared interface
2Env variables
3Remove .ini loader

Stage 1 is done. Review it before stage 2.

Modernize old code one stage at a time

explore maps what the old code does, architect plans the stages, and each stage lands as its own diff.

You ask: “Move us off the old .ini config”

You get: A three-stage plan, then stage one as a diff you can review

See how it works

Fix and verify

Trace the stack

TSauth.test.ts
JStokenStore.js
TSsession.ts

Proposed fix

TokenExpiredError: jwt expired

at verifysession.ts:42

at refreshtokenStore.js:18

at login testauth.test.ts:27

refreshes an expired session

Not the line it points atThe real cause, then the fix

Hand ML.ai the error, get the actual cause

Give it a failing test, an error message or a stack trace. It follows the execution path to the cause and proposes a fix you approve.

You ask: “auth.test.ts fails with a 401”

You get: The cause in session.ts, and a fix for you to approve

See how it works

Tests for formatPrice

Wrote test/price.test.js7 tests

npm testscript failed

node --test price.test.js7 passed

Also changing package.jsonAsks first

Written, run, and the failed script explained

Tests that run before you see them

ML.ai reads your test setup, writes the tests, runs them, and tells you what passed and what broke.

You ask: “Write unit tests for formatPrice and run them”

You get: 7 tests, the reason npm test failed, and a question before it touched package.json

See how it works

/review branch feat/export-csv

Blockingroute.js:5

BlockingexportCsv.js:1

BlockingexportCsv.js:6

Read the repo, ran the import0 files changed

Blocking findings first. Nothing was changed.

Code review that reads past the diff

Run /review on a branch or PR. ML.ai reads the code around the change, checks what it finds, and puts Blocking issues first.

You ask: “/review branch feat/export-csv”

You get: Three Blocking findings with file and line. Nothing in the repo changed

See how it works

scanner-output.txt · 2 findings

users.js:4SQL injectionBound parameter

config.js:2Hardcoded keyMoved to env

Rotate the Stripe keyOnly you can

Patched, tested, and the key flagged

Turn scanner findings into tested patches

ML.ai checks who uses the flagged code, patches each finding, and tests the fix.

You ask: “Fix the findings in scanner-output.txt”

You get: Two tested patches, and a reminder that only you can rotate the leaked key

See how it works

Understand and plan

Where is DATABASE_URL read?

TSenv.tsTSdb.tsJScompose.ymlTSusers.tsTSseed.ts
Read once, in env.ts:60 files changed

Answered with the file and line. Nothing changed.

Ask how the code works without changing it

explore searches the project and answers with exact file paths. It has no edit or write tool, so asking is safe.

You ask: “Where is DATABASE_URL read?”

You get: The file and line, and nothing in your repo changed

See how it works

Reads the code

db.prismaTSinvites.tsTSroute.tsemail.tsxTSauth.tsTSperms.ts

Read only. Cannot edit.

plan.md

Waiting for the read to finish

planSubAgent writes only this file

InvestigateWrite the plan, not the code

Plan the change before any file moves

architect returns the key files, the trade-offs and an ordered plan without editing anything. planSubAgent can save the plan to a file.

You ask: “Move sessions from cookies to a server store”

You get: A step-by-step plan and one open question. No file is touched

See how it works

You, in the main session

Asked a quick questionStarted a second taskReviewed a pull request

Background run · fix failing testsSucceeded

Ran the testsFixed format.tsRe-ran the suite

Draft ready: format.ts, +1 −1

Back to you with a draft to review

Hand off a task and keep working

A background run takes a well-defined task into its own session. You pick up a draft diff when it is done.

You ask: “Run the tests and fix what fails”

You get: A draft diff to review, while you kept working on something else

See how it works

Try ML.ai today, or talk to us about what is next

Install the editor agent on your own machine, or book a call to talk through your team’s workloads