ML.ai

Four subagents, scoped to the job you hand them

Choose a subagent for the composer and it stays selected until you remove or replace it. Each one is built for a different kind of work, and only general carries out changes end to end.

ML.ai Settings
GeneralModelsAgentsSkillsMCP serversPermissionsUsage

Auto routing

Each step goes to the model that fits it

Agents

Pick a subagent and it stays selected until you swap it. Only general carries out changes end to end.

@explore · Where is the refresh token rotated?

› Searched refreshToken · 14 matches

› Read src/auth/session.ts, src/auth/rotate.ts

› Answered · 0 files changed

@exploreAsk ML.ai... @ to delegate

AutoBuild

Who subagents are for

Developers who want finding, planning and editing to be separate acts, each handled by a subagent scoped to that job.

  • Developers new to a codebase

    Ask @explore how something works and get an answer with nothing on disk changed.

  • Anyone facing a big or unfamiliar change

    Let architect name the critical files, trade-offs and steps before any edit.

  • Developers with a well-defined task

    Hand general a multi-step edit or refactor that it carries out inside the project.

How it works

Type @ in the composer to pick a subagent. It stays selected until you remove or replace it, and each one can touch only what its job needs.

general carries out the work

For a task you can describe precisely, such as a multi-step edit or a refactor. It edits files and runs commands inside the project only, makes safe, reversible decisions on its own, and hands control back after one turn.

explore finds and explains

A read-only search specialist. It reads files, greps, globs and fetches, and changes nothing while doing it. You can tell it how hard to look, from quick to very thorough.

architect designs the approach

For a change big or unfamiliar enough that the order of work is not obvious. It reads the code and returns the critical files, the trade-offs and a step-by-step plan, without editing or writing anything.

planSubAgent writes the plan down

The same investigation as architect, with the finished plan written to a markdown file for you to review and approve. It can change nothing except that plan file.

Asking general versus asking @explore

Asking general

general can answer a look-up, but it can also edit files and run commands, so even a question carries the reach of a tool that could act.

Asking @explore

The same search and the same answer, from an agent that cannot edit or write. Nothing on disk changes, and there is no permission prompt because there is nothing to approve.

How to look with @explore and change with general

Finding out and changing things stay two separate acts. Here is one question answered read-only, then the edit handed off.

1Type @explore and your question@explore Find every place this repo reads process.env.DATABASE_URL and summarize the pattern.
2The @-mention routes it to exploreThe request goes straight to explore, whatever mode the session is in. explore cannot edit anything, so this is safe mid-conversation, even in Build mode.
3Read the summary it reports backexplore greps, globs and reads across the project, then summarizes the pattern. Nothing on disk changed, and no permission prompt appeared.
4Hand the change to generalFor the part that should change files, switch to general or the session’s default agent in Build mode. Each edit is its own, separately scoped step.

Common subagent problems and fixes

What trips people up when they first pick a subagent.

A vague task handed to general

general cannot ask questions mid-task, so a task that still needs clarifying comes back built on its best guess.

How ML.ai handles it

Scope it first with @explore or @architect, then hand general a task that is already well defined.

A new subagent missing from the menu

A custom subagent you just created does not appear in the @ picker.

How ML.ai handles it

Agent definitions are read at startup: run ML.ai: Restart Engine and it appears in the picker and in Settings → Agents.

Expecting general to edit in Plan mode

You select general inside a Plan-mode session and wait for it to change files.

How ML.ai handles it

general’s project-only scope sits under the session’s mode, not above it, so Plan still denies edits. Switch the session to Build to apply changes.

ML.ai

Explorer

src/auth/registration.tssession.tsvalidate.tsapi/search.tstests/registration.test.tssession.test.tspackage.jsontsconfig.json

Fix the registration validation bug and run the relevant tests.

plan.md

Fix registration validation

  1. 1.Reproduce: an empty email passes signupSchema
  2. 2.Tighten email and password rules in src/auth/validate.ts
  3. 3.Add empty, whitespace and short password cases to tests
  4. 4.Run pnpm test registration
Edit refused in Plan modeInvestigate and describe the fix instead: switch to Build to apply it.

Ask ML.ai...

Plan mode

Edit and write tools switched off for the turn, and selecting general does not turn them back on.

ML.ai
New sessionAutomationsReview

Sessions

Explain how auth refresh worksnowAdd input validation to the signup formFind and fix the failing test40sRotate refresh tokens on use1hUpgrade to React 192d
acme/storefrontmain

Explain how auth refresh works

refresh() in src/auth/session.ts rotates the token pair 60 seconds before expiry.

session.tslines 41-42

41if (expiresAt - now() < 60_000)42  return rotate(tokens)

Find and fix the failing test

Background tasks

Running

Add input validation to the signup formgeneral · write allowed

Read SignupForm.tsx, validate.ts

Ask ML.ai...↑

Background runs

Delegate a job to a subagent in its own session, with its write capability stated up front.

FAQs

Can I write my own subagent?

Yes, but you describe it rather than write the definition by hand. Ask ML.ai in plain language, e.g. "Create a subagent that reviews pull requests for security issues," and its bundled create-subagent skill composes a full definition, covering scope, instructions, and allowed tools, written to .opencode/agent/ in your project. You can open and edit that file afterward if it got something wrong.

Why doesn’t my new subagent show up in the @ menu?

Agent definitions are only read at engine startup. Run ML.ai: Restart Engine from the Command Palette after creating one, and it will appear in both the @ picker and Settings → Agents.

Does @explore ever ask for permission?

No. explore is read-only by construction: it searches, greps, globs, and fetches, and cannot edit or write, so there is never an operation for a permission prompt to gate.

If I select general while the session is in Plan mode, does it start editing?

No. general’s own scope (project-only, but able to edit and run commands) sits underneath the session’s standing mode, not above it. A Plan-mode session with general selected still has the edit and write tools denied at the mode layer.

Hand each job to the subagent built for it

Look with @explore, plan with architect, and let general make the change, each scoped to what the job needs.