fairpolicy-cross-sell
v0.1.0
Published
Groups active policies by client and lists one-line accounts and line gaps your agency looks for, by producer. A review list for licensed staff; never contacts a client or recommends coverage.
Maintainers
Readme
Fairpolicy Cross Sell (fairpolicy-cross-sell)
Groups your active policies by client and lists accounts with only one line, and accounts where a line combination your agency looks for is not written (auto without home, no umbrella, GL without workers comp, and your own rules), by producer, with the next renewal date. A review list for licensed staff; it never contacts a client or recommends coverage.
It never sends marketing or contacts a client. It never creates a quote or an application.
MIT · Node 20 or newer · local files only · client identifiers masked before results reach the model · built on fairpolicy-core
npx -y fairpolicy-cross-sell demo
npx -y fairpolicy-cross-sell mcp --root ./agency-exportsA demo run
npx -y fairpolicy-cross-sell demo runs the agent on the fictional files in fixtures/ in a temporary folder. Captured output:
Fairpolicy Cross Sell demo (fictional agency, carriers and clients)
▶ Group policies by client and find one-line accounts
status: executed decision: allow
7 active account(s), 2 policies each on average: 3 with one line, 2 with a line your agency looks for not written here, 2 rounded. A review list for licensed staff, not a recommendation to any client.
condo 1 home_without_auto monoline
pauto 1 auto_without_home monoline
bop 1 gl_without_wc monoline
home, pauto 2 no_personal_umbrella gaps
cauto, cgl, wc 3 no_commercial_umbrella gaps
home, pauto, pumbr 3 rounded
bop, cumbr, wc 3 rounded
▶ Explain one account
status: executed decision: allow
CL-a6a8a370: gaps. Auto and home here, no personal umbrella Next: A line your agency asked to look for is not written here: review at renewal. The client may have it elsewhere or not need it.
▶ Write the worklist (CSV and HTML, real names stay on this computer)
status: executed decision: allow
Account review list: one line and line gaps written: 7 active account(s), 2 policies each on average: 3 with one line, 2 with a line your agency looks for not written here, 2 rounded. A review list for licensed staff, not a recommendation to any client. Files: fairpolicy-out/crosssell/cross-sell.csv, fairpolicy-out/crosssell/cross-sell.html.
▶ The agent tries marketing_email_send itself
status: blocked decision: block
reason: It never sends marketing or contacts a client.Tools
| Tool | What it does | Policy |
|---|---|---|
| crosssell_check | Each active account: its lines, premium, the rules it meets, the next renewal and a status (monoline, gaps, rounded). | runs |
| crosssell_explain | One account in full: its lines, policies, premium and the rules it meets. | runs |
| crosssell_write_report | Write cross-sell.csv (every account with its status and the figures behind it, plus blank owner and notes columns) and cross-sell.html into out_dir (default fairpolicy-out/crosssell). | runs |
| crosssell_recall | Search this agent's own memory of the customer's setup: accepted facts (in use) and facts waiting for a person. | runs |
| crosssell_learn | Propose one fact about the customer's setup for this agent to remember. | runs |
| crosssell_accept_learning | A named person accepts or rejects a fact waiting in this agent's memory. | one named click, even in Auto (accept_learning) |
| crosssell_retire_memory | A named person stops an accepted fact from applying. | one named click, even in Auto (accept_learning) |
| marketing_email_send | It never sends marketing or contacts a client. | refused |
| quote_create | It never creates a quote or an application. | refused |
Any tool name not in this table is blocked, including names a model invents. refused tools are listed so a model can see they exist and are refused.
Columns it reads
Table inputs can be CSV, TSV, semicolon- or pipe-separated text, Excel .xlsx, JSON or JSONL. Columns are matched by the agent's own name, then by the English names below, then by their names in German, French, Spanish, Portuguese, Italian, Japanese, Chinese and Korean. Dates become YYYY-MM-DD; amounts are read with either decimal mark. Every result lists under sources how each file was read. Columns marked masked hold patient identifiers: the model sees a pseudonym, a birth year or nothing (see Patient data).
Policy list (policies)
| Column | Type | Also read as | For example, in other languages |
|---|---|---|---|
| policy_number (required) | text | Policy Number, Policy #, Policy No, Policy, Pol #, Policy Num | Vertragsnummer, N° de police, 証券番号, 保单号 |
| client | text (masked) | Client Name, Insured, Insured Name, Named Insured, Account Name, Customer Name | Versicherungsnehmer, Assuré, 契約者, 投保人 |
| client_id | text (masked) | Client Code, Lookup Code, Account Lookup Code, Customer #, Client Number, Client ID | Kundennummer, Code client, 顧客コード, 客户编号 |
| carrier | text | Carrier, Company, Writing Company, Insurer, Issuing Company, Carrier Name | Versicherer, Assureur, 保険会社, 保险公司 |
| line | text | Line of Business, LOB, Policy Type, Line Type, Coverage, Line | Sparte, Branche, 保険種目, 险种 |
| effective_date | date | Effective Date, Eff Date, Effective, Policy Effective Date, Inception Date, Term Effective | Beginn, Date d'effet, 始期, 生效日期 |
| expiration_date | date | Expiration Date, Exp Date, Expiration, Policy Expiration Date, X-Date, Xdate | Ablauf, Date d'échéance, 満期, 到期日期 |
| premium | amount | Premium, Annualized Premium, Annual Premium, Written Premium, Full Term Premium, Estimated Premium | Beitrag, Prime, 保険料, 保费 |
| commission_rate | number | Commission Rate, Comm Rate, Commission %, Comm %, Agency Commission %, Commission Percent | Courtagesatz, Taux de commission, 手数料率, 佣金率 |
| commission | amount | Commission, Agency Commission, Estimated Commission, Commission Amount, Annualized Commission, Revenue | Courtage, Commission, 手数料, 佣金 |
| producer | text | Producer, Producer Name, Exec, Account Executive, Agent, Producer 1 | Vermittler, Producteur, 募集人, 业务员 |
| csr | text | CSR, Rep, Account Manager, Service Rep, Customer Service Rep, Servicer | Sachbearbeiter, Gestionnaire, 事務担当, 客服 |
| status | text | Status, Policy Status, Current Status | Status, Statut, ステータス, 状态 |
| bill_type | text | Bill Type, Billing Method, Bill Method, Billing Type, Agency/Direct, Bill Plan | Inkassoart, Mode d’encaissement, 集金方法, 收费方式 |
| business_type | text | New/Renewal, New or Renewal, NB/RN, Business Type, New Business/Renewal | - |
| segment | text | Department, Division, Personal/Commercial, Book, Line Group, PL/CL | - |
| state | text | State, Policy State, Risk State, Base State, Garaging State | Bundesland, Région, 都道府県, 省份 |
| cancel_date | date | Cancel Date, Cancellation Date, Cancelled Date, Cancellation Effective Date, Cancel Effective Date | Stornodatum, Date de résiliation, 解約日, 退保日期 |
| cancel_reason | text | Cancel Reason, Cancellation Reason, Lost Reason, Reason Lost | - |
Named exports recognised by their column names:
| System | Export | Recognised by | Layout checked against vendor docs | |---|---|---|---| | Applied Epic | Policy list report exported to Excel or CSV | Lookup Code, Account Name, Policy Number, Line Type | no; Applied Epic list reports let each agency choose its columns; the names here are common defaults, not a fixed layout. | | Vertafore AMS360 | Policy or expiration list exported to CSV | Customer #, Customer Name, Policy #, Exec, Rep | no; AMS360 calls the producer "Exec" and the service person "Rep". | | Vertafore Sagitta | Policy list report (CSV) | Client Code, Client Name, Policy Number, Coverage, Insurer | no | | HawkSoft | Client/policy export (CSV) | Client Number, Client Name, Policy Number, Line of Business, Carrier, Policy Status | no | | EZLynx | Policy report export (CSV) | Applicant, Policy Number, Line of Business, Carrier, Policy Status | no | | QQCatalyst | Policy list export (CSV) | Contact Name, Policy Number, Line of Business, Carrier, Effective Date, Expiration Date | no |
Every layout here was written from knowledge of the export ("recalled") and was not checked against vendor documentation or a live account. Agency systems let each agency choose report columns, so the first setup confirms them with inspect.
Files from other countries
A German export in Windows-1252 with semicolons, 1.234,56 and 03.11.2026, or a Japanese one in Shift_JIS with 2026/11/03, is read the same way as the English file: npm run intl in the repository rewrites every eval fixture the way a German, French, Spanish, Brazilian, Italian, Japanese, Chinese and Korean export would write it and requires the same results. Columns named differently? Run npx fairpolicy-cross-sell inspect <file> (names and shapes only, never values) and name them in fairpolicy-sources.json:
{ "files": { "exports/claims.csv": { "columns": { "claim_id": "Fallnummer" }, "date_order": "dmy" } } }Memory
fairpolicy-cross-sell can remember facts about your setup so the next run does not have to be told again. crosssell_learn only proposes a fact; it changes nothing until a named person accepts it with crosssell_accept_learning, which is one click even in Auto. Facts live in one hash-chained file per agent under .fairpolicy/memory/; if the chain does not verify, no fact is used. Credentials, personal identifiers and text that reads like instructions to an AI are refused. Run without memory with --no-memory.
| Kind | What an accepted fact changes |
|---|---|
| line_alias | reads policies with that code as that line, so their accounts are grouped correctly. It changes how lines are read only. |
| note | nothing (shown by recall only) |
fairpolicy-cross-sell memory list
fairpolicy-cross-sell memory accept MEM-1a2b3c4d5e6f --as "Your Name"
fairpolicy-cross-sell memory retire MEM-1a2b3c4d5e6f --as "Your Name" --reason "carrier renamed"Install
Node 20 or newer. No other dependencies.
npx -y fairpolicy-cross-sell demo
npx -y fairpolicy-cross-sell mcp --root /path/to/your/filesClaude Desktop, Cursor and other MCP hosts:
{
"mcpServers": {
"fairpolicy-cross-sell": {
"command": "npx",
"args": [
"-y",
"fairpolicy-cross-sell",
"mcp",
"--root",
"/path/to/your/files"
]
}
}
}Claude Code: claude mcp add fairpolicy-cross-sell -- npx -y fairpolicy-cross-sell mcp --root ., or install the fairpolicy-cross-sell plugin from this repository's marketplace (fairpolicy-medical-billing).
Modes and approvals
- Review (
--mode review): reads and reports only. - Assist (default): the policy above. A tool that asks returns an
approval_id; a person approves it once withfairpolicy-cross-sell approve <id> --as "Your Name"(or on the local approvals page,fairpolicy-cross-sell approvals), and the same call is repeated. - Auto (
--mode auto --auto <tool,...>): opt-in per tool, with step caps and a kill switch (fairpolicy-cross-sell kill). Sending, moving money, going live and accepting a learned fact stay one named click even in Auto; an approval is tied to the sha256 of the reviewed draft, so a changed draft needs a new click.
CLI
fairpolicy-cross-sell tools # every tool, its policy and arguments
fairpolicy-cross-sell sources # the columns each input is read from
fairpolicy-cross-sell inspect <file> # how a file would be read (names and shapes, never values)
fairpolicy-cross-sell call crosssell_check '{"policies":"<policies>"}'
fairpolicy-cross-sell eval # the private eval cases on the fictional fixtures
fairpolicy-cross-sell demoClient data
Results go to an AI model, so client identifiers are masked before they leave the agent (--phi mask, the default; the flag name comes from the shared core): client and insured names and client codes become stable pseudonyms such as CL-3f9a1c2e; birth dates become the birth year; driver licence numbers, addresses, phones, e-mails and SSNs are removed, also inside free text. --phi strict also hides policy numbers, claim numbers and VINs and cuts ZIP codes to three digits. Producers, account managers and carriers are not masked. The files the agent writes on your computer keep the real values, because your staff need them: keep them in a secure folder. Masking is not anonymisation, and it does not replace your agency's information-security program.
Limits
- It checks only what is in the files and settings you load. Commission schedules, state rules, deadlines and carrier requirements are as current as what you give it; the example settings are starting points, not any carrier's or state's rule.
- It is not legal, tax, accounting or coverage advice. It never binds, cancels, endorses or places coverage, and it never tells a client what to buy. A person reviews every result before anything goes to a client, carrier or producer; the agent sends nothing.
- Export layouts named in "Columns it reads" were written from knowledge of each system and not tested against a live account;
inspectshows how a file was read. - Client-data masking keeps identifiers away from the model; it does not replace your agency's privacy and information-security program (state insurance data security rules, access control, retention).
