Build with AI

Subagents

Focused helpers the AI hands work to inside an agent team. Use the built-in subagents or write your own with their own instructions, tool access and step budget.

A subagent takes one focused job, such as research or review, works on it with its own instructions, then reports back to the main AI. The main AI decides when to hand off a task, based on each subagent's description.

What you can do

  • Rely on the built-in subagents that ship with Lyna.
  • Create your own subagents for jobs you repeat.
  • Limit a subagent to reading only, or give it full access.
  • Set how many steps it can take before it reports back.
  • Give a subagent a task yourself: type @ in the message box and pick it in Agents. See Agent teams.

Built-in subagents

SubagentWhat it does
exploreResearches the codebase, finds files and gathers context.
generalHandles any task: reads and edits files, and runs commands.
verifyChecks that code is correct by reading it and running type checks and lint.
planExplores the codebase and drafts a detailed implementation plan.

Create a subagent

  1. Open Subagents

    Open Settings > AI > Customize, pick the Subagents chip and choose New Subagent.

  2. Fill in the form

    FieldWhat to enter
    NameLowercase letters, numbers and hyphens, for example code-reviewer.
    DescriptionWhen the assistant should use this agent. Write it as a clear trigger.
    Tool accessRead only (reads and searches, changes nothing) or Full access (reads and edits files, runs commands).
    Max stepsThe most tool calls it makes before it reports back.
    System promptThe agent's instructions.
  3. Save

    The subagent is saved as .lyna_ai/agents/<name>.md in your project. The AI can use it from the next message.

The file format

markdown
---
name: reviewer
description: Reviews a change for correctness, routing conventions and test coverage. Use before merging.
toolAccess: read-only
maxSteps: 12
---

You are a code reviewer for a React, TypeScript and Tailwind CSS project.
Report findings as a short list with file and line references. Do not modify files.

If you leave out toolAccess, the agent is read only. If you leave out maxSteps, it gets 15 steps.

Subagents added by plugins show with a Plugin label and are read only. Built-in subagents cannot be edited.

Need help?

Ask the team, read what changed, or learn from the blog.