# Preparing statements with external agents

An external agent can help turn a statement into a file Talia can read. This is useful when the institution provides only a PDF or a layout that is difficult to import. Start by installing the appropriate skill from [Talia’s skills repository](https://github.com/taliamoney/skills) in your agent. The skill guides the agent through preparing and validating a **Talia statement JSON** file; you review and confirm it inside Talia.

If you already have a usable CSV or OFX/QFX export, start with [Importing your first statement](https://talia.money/docs/importing-data/importing-your-first-statement.md). No agent or model connection is required for that workflow.

## Decide what to share

The agent runs outside Talia. Whatever you upload or paste into it is handled by that tool and its provider, under their own storage and retention settings. Talia's local storage and sync encryption do not protect a statement you separately send to another service.

Use a copy of the statement. Remove personal details that the conversion does not need, such as your address and full account number, while preserving transaction descriptions, dates, amounts, currencies and balances needed to check the result. A Talia file can identify an account by its last two to four digits; it should never contain a full account number.

File preparation does not require your bank password, Talia sync recovery key or chat provider key. It also does not require enabling chat in Talia. See [What is sent to AI?](https://talia.money/docs/talia-ai/what-is-sent-to-ai.md) for the separate model features inside the app.

## Install the appropriate skill

[Talia’s skills repository](https://github.com/taliamoney/skills) contains reusable instructions and supporting files for agents that support skills. Choose the skill for your statement:

| What you want to prepare | Skill to install | Directory in the repository |
|---|---|---|
| Bank or credit-card transactions and balances | **transaction-import** | `skills/transaction-import` |
| Brokerage, retirement or crypto holdings and activity | **investment-import** | `skills/investment-import` |
| A zip of prepared statements for several accounts or periods | **bundle-import**, alongside the relevant import skills | `skills/bundle-import` |

The transaction and investment skills include extraction guidance, the format reference, a JSON Schema and a validation script. The bundle skill packages the prepared files for import together.

Use your agent tool's skill installation flow with the repository URL and the directory above. Installation steps vary by tool. If your agent can install skills on request, you can ask:

> Install the transaction-import skill from https://github.com/taliamoney/skills, in the skills/transaction-import directory.

For a manual installation, follow your tool's instructions and include the whole skill directory, including its supporting files, rather than copying only `SKILL.md`. Confirm that the tool recognizes the skill before giving it a statement. Install these skills in the external agent tool; they are not a setting inside Talia.

## Give the agent your statement

Start with one account and one statement period. With the skill installed, attach the source file and name the skill in your request:

> Use the transaction-import skill to prepare this statement for Talia. Ask me about any unreadable or uncertain fields. Run the skill's validator, resolve errors and report any remaining warnings. Return the JSON file for me to review and import.

Use **investment-import** for a brokerage statement. For several accounts or periods, ask the agent to prepare and validate each file with the relevant import skill, then use **bundle-import** to package them.

### If your tool does not support skills

Give the agent the source file, the [statement format reference](https://talia.money/docs/reference/statement-format.md) and the [version 1 JSON Schema](https://talia.money/schemas/talia.statement/1.json) directly. You can adapt this request:

> Convert this one account's statement into a UTF-8 JSON file in the `talia.statement/1` format. Follow the supplied format reference and schema. Preserve the institution's descriptions, posted dates and stated balances. Use decimal strings for money and signs from the account holder's perspective: money in positive, money out negative. Include only transaction IDs actually supplied by the institution. Do not invent missing rows or compute missing statement balances to make the totals agree. Report unreadable or uncertain fields separately and ask me to resolve them before producing the final file. Validate the file structure and report the balance check. Return the JSON file separately from your explanation.

Do not accept a plausible-looking total as evidence that the extraction is complete. Check page boundaries, continued tables, fees and repeated headings against the source. If a date or amount cannot be read, obtain a clearer source or resolve it yourself before importing.

## A fictional input and output

Suppose a Practice Bank statement for **Everyday Checking**, in CAD, says:

| Statement detail | Value |
|---|---|
| Period | September 1–30, 2026 |
| Opening balance | $1,000.00 |
| September 2: PAYROLL | $2,000.00 in; balance $3,000.00 |
| September 8: NEIGHBOURHOOD GROCER | $60.00 out; balance $2,940.00 |
| Closing balance | $2,940.00 |

The corresponding file is:

```json
{
  "format": "talia.statement/1",
  "account": {
    "type": "banking",
    "currency": "CAD",
    "institution": "Practice Bank",
    "name": "Everyday Checking"
  },
  "period": { "start": "2026-09-01", "end": "2026-09-30" },
  "opening": "1000.00",
  "closing": "2940.00",
  "transactions": [
    { "date": "2026-09-02", "amount": "2000.00", "description": "PAYROLL", "balance": "3000.00" },
    { "date": "2026-09-08", "amount": "-60.00", "description": "NEIGHBOURHOOD GROCER", "balance": "2940.00" }
  ]
}
```

[Download this fictional JSON file](https://talia.money/examples/everyday-checking-2026-09.json) for a practice account only. It contains the same transactions as the CSV in the first-import guide; importing both is not two separate months of history.

The check is **$1,000 + $2,000 − $60 = $2,940**. The opening and closing balances were copied from the fictional source, independently of that calculation. Inventing a closing balance from the extracted rows would hide a missing row.

For credit cards, a purchase and a balance owed are negative; a payment into the card account is positive. Talia does not reverse signs in this JSON format.

## Validate before importing

Ask the agent to run the installed import skill's validation script and report the result, including any warnings. If you are using the manual fallback, ask it to validate against the schema and the format's additional rules. In either case, compare the result with the original yourself:

- Check the account type, currency and period. One file describes one account.
- Check every transaction, including its sign and posted date. Money must be a quoted decimal string such as `"-60.00"`, not a JSON number or a string with a currency symbol.
- Keep descriptions as printed. Omit transaction IDs when the institution provides none.
- Check opening, closing and running balances where supplied. Missing information should stay missing rather than be invented.
- Keep pending transactions distinguishable: rows marked `pending: true` are skipped by Talia and should arrive as posted transactions in a later file.

The skill's validator checks structure and arithmetic; passing it does not prove that the agent read your statement accurately. Talia also applies its own validation and balance checks. An error such as an unknown field, impossible date or duplicate transaction ID must be corrected in the file; changing its filename will not fix it.

## Review and import in Talia

1. Open the matching account, set up with **Import statements**.
2. Choose **Import statement → Choose file** and select the JSON file.
3. Compare the review with the original: account, period, row count, amounts, skipped rows, duplicates and balances.
4. Resolve any discrepancies. If a source value was transcribed incorrectly, have the agent correct the file and choose it again.
5. Confirm only when the review is ready. For the fictional example, expect two transactions and a $2,940 closing balance, then choose **Import 2 transactions**.
6. Inspect the imported transactions and categories. Correct arithmetic does not establish the right budget categories.

A valid file can still have inconsistent figures. A bank or card import with an unresolved balance discrepancy is blocked; missing balance evidence may instead allow an explicitly confirmed **unverified** import. See [Fixing statement imports](https://talia.money/docs/importing-data/fixing-statement-imports.md).

Keep the original statement and prepared file if you may need to repeat the import. Talia does not retain the original file for you.

## Investments and multiple accounts

Use **investment-import** to prepare the format's holdings and activity sections for investment accounts. Preserve securities, currencies, cash, quantities and statement values. Mark holdings complete only when every position is present, and mark activity coverage complete only for the kinds of activity the source actually covers. Unknown cash is different from zero cash. See [Investment accounts](https://talia.money/docs/investment-accounts/introduction.md) and the [format reference](https://talia.money/docs/reference/statement-format.md).

For multiple accounts, prepare separate files and use **bundle-import** to package the validated files. A zip of statement files goes through **Accounts → Import statements**, where each file is matched to an account and reviewed. Do not combine different accounts into one statement JSON object.
