
# Use with AI agents

AI coding agents such as Claude Code, Cursor or Codex can already run terminal commands, so they can drive fob-zb directly. Ask in plain language, for example "which customers owe us more than 60 days?", and the agent runs the commands, reads the JSON and answers.

<Video title="Ask your books questions with Claude Code and fob-zb (3–4 min)" />

## 1. Install and connect

Install the CLI and connect a profile yourself first ([install](/docs/zoho-books/cli/install), [connect](/docs/zoho-books/zoho-credentials)). If you'd rather the agent do it, tell it to run `fob-zb getting-started`. That command checks for an existing setup first, and it tells agents to ask you for the client ID, secret and grant code rather than make them up.

<Callout type="info" title="Decide what the agent may change">
For questions only, give the agent a [read-only profile](/docs/zoho-books/orgs-and-tokens#read-only-scopes). Write commands then fail at Zoho, whatever the agent tries. For tasks, use a full-access profile and keep your agent's approval prompts on for commands that write.
</Callout>

## 2. Tell the agent about fob-zb

Add a short note to your project's agent instructions (`CLAUDE.md`, `AGENTS.md`, `.cursorrules` or similar):

```markdown
## Zoho Books

Use the `fob-zb` CLI for anything about our books (invoices, bills, contacts, bank feed).

- Start with `fob-zb config profiles current` to confirm the organization.
- Discover commands with `fob-zb --help`, `fob-zb <resource>` and `fob-zb <resource> <action> --help`.
- Prefer `--format json` (all rows) or `--json` (one page) and parse the output; don't scrape tables.
- Never run `delete`, `writeoff`, `mark-void` or `auth logout` without asking me first.
- Docs (raw Markdown): https://finopsbricks.com/llms.txt
```

## 3. Ask

Some questions that work well:

- "Which invoices are overdue, grouped by customer, with the total per customer?"
- "List vendors with unpaid bills due in the next 14 days."
- "How many bank transactions are still uncategorized, per bank account?"
- "Draft invoices for every unbilled time entry on project X." Review before it creates anything.

The agent will usually run `invoices list --status overdue --format json` and add up the results itself. That's expected: fob-zb returns the data and the agent does the analysis.

## Docs for agents

Every docs page is also served as raw Markdown, which is easier for agents to read than HTML:

- Index of all pages: [`/llms.txt`](/llms.txt)
- Any page: add `/md` after `/docs`. For example, this page is at [`/docs/md/zoho-books/cli/ai-agents`](/docs/md/zoho-books/cli/ai-agents)
