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

# Agentic Modes

> Add custom prompts and specialized agentic processing to Parse

r-1 handles general-purpose accuracy improvements for text, tables, figures, and page layouts natively. Use agentic processing with r-1 when your workflow needs a custom prompt for a specific content type or advanced chart extraction.

Agentic processing runs additional model steps and adds latency.

<Note>
  r-1 is currently in preview and is the default for all new Parse pipelines. Existing legacy pipelines can continue using promptless agentic scopes. Review [r-1 configuration compatibility](/configs/parse/r-1-configuration-compatibility) before migrating an existing configuration.
</Note>

## Basic Usage

Add an entry to the `agentic` array for each scope that needs customized processing. Each entry must include a custom prompt or enable advanced chart extraction.

<CodeGroup>
  ```python Python theme={null}
  result = client.parse.run(
      input=upload.file_id,
      enhance={
          "agentic": [
              {
                  "scope": "table",
                  "prompt": "Preserve domain-specific notation such as <0.01, ±, and N/A exactly as written."
              },
              {
                  "scope": "figure",
                  "advanced_chart_agent": True
              }
          ]
      }
  )
  ```

  ```javascript Node.js theme={null}
  const result = await client.parse.run({
    input: upload.file_id,
    enhance: {
      agentic: [
        {
          scope: 'table',
          prompt: 'Preserve domain-specific notation such as <0.01, ±, and N/A exactly as written.'
        },
        {
          scope: 'figure',
          advanced_chart_agent: true
        }
      ]
    }
  });
  ```

  ```bash cURL theme={null}
  curl -X POST https://platform.reducto.ai/parse \
    -H "Authorization: Bearer $REDUCTO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "input": "reducto://your-file-id",
      "enhance": {
        "agentic": [
          {
            "scope": "table",
            "prompt": "Preserve domain-specific notation such as <0.01, ±, and N/A exactly as written."
          },
          {
            "scope": "figure",
            "advanced_chart_agent": true
          }
        ]
      }
    }'
  ```
</CodeGroup>

You can configure more than one scope in a request, but only one entry per scope.

<Note>
  Agentic modes are available in the Python SDK, Node.js SDK, and via cURL. The Go SDK does not yet support agentic modes.
</Note>

## Custom Prompts

Custom prompts tell Reducto how to interpret or represent content for your use case. Pages that need a custom prompt run through the matching agentic pipeline. Other pages continue through r-1.

### Text Scope

Text-scoped custom prompts apply to form regions, such as key-value fields. r-1 handles general body text natively.

<CodeGroup>
  ```python Python theme={null}
  enhance={"agentic": [{"scope": "text", "prompt": "Preserve account numbers and dates exactly as written."}]}
  ```

  ```javascript Node.js theme={null}
  enhance: { agentic: [{ scope: 'text', prompt: 'Preserve account numbers and dates exactly as written.' }] }
  ```

  ```bash cURL theme={null}
  "enhance": {"agentic": [{"scope": "text", "prompt": "Preserve account numbers and dates exactly as written."}]}
  ```
</CodeGroup>

### Table Scope

Table-scoped custom prompts control how Reducto encodes domain-specific table content.

<CodeGroup>
  ```python Python theme={null}
  enhance={"agentic": [{"scope": "table", "prompt": "Preserve domain-specific notation such as <0.01, ±, and N/A exactly as written."}]}
  ```

  ```javascript Node.js theme={null}
  enhance: { agentic: [{ scope: 'table', prompt: 'Preserve domain-specific notation such as <0.01, ±, and N/A exactly as written.' }] }
  ```

  ```bash cURL theme={null}
  "enhance": {"agentic": [{"scope": "table", "prompt": "Preserve domain-specific notation such as <0.01, ±, and N/A exactly as written."}]}
  ```
</CodeGroup>

#### Table Mode

The `mode` option controls where Reducto applies the table custom prompt. It defaults to `"default"`.

| Mode        | Behavior                                                                    |
| ----------- | --------------------------------------------------------------------------- |
| `"default"` | Selectively applies customized table processing where it is likely to help. |
| `"max"`     | Applies customized processing to every table in the job.                    |

