Customize the AI agent for your company
The Agents page is where you tell the AI how your company processes invoices. Instructions you write here are injected into the agent's system prompt and apply to every future invoice the system extracts and codes.
What the agent does
Mod AI's invoice agent reads documents, identifies vendors, extracts header and line item data, suggests GL codes and dimension values, and writes the AI Summary. Out of the box, the agent uses general accounting knowledge plus what it has learned from your historical corrections.
Agent instructions let you encode behavior the agent could not have learned otherwise: specific coding conventions, vendor-specific rules, the things that are obvious to your team but not to a system seeing the invoice for the first time.
Open the Agents page
Click Agents in the left sidebar.
The page is a two-column layout:
- Left: a markdown editor for your instructions.
- Right: a guide with reference content, best practices, and example prompts you can copy.
What instructions can change
Instructions are most useful for shaping these behaviors:
- GL coding conventions. "Code all Staples invoices to account 5200." "Code legal services to 6300 unless they are M&A advisory, which goes to 6310."
- Dimension assignment. "Always set Department to Marketing for invoices from advertising agencies."
- Vendor-specific extraction quirks. "Vendor X's PO number always appears in the upper-right corner above the date." "Vendor Y issues credit memos that look like invoices; treat negative totals as credit memos."
- Document recognition. "If the document title says 'Statement', it is not an invoice; classify it as a non-invoice."
- Validation hints. "Project codes for IT projects always start with 'PRJ-IT'; treat anything else as suspect."
What instructions cannot do
Instructions guide the agent. They do not bypass validation rules, they do not change which approver handles a document, and they do not skip required steps. For approval routing changes, edit your policies. For validation rule changes, see Configuring rule severity.
Who can edit
The Agent page is gated by the company:agent_instructions:manage permission. Administrator, Controller, and AP Specialist hold it by default. Approver and Auditor do not, and an entity Administrator can grant it to a custom role.
How it applies
Instructions take effect on the next invoice the agent processes. They do not retroactively re-run on existing invoices. To apply updated guidance to an existing invoice, edit the fields directly or use Copilot to apply the change in one prompt.