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

# Overview

> Build agents that read banking documents, classify them, and extract the values your process needs.

Intelligent document processing (IDP) uses an AI agent to read a document and identify its type. The agent extracts the values your process needs. For example, an IDP agent can take a Chamber of Commerce extract and return the registration number, or take a payslip and return the net pay.

Many banking processes still need a person to open an uploaded document, check that it's the right type, and copy values into another system. An IDP agent does these steps and returns structured JSON that the rest of your process can use.

The Agent Platform gives you the building blocks for IDP agents:

* **Document Retrieval server (Model Context Protocol, MCP)**: Gives your agent tools to read PDFs, images, and text files from a URL.
* **Optical character recognition (OCR) service**: Converts documents to markdown. The MCP server calls this service. You can also call it directly over REST.
* **Template instructions**: A prompt that classifies the document and extracts a requested value with strict formatting rules. See [Build an intelligent document processing agent](https://agenticbanking.backbase.io/agentic-ai/foundation-services/intelligent-document-processing/build-an-idp-agent.md).

## Key capabilities

> **Read any document**
>
> Convert PDFs and JPEG, PNG, and TIFF images to markdown, and fetch TXT, JSON, CSV, MD, and XML files.

> **Classify documents**
>
> Sort each document into the types your process expects, such as payslips, balance sheets, IDs, or registry extracts.

> **Extract exact values**
>
> Return the requested value exactly as printed, keeping currency symbols, number separators, and scale.

> **Two OCR modes with fallback**
>
> Use the fast default mode for most documents, or the premium mode for complex layouts. If one mode fails, the service retries with the other.

***

## How it works

The following diagram shows how an IDP agent reads a document:

```mermaid theme={"system"}
%%{init: {
  'theme': 'base',
  'themeVariables': {
    'primaryColor': '#ffffff',
    'primaryBorderColor': '#295eff',
    'primaryTextColor': '#091c35',
    'lineColor': '#091c35',
    'secondaryColor': '#f3f6f9',
    'tertiaryColor': '#ebf0f5',
    'fontFamily': 'Libre Franklin, sans-serif'
  }
}}%%
flowchart TB
  app["Your app"] -->|"Query and document URL"| agent["IDP agent"]
  agent -->|"MCP tool call"| gateway["API gateway"]
  gateway --> mcp["Document Retrieval MCP server"]
  mcp --> ocr["OCR service"]
  ocr -->|"Download"| sources["HTTPS URLs and Azure Blob Storage"]
  ocr -->|"Default mode"| mistral["Mistral OCR"]
  ocr -->|"Premium mode"| claude["Claude"]
  agent -->|"JSON result"| app
```

1. Your app sends the IDP agent a query, such as "What is the net pay?", and the URL of the document.
2. The agent calls the `convert_file_to_markdown` tool on the Document Retrieval MCP server, or `fetch_text_content` for text files.
3. The OCR service downloads the document, converts it to markdown, and returns the markdown to the agent.
4. The agent classifies the document, finds the requested value, checks its formatting, and returns a JSON object such as `{"document_type": "payslips", "extracted_value": "€1.756,20"}`.
5. Your app checks the document type and uses the extracted value, for example to fill in a form or flag a mismatch for review.

## Use cases

* **Know Your Business (KYB)**: Read a Chamber of Commerce extract during business onboarding and return the registration number, legal name, or registered address.
* **Income verification**: Read payslips and return the gross or net pay for a loan or mortgage application.
* **Financial analysis**: Read balance sheets and return totals such as assets or equity, with the stated scale applied.
* **Identity checks**: Read an ID document and return the document number, name, or expiry date.
* **Document checks**: Confirm that a customer uploaded the type of document you asked for before a person reviews it.

## Choose how to use the services

The following table compares the two ways to use the document processing services.

| Approach | When to use it | Page |
| :- | :- | :- |
| IDP agent with the Document Retrieval MCP server | Your process needs a document classified, values extracted, or questions answered about the content | [Build an intelligent document processing agent](https://agenticbanking.backbase.io/agentic-ai/foundation-services/intelligent-document-processing/build-an-idp-agent.md) |
| OCR API over REST | You only need the document text, for example to index documents in a knowledge base or to run your own extraction logic | [Use the OCR API and MCP server](https://agenticbanking.backbase.io/agentic-ai/foundation-services/intelligent-document-processing/use-the-services.md) |

## Related topics

* [Build an intelligent document processing agent](https://agenticbanking.backbase.io/agentic-ai/foundation-services/intelligent-document-processing/build-an-idp-agent.md) to connect the MCP server and add the template instructions.
* [Use the OCR API and MCP server](https://agenticbanking.backbase.io/agentic-ai/foundation-services/intelligent-document-processing/use-the-services.md) to call the services directly.
* [Reference](https://agenticbanking.backbase.io/agentic-ai/foundation-services/intelligent-document-processing/reference.md) for request and response fields, limits, and error codes.