<CodeGroup>
  ```python Python theme={null}
  enhance={
      "agentic": [{
          "scope": "table",
          "mode": "max",
          "prompt": "Preserve domain-specific notation exactly as written."
      }]
  }
  ```

  ```javascript Node.js theme={null}
  enhance: {
    agentic: [{
      scope: 'table',
      mode: 'max',
      prompt: 'Preserve domain-specific notation exactly as written.'
    }]
  }
  ```

  ```bash cURL theme={null}
  "enhance": {
    "agentic": [{
      "scope": "table",
      "mode": "max",
      "prompt": "Preserve domain-specific notation exactly as written."
    }]
  }
  ```
</CodeGroup>

### Figure Scope

r-1 generates a short description for each figure natively. Add one figure-scoped custom prompt when your workflow needs a use-case-specific interpretation.

<CodeGroup>
  ```python Python theme={null}
  enhance={"agentic": [{"scope": "figure", "prompt": "Describe the relationships between components in this diagram."}]}
  ```

  ```javascript Node.js theme={null}
  enhance: { agentic: [{ scope: 'figure', prompt: 'Describe the relationships between components in this diagram.' }] }
  ```

  ```bash cURL theme={null}
  "enhance": {"agentic": [{"scope": "figure", "prompt": "Describe the relationships between components in this diagram."}]}
  ```
</CodeGroup>

## Advanced Chart Extraction

Use `advanced_chart_agent` when you need structured numerical data from charts. Reducto runs the separate chart extraction agent and augments the r-1 result.

<CodeGroup>
  ```python Python theme={null}
  enhance={"agentic": [{"scope": "figure", "advanced_chart_agent": True}]}
  ```

  ```javascript Node.js theme={null}
  enhance: { agentic: [{ scope: 'figure', advanced_chart_agent: true }] }
  ```

  ```bash cURL theme={null}
  "enhance": {"agentic": [{"scope": "figure", "advanced_chart_agent": true}]}
  ```
</CodeGroup>

For supported chart types and response details, see [Chart Extraction](/configs/parse/chart-extraction).

## Legacy Agentic Processing

Existing legacy Parse pipelines can continue using promptless agentic scopes as general-purpose accuracy enhancements.

| Promptless scope | Legacy behavior                                                            |
| ---------------- | -------------------------------------------------------------------------- |
| `text`           | Adds a vision-language model pass for text and form regions.               |
| `table`          | Adds a vision-language model pass to reconstruct table structure.          |
| `figure`         | Adds enhanced figure processing. `summarize_figures` must also be enabled. |

Do not carry promptless scopes into an r-1 configuration. r-1 handles these general improvements natively. With r-1, text and table scopes require a custom prompt. Figure scopes require a custom prompt or `advanced_chart_agent`.

### Legacy Figure Summarization

For legacy Parse, `summarize_figures` uses a separate model to generate generic figure descriptions. It defaults to `true`.

<CodeGroup>
  ```python Python theme={null}
  enhance={"summarize_figures": True}
  ```

  ```javascript Node.js theme={null}
  enhance: { summarize_figures: true }
  ```

  ```bash cURL theme={null}
  "enhance": {"summarize_figures": true}
  ```
</CodeGroup>

r-1 generates figure descriptions natively and ignores this setting.

## When to Use Agentic Processing

| Situation                                                           | Configuration                            |
| ------------------------------------------------------------------- | ---------------------------------------- |
| General parsing, including handwriting, complex tables, and figures | No agentic configuration with r-1        |
| Use-case-specific instructions for form regions                     | Text scope with a custom prompt          |
| Domain-specific table representation                                | Table scope with a custom prompt         |
| Use-case-specific figure interpretation                             | Figure scope with a custom prompt        |
| Structured numerical data from charts                               | Figure scope with `advanced_chart_agent` |
| General-purpose accuracy enhancement on an existing legacy pipeline | Promptless legacy scope                  |

## Latency

Customized agentic processing and advanced chart extraction run additional model steps and add latency. Pages without a matching custom prompt continue through r-1 without those additional steps.

Customized agentic processing does not add cost to r-1 processing.
