AI Assistant & Writing

Your finance copilot, built-in

Ask the AI assistant about any invoice, customer, or payment — in plain English. Generate polite reminders and proposal copy right where you're typing. All running on your own OpenRouter key, on your own server.

What it does

Two features, one API key

A side-drawer chat assistant that can inspect your real data via read-only tools, plus a Sparkles button inside every rich editor for one-shot writing.

Chat assistant

Ask plain-English questions about your invoices, customers, payments, and expenses. The assistant calls read-only tools to fetch real data — no hallucinated numbers.

In-editor writing

Sparkles button in every rich editor opens a one-shot text generator. Draft customer notes, proposal copy, and reminder emails without leaving the form.

Aggregate reasoning

Ask "who are my top 5 customers by revenue this year" or "what category are we spending the most on" — and get ranked lists with real totals.

MCP serverComing soon

Connect your own AI agents to InvoiceShelf over the Model Context Protocol — and go beyond read-only. Manage customers, invoices, estimates, and more straight from Claude, your editor, or any MCP-compatible client.

How it works

Read-only, self-hosted, BYO key

The assistant is designed around three hard constraints: your data stays yours, the model can only query (never mutate), and everything runs in your own instance.

Bring your own key

Plug in your own OpenRouter API key. Your data never touches our servers — every request goes directly from your instance to the model provider.

Read-only by contract

The assistant cannot create, update, or delete anything. Every tool is a query. No matter what the model is told, it cannot mutate your records.

Self-hosted

Runs on your own InvoiceShelf instance. Audit the code, switch models, turn it off entirely — you are in control.

Tenant-aware

Every tool call is scoped to the current company via session-authoritative identifiers. The model can never reach data from another tenant.

Tool catalog

12 read-only tools the assistant can call Query only

Every question the assistant answers is backed by a specific tool. You can see the exact tool definitions in the source — no black boxes.

search_invoices

Search by customer, status, or free text

get_invoice

Fetch full invoice details by ID

list_overdue_invoices

Current overdue invoices

search_customers

Free-text customer search

get_customer

Customer profile + totals

list_recent_payments

Payments in the last N days

search_items

Catalog item search

list_expense_categories

Company expense categories

get_company_stats

Aggregates for a named time period

rank_top_customers

Rank by revenue, count, or outstanding

rank_top_items

Best-selling by quantity or revenue

rank_expense_categories

Biggest expense categories

Setup

One step during install

Enable AI during the installer wizard, or flip it on later from Admin → AI. You can override models per-company and use different keys for chat vs writing.

.env
# During the installer, tick "Enable AI assistant" and paste
# your OpenRouter key. Or configure it later in Admin → AI.

AI_ENABLED=YES
AI_DRIVER=openrouter
AI_API_KEY=sk-or-v1-xxxxxxxxxxxxxxxxxxx
AI_CHAT_MODEL=anthropic/claude-sonnet-4.6
AI_TEXT_GENERATION_MODEL=anthropic/claude-haiku-4.5

Supports Anthropic, OpenAI, Google, Z.AI, and any other OpenRouter-compatible model.

Give your invoicing a copilot

Download InvoiceShelf and try the AI assistant with a free OpenRouter account.