> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mka1.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Specialized agents

> Use a focused agent for investigation or review, and define reusable roles with their own tools and instructions.

export const ScreenshotCrop = ({src, alt, width, height, x = 0, y = 0, cropWidth = width, cropHeight = height, maxWidth = "100%"}) => <div className="not-prose" style={{
  position: "relative",
  overflow: "hidden",
  width: "100%",
  maxWidth,
  margin: "0 auto",
  aspectRatio: `${cropWidth} / ${cropHeight}`
}}>
    <img src={src} alt={alt} width={width} height={height} style={{
  position: "absolute",
  display: "block",
  margin: 0,
  maxWidth: "none",
  width: `${width / cropWidth * 100}%`,
  height: "auto",
  left: `${-x / cropWidth * 100}%`,
  top: `${-y / cropHeight * 100}%`
}} />
  </div>;

A specialized agent gives part of a coding task a defined role, such as reviewing a diff or investigating a call path. Its description tells the main agent when to delegate to it; its instructions explain how to perform that work. Use a focused role when the same kind of investigation or review recurs across tasks.

## Use an available agent

Open **Settings → Agents** to inspect the available definitions. The list includes preset, personal, project, and installed-package agents. Search by name or description, filter by **All** or **Enabled**, and check the switch on the agent you want to use.

In a Code session, type `@` and select the intended agent from the suggestions. Give it a bounded task and specify what its result should contain:

> Review the checkout quantity change. Check the calculation, tests, and unchanged public function signature. Report concrete findings with file references. Do not modify files.

Read the returned findings before requesting implementation changes. A reviewer can identify a missing test, but the test still needs to be written and run. Keep [diff review and verification](/docs/mka1-code/review-changes) part of the main workflow.

<Frame caption="Available agent roles define a task, a model choice, and a set of tools.">
  <ScreenshotCrop src="/images/mka1-code/guides/agents.jpg" alt="Review, testing, and implementation agent cards" width={2720} height={1660} x={860} y={315} cropWidth={715} cropHeight={685} maxWidth="520px" />
</Frame>

## Create a reusable role

Choose **New agent** in **Settings → Agents**. You can also duplicate an existing definition as a starting point.

| Field | How to use it |
| - | - |
| Name | A lowercase identifier such as `checkout-review`, using letters, numbers, and hyphen-separated words. |
| Description | Explain when this agent should be selected. |
| Model | Inherit the main agent's model or select one available to your account. |
| Reasoning effort | Inherit or choose a level supported by the selected model when offered. |
| Tool access | Inherit allowed tools or choose a custom subset. |
| Instructions | Define the role, expected evidence, and limits. |
| Advanced limits | Bound model turns and elapsed seconds for a delegated task. |

For a review role, separate its selection description from its working instructions. A useful description is: “Review checkout changes for calculation regressions and missing test cases.” Its instructions could be:

> Inspect the changed calculation and its tests. Check quantities of one and more than one, and look for unintended interface changes. Report each finding with a file reference, the affected behavior, and a suggested test. If the available files do not support a finding, say what you could not verify. Do not edit files.

Use **Custom** tool access to select only the tools the role needs. For inspection-only work, omit edit tools and command execution unless required. Instructions describe behavior; the tool configuration and the parent session's permissions determine the available actions. A custom tool set cannot grant more access than the main agent has.

Choose **Save agent**, ensure the definition is enabled, and test it on a small, known change. Refine the description if it is selected for the wrong kind of work; refine the instructions if the result lacks the evidence you need.

## Manage definitions and scope

The source determines which parts of an agent you can edit. Personal agents can be edited, duplicated, or deleted. A changed preset can be restored to its default. An installed package may direct you to package management for changes.

Deleting a personal definition asks for confirmation and retains earlier results. Disabling an agent controls whether it can be used; it does not remove its past work from the conversation.

Specialized agents do not create separate Git working copies merely by having different roles. If independent tasks need to modify the repository at the same time, choose [separate worktrees](/docs/mka1-code/workspaces). For reusable procedures without a separate agent role, see [skills and plugins](/docs/mka1-code/extensions).
