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

# Agent Personas

> Enable and configure pre-built AI review agents for your repositories

Agent Personas are pre-built AI review agents (formerly "AI Rules") that you turn on per repository. Each persona reviews your pull requests from a focused perspective - maintainability, performance, security, or design - extending CodeAnt's default bug and security detection with a specialized reviewer.

## Pre-built Agents

CodeAnt ships four agents. All are **off** by default, so you choose the perspectives that matter for each repository.

| Agent                     | What it flags                                                                                                    |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| **Maintainability Agent** | Complexity, duplication, naming, and coupling - suggests cleaner, more readable structure                        |
| **Performance Agent**     | Inefficient loops, N+1 queries, memory leaks, costly allocations, and hot paths - recommends faster, leaner code |
| **Pentesting Agent**      | Injection, broken auth, exposed secrets, SSRF, and weak crypto - explains the attack and the fix                 |
| **Design Critique Agent** | UI/UX quality, accessibility, visual hierarchy, spacing, responsiveness, and design-system consistency           |

## Enabling an Agent

Navigate to your Dashboard settings:

1. Go to [app.codeant.ai/x/settings/ai-rules](https://app.codeant.ai/x/settings/ai-rules)
2. Under **CodeAnt-defined Agents**, find the agent you want
3. Toggle the agent **on**
4. Configure its options (see below) and click **Save**

Each agent shows a status of **Active**, **Configuring**, or **Off**, and a counter at the top tracks how many of the four agents are active for the repository.

## Configuring an Agent

### Reporting Threshold

Choose how selective the agent is. A **lower** threshold surfaces more findings (including minor nits); a **higher** threshold reports only the most serious issues:

| Threshold  | Behavior                                                                                    |
| ---------- | ------------------------------------------------------------------------------------------- |
| **Low**    | Exhaustive - flags everything, down to small nits and stylistic tweaks. Maximizes coverage. |
| **Medium** | Balanced - reports findings that meaningfully matter, skipping trivial nits (default).      |
| **High**   | Strict - only serious, high-impact risks. Ignores minor or stylistic concerns.              |

### Language & Framework Focus

By default, an agent reviews all languages and frameworks. Under **Advanced options**, you can narrow its focus to a specific set (for example, only Python and TypeScript) so the agent concentrates on the stack you care about.

### File Scope

Restrict which files the agent reviews using glob patterns under **Advanced options**:

* **Include files** - patterns for files to review (for example, `src/**/*.py`)
* **Exclude files** - patterns to skip, prefixed with `!` (for example, `!src/tests/**`)

If both are left empty, the agent reviews all files. Patterns use minimatch syntax - see the [pattern examples](/pull_request/customize/rules#pattern-examples) on the Rules page for common globs.

## How Personas Affect Reviews

Personas are configured **per repository**, not per pull request. Once enabled, an agent reviews **every** pull request in that repository, subject to its file scope. Enabling a persona adds its specialized guidance to the AI reviewer, so its findings appear inline alongside CodeAnt's standard review.

You can enable multiple personas on the same repository - for example, running the Performance and Pentesting agents together - and each contributes findings from its own perspective.

## Custom Agents

The same settings page also lets you define your own review agents. Under **Custom Agents**, you can write repository-specific rules and instructions in your own words. See [Rules](/pull_request/customize/rules) for details on creating custom review rules.
