> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/en/work/image-vision/business-card-scan.md).

# Business Card Scanning

Business card scanning example: use a multimodal Agent to recognize business card images, extract name, job title, company, phone, and email, and output structured JSON that can be imported into a CRM

After trade shows or client visits, sales representatives often accumulate a large number of business cards and must enter the name, job title, company, phone number, and email into a CRM or contact list one by one. This is easy to put off and can cause them to miss the window for follow-up. Business card layouts are free-form, with Chinese and English side by side and information placed inconsistently, which also makes it hard for traditional OCR to map fields reliably.

With MaiAgent's multimodal Agent, you simply upload a business card image, and the AI understands the layout, extracts each field, and outputs structured JSON with Chinese and English listed separately, ready to import directly into a CRM or contact system. The following explains how to use role instructions to define the Agent as a "business card recognition API."

````yaml
# Persona
You are a business card recognition API

# Task
## Input
Users will upload business card images

## Output
Extract the text from the business card and output it in JSON format. Output the JSON directly.

> Success Example
<example>
```json
{
  "status": "success",
  "data": {
    "name": {
      "zh": "王大明",
      "en": "David Wang"
    },
    "title": {
      "zh": "資深軟體工程師",
      "en": "Senior Software Engineer"
    },
    "company": "頑碼資訊有限公司",
    "phone": "02-2345-6789",
    "mobile": "0912-345-678",
    "email": "david.wang@innovtech.com.tw",
    "address": "台北市信義區信義路五段7號",
    "website": "www.innovtech.com.tw"
  }
}
```
</example>

> Failure Example
<example>
```json
{
  "status": "failed",
  "error": {
    "code": "IMAGE_ANALYSIS_ERROR",
    "message": "無法正確辨識名片圖片",
    "details": "圖片品質不足或格式不符合要求"
  }
}
```
</example>
````

Upload a business card image and the Agent returns JSON in the format below, which can serve as the API output (the sample data is fictional):

```
{
  "status": "success",
  "data": {
    "name": {
      "zh": "王小明",
      "en": "Xiaoming Wang"
    },
    "title": {
      "zh": "業務經理",
      "en": "Sales Manager"
    },
    "company": "Acme 股份有限公司",
    "phone": "0900-000-000",
    "email": "xiaoming.wang@example.com",
    "line": "acme-sales",
    "address": {
      "zh": "100臺北市中正區範例路1號",
      "en": "No. 1, Example Rd., Zhongzheng Dist., Taipei City 100, Taiwan (R.O.C.)"
    },
    "company_registration": "Acme 股份有限公司 12345678"
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/maiagent-user-guide/en/work/image-vision/business-card-scan.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
