> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.markup.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.markup.ai/_mcp/server.

# Contradictions

> Run the Contradictions agent (contradiction_checker) via the Markup AI API.

**API name:** `contradiction_checker` · **Category:** Accuracy

Flag places where a document contradicts itself: incompatible dates, figures, capabilities, scope, identities, definitions, and positioning claims, plus references to figures, tables, steps, or sections that don't exist. For what this agent does and why it matters, see [Contradictions](/agents/contradiction-checker) in the Agent Catalog.

## What it returns

The run status plus one issue per contradiction. Unlike most agents, a Contradictions issue usually covers **two or more places** in the text, listed in `positions` (see [Issues that span several places](/developer/agents#issues-that-span-several-places)). Each issue also carries an explanation that names what each place says, a confidence score, and a `category` set to one of these types:

| `category`             | What conflicts                                                      | Risk   |
| ---------------------- | ------------------------------------------------------------------- | ------ |
| `temporal`             | Dates, durations, ages, or the order of events                      | High   |
| `statistical`          | One figure or measurement stated with different values              | High   |
| `capability`           | What the product does or requires                                   | High   |
| `negation_modality`    | One flipped word: never/always, must/may, all/most                  | High   |
| `entity`               | The identity or attributes of one product, company, or person       | Medium |
| `scope`                | Who or what something is for, or where it applies                   | Medium |
| `comparative`          | Positioning claims, such as cheaper versus premium                  | Medium |
| `causal`               | Something is the problem in one place and a feature in another      | Medium |
| `structural_reference` | A reference to a figure, table, step, or section that doesn't exist | Medium |
| `definitional`         | A key term is used with two meanings                                | Low    |

Every candidate is checked by a second reviewer before it's returned. When the reviewer finds that the passages can be reconciled only under a narrow reading, the issue is still returned, at Low risk, with an explanation that starts "Possible tension (not a strict contradiction):".

A `structural_reference` issue can have a single place (the dangling reference itself). In that case `positions` is omitted and `position` holds the reference, like any single-span issue.

The agent takes no configuration and never consults an external source of truth or the current date.

## Example response

For this input:

```text
Join us in Austin on July 10th for the Guardian Summit. Sessions run all day.

Logistics: doors open at 8am on 7/11/2026 and badges are collected at the desk.
```

the agent returns one issue with both dates in `positions`:

```json
{
  "issues": [
    {
      "agent": "contradiction_checker",
      "category": "temporal",
      "severity": "high",
      "confidence": 0.95,
      "explanation": "The opening gives July 10th as the summit date, but the logistics section says doors open on 7/11/2026; one event cannot have both dates.",
      "position": { "start": 21, "end": 30, "text": "July 10th" },
      "positions": [
        {
          "start": 21,
          "end": 30,
          "text": "July 10th",
          "suggestions": ["July 10th", "July 11th"]
        },
        {
          "start": 111,
          "end": 120,
          "text": "7/11/2026",
          "suggestions": ["7/10/2026", "7/11/2026"]
        }
      ],
      "suggestion": "July 10",
      "suggestions": ["July 10", "July 11"]
    }
  ]
}
```

Read it like this:

* **`suggestions`** on the issue are the choices to offer the user, best first. Choosing "July 11" means every place becomes July 11.
* **`positions[i].suggestions[j]`** is the text that choice `j` writes at place `i`, in that place's own format. Choosing "July 11" (index 1) writes "July 11th" over the first place and leaves "7/11/2026" unchanged at the second. An entry equal to the place's `text` means that choice leaves the place as it is.
* When a contradiction needs a rewrite rather than a substitution (most `comparative`, `causal`, and `definitional` issues), the issue has no `suggestions`, and neither do its positions.

## Run this agent

Agents are run by ID, but you never need to hardcode one: resolve the ID from the agent's stable `name` (`contradiction_checker`) with `GET /agents`, then call `POST /agents/{agent_id}/run`. Pass `wait=true` to block until the run completes; omit it to get a `workflow_id` back immediately and track the run with `GET /agents/workflows/{workflow_id}` (or a `webhook_url` in the request body).

Send the whole document in one run. The agent compares passages against each other, so splitting a document into chunks hides the contradictions between them.

**`cURL`**

```bash title="cURL"
TOKEN="YOUR_TOKEN"

# Resolve the agent ID by name
AGENT_ID=$(curl -s "https://api.markup.ai/agents?page_size=100" \
  -H "Authorization: Bearer $TOKEN" \
  | jq -r '.agents[] | select(.name == "contradiction_checker") | .id')

# Run the agent and wait for the result
curl -X POST "https://api.markup.ai/agents/$AGENT_ID/run?wait=true" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text": "Your content to check."}'
```

**`Python`**

```python title="Python"
import requests

BASE = "https://api.markup.ai"
HEADERS = {"Authorization": "Bearer YOUR_TOKEN"}

# Resolve the agent ID by name
agents = requests.get(
    f"{BASE}/agents", headers=HEADERS, params={"page_size": 100}
).json()["agents"]
agent_id = next(a["id"] for a in agents if a["name"] == "contradiction_checker")

# Run the agent and wait for the result
run = requests.post(
    f"{BASE}/agents/{agent_id}/run",
    headers=HEADERS,
    params={"wait": "true"},
    json={"text": "Your content to check."},
).json()
print(run["status"], run.get("result"))
```

**`TypeScript`**

```typescript title="TypeScript"
const BASE = "https://api.markup.ai";
const headers = { Authorization: "Bearer YOUR_TOKEN" };

// Resolve the agent ID by name
const { agents } = await (
  await fetch(`${BASE}/agents?page_size=100`, { headers })
).json();
const agentId = agents.find((a) => a.name === "contradiction_checker").id;

// Run the agent and wait for the result
const run = await (
  await fetch(`${BASE}/agents/${agentId}/run?wait=true`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({ text: "Your content to check." }),
  })
).json();
console.log(run.status, run.result);
```

Prefer MCP? On the hosted MCP server, run this agent with `markupai_run_agents` and `agents: ["contradiction_checker"]`, or let `markupai_review` select it from your goal. See the [MCP overview](/mcp). MCP results currently carry only each issue's first place (`position`) and the issue-level `suggestions`. Use the REST API when you need the full `positions` array.