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

# Logical check

> Review an Agent's prompt, stages and tools for contradictions before a lead runs into them, and hand the fixes to NexorGPT.

The **Logical check** reads an Agent's configuration and looks for contradictions: places where the prompt, the stages and the configured actions tell the Agent to do two different things. It finds them before a lead does.

Open **Agents → your Agent → Settings**. The check appears as an **Improve with AI** banner near the top of the settings page.

The check only reads your configuration. It never edits an Agent, moves a lead, or sends a message.

## Run a check

<Steps>
  <Step title="Press Improve with AI">
    The check runs in the background. The button changes to **Reviewing** and you can keep working, or leave the page and come back.
  </Step>

  <Step title="Wait a couple of minutes">
    An Agent is only reviewed by one check at a time. If a check is already running for this Agent, wait for it to finish before starting another.
  </Step>

  <Step title="Read the summary">
    When it finishes you get two or three sentences describing what it found. If there is nothing to fix, it says so.
  </Step>
</Steps>

## What it reviews

The check reads the exact prompt your Agent is served, its pipeline stages with their routing rules and hints, the answers it collects, and the actions it can call.

It also follows the hand-offs. If your Agent passes leads to another Agent, the check reads that Agent too, up to six Agents in the chain. This is how it catches rules that only conflict once a lead crosses from one Agent to the next.

## What it looks for

| Kind of problem                       | Example                                                                                        |
| ------------------------------------- | ---------------------------------------------------------------------------------------------- |
| Conflicting rules across a hand-off   | One Agent is told to ask for a budget, the next is forbidden to mention it.                    |
| Numbers that disagree                 | A stage hint says `over 50 employees` and a rule says `50 or more`.                            |
| A stage the platform owns             | The prompt orders the Agent to set a stage that Nexor moves by itself.                         |
| A stage or action that does not exist | The prompt names a stage or tool that is not configured on this Agent.                         |
| Two answers to the same failure       | The configuration gives two different destinations when a tool fails.                          |
| A promise nothing can keep            | The prompt promises an email invitation, but no email address is collected.                    |
| A route that lives only in prose      | An important stage is reachable only through a sentence in the prompt, with no rule behind it. |
| A prompt that contradicts itself      | The same prompt both orders and forbids the same behavior.                                     |

<Note>
  The check reports only what your configuration actually supports. Every problem it raises has to quote your own configuration word for word, and anything it cannot quote is discarded. Configuration that is simply silent about something is not reported as a problem.
</Note>

## Read and fix the results

Under **Possible problems** the check lists the title of each problem it found, one line each, so you can scan what is wrong without reading a report.

Press **Fix with NexorGPT** to hand them over. NexorGPT receives the full detail behind every title, the description of what the lead suffers, the suggested change, and any decision that is yours to make, and starts working on the fixes. The page itself does not change: the titles stay as they are.

Review what NexorGPT proposes before you apply it. The suggested change is the smallest edit that resolves the contradiction, which is not always the one you want.

### Structural warnings

**Structural warnings** are listed separately and stay visible. They are the three problems Nexor can confirm from the configuration alone:

* An action the Agent needs is not available in the stage where the lead arrives.
* The configuration points at a stage, answer or action that does not exist.
* Leads can be moved in a circle with no way out.

## Dismiss the results

Press the **X** on the results to hide them once you have read or fixed them. They stay hidden until the next check runs.

To run it again after a change, use **Run again** at the bottom of the results. When a check comes back clean there is nothing to fix, so that button is not shown and the banner offers **Improve with AI** again. Re-running after you edit an Agent is the way to confirm the contradiction is gone.

<Tip>
  Run the check after any significant edit to a prompt, after adding or reordering stages, and after connecting an Agent to a new hand-off. Those are the three changes that most often introduce a contradiction that is invisible until a lead hits it.
</Tip>
