---
url: /operate/data-formats.md
description: >-
  Record the format of what comes into and goes out of each Task Card, find
  where two formats do not match, save a reusable conversion, build an agent
  from it and run it from the app or an AI chat.
---

# Data formats and the hand-off format fixer

Built

Work breaks where one person sends a PDF and the next person needs the same facts as fields in a system. DutyGraph records the format on each side of a Task Card, finds the hand-offs where they do not match, and helps you bridge them.

## 1. Record the format on a Task Card

Open **Work Map › Process map** and click a Task Card. Under **This Task Card** there are two boxes:

* **Comes in as**: the format of what the person needs to start.
* **Goes out as**: the format of the result.

Click **Record format** (or **Edit format**) and pick one:

| Group | Formats |
| --- | --- |
| **File** | JSON, PDF, CSV, Spreadsheet, Word document, Photo or image, Email, Plain text |
| **In a system** | A screen or record in a system, An API or webhook |
| **Not digital** | Paper, A physical item, Said out loud |

Then say **what it is** ("Supplier packet, scanned", "A bale of hay"), the **fields or contents** (one per line), **how it moves**, and, if you have one, an **example** as text. Use a fictional or cleaned example.

Your record does not change the person's Task Card. When the person names the format themselves, their word is used.

## 2. Employees are asked the format

In the client app, each Task Card asks **What format does it come in as?** and **What format does it go out as?** under "Gets it from" and "Goes to". The person taps one choice. The AI interview asks the same question with the same choices.

## 3. Find the break

Open **Work Map › Work flows** and turn on **Data formats** in the row of lenses above the flow. The number beside it is the count of open format breaks.

* Every hand-off is drawn with a mark: `PDF → JSON` in amber is a break; a green mark means the two formats match, or an agent bridges the break.
* Under the flow, **Data formats** lists every hand-off: **Format break**, **Bridged by an agent**, **Formats match** or **Not recorded yet**.

You can also ask DutyGraph Agent: **Where does the data break?** It names the two Task Cards and the two formats, and a **Convert it** box under its answer opens the conversion.

## 4. Convert it

On **Work flows**, a format break is flagged on its hand-off (for example **PDF → JSON**). Click it. On the **Process map**, ask DutyGraph Agent **Where does the data break?** and click **Fix it** under its answer: the two cards light up on the map. Both open the **Format converter**:

1. **The agent that fixes it**: DutyGraph writes out the Claude Managed Agents file from the two Task Cards. Read it, then click **Confirm and build the agent in Claude**. This saves the conversion and creates the agent with the company's Claude key saved in DutyGraph.
2. **Test it**: paste the item or drop a file, click **Convert**, and read the result (**Copy**, **Download**). Until the agent is built in Claude, a test runs the same skill on the company's AI model.
3. **Use it from ChatGPT or Claude**: the sentence to say with the DutyGraph connector on.

**Change how it converts** holds what DutyGraph drafted from the two cards:

* **Field map**: one row per field the next card needs. Where it is in what comes in, and its rule.
* **Stops and hands back to a person when**: the stop rules, from the next card.
* **Who checks the result**: the person on the next card.

Check each row, change what is wrong, then **Save the conversion**. It is saved as a reusable skill for that hand-off. Saving again makes a new version.

Some breaks need a person or a device, not an agent: paper must be scanned, a physical item must be counted or photographed. The panel says so.

## 5. Build the agent

After you save, **The agent and its skill** in the converter shows two views of the same conversion:

* **The skill (SKILL.md)**: plain Markdown that a person or any AI tool can follow.
* **Claude Managed Agents JSON**: the definition DutyGraph sends to Claude.

**Create in Claude** creates the agent in the company's Claude account with the company's approved Claude key. The agent has no tools and no web access. It reads the text it is given and answers.

You do not need to create the agent to run a conversion. Without it, a run uses the company's AI model with the same skill.

## 6. Run it

Under **Run it**, paste the item as text or choose a file (PDF, Word, Excel, CSV or text, up to 2 MB), then:

* **Convert** shows the result beside the input.
* **Convert and send to …** also puts the result in the receiving person's app, as a question from you, for their check.

The result is a draft. **Drafted** means every field was found. **Needs review** means a stop rule fired or a field is missing; the note says which. DutyGraph, not the AI, decides which of the two it is.

The item is read for that run only. It is not stored.

## Run it from ChatGPT or Claude

With the DutyGraph connector on, attach the item in your AI chat and say:

> Run the agent that converts the supplier packet and send it to Tariq.

The assistant calls `run_handoff_agent`, shows the converted result, and says who it was sent to. See [every MCP tool](../reference/mcp-tools.md).

## Try it on the sample company

The Cobalt sample has one format break: **Check supplier packet** sends a scanned PDF, and **Create draft supplier record** takes a JSON record with 9 fields. The sample's packet is filled in under **Run it**. A run needs your firm's own AI key (Settings › Keys).

## What it does not do

* It does not run by itself when an item arrives. You start each run.
* It does not read a scan that has no text, or a photo.
* It does not save anything into a company system. A person checks the draft and enters it.
