Abdulkader Safi

My CRM's AI agents filed 10 feature requests. I built all 10

Eight AI agents used Private CRM over MCP and sent 10 requests: deal fields, invoices, projects, outbound stages, Upwork data and reports. Here is each one.

6 min read

Share
Checklist of 10 feature requests from AI agents next to a nine-column CRM pipeline board

On day two, Private CRM got a list of feature requests from its users. The users were eight AI agents working in the CRM over MCP, and they had sent 10 requests between them.

The pull request was called "Team requests from the CRM bots: all 10 items". It built every one, in the order they blocked work, one commit per item. Here's what they asked for and the decisions behind each.

1. Change one field without resending the deal

Agents could create deals but not fix them. update_opportunity and update_contact take only the fields to change, and null clears one. A stage of Won or Lost still waits for a person (part 5). update_contact refuses an email another contact already has.

2. Deal fields sales and finance needed

Each deal got its own currency (the company's by default, AUD added), a quoted value next to the final one, payment terms, a next follow-up date, a market, a package and add-ons from the services catalog, and a lost category.

Source became a fixed list of 10. Migration 032 mapped the old free-text spellings: "twitter" became x, "cal.com" became cal_com. Anything it couldn't map moved into the deal's notes as "(Source: ...)", so no text was lost. The pull request told whoever deployed it to back up the database first, because that migration rewrites a column.

3. Invoices and payments

Invoices are numbered INV-<year>-<nnn> and hold line items, a currency (the deal's by default) and an optional milestone: deposit, mid or final.

Only two statuses are chosen by people: draft and sent. Paid, partly paid and overdue are derived from payments and the due date. A nightly run at 05:00 UTC marks late invoices overdue and notifies their owner. A payment can't go over the balance. An invoice with payments can't be voided or moved back to draft, and only a draft's lines can change. Bank details live once in Settings and come back with get_invoice.

Five tools: create_invoice, list_invoices (with totals per currency), get_invoice, update_invoice, record_payment. There were no invoice pages in the app yet, only MCP.

4. Projects and payment milestones

create_project with from_opportunity_id turns a won deal into a project. The deal's title and contact carry over, plus its value, its currency and its payment terms. 50/30/20 terms give three milestones with a draft invoice each; part 4 shows the rounding.

The limit is three projects in planning or active. A fourth in planning or active is refused until the call sends allow_over_capacity, which the tool description says an agent should only send after a person agrees. The limit is a constant for now, and the pull request says so.

5. Follow-ups that survive a mailbox sync

log_activity now takes when the thing happened, its direction (in or out), a subject and a Gmail message id. The same Gmail id on the same deal returns the first entry with created: false. A Cal.com call is its own kind, booking.

One subtle rule: logging an old email never moves a deal's last activity back in time. Without it, a sync importing last month's thread would make an active deal look quiet (part 9 covers quiet deals). Migration 035 copied each old activity's logged time into a new occurred_at column, and the deal timeline now sorts by when things happened, not when they were logged.

New tools: list_activities, list_tasks and complete_task. list_opportunities takes follow_up_by for open deals due a follow-up.

6. Outbound stages

Three new stages, contacted, replied and call_booked, now sit between lead and qualified, so sales can count each step of the outbound funnel. Inbound deals can still jump from lead to qualified.

Stages are stored as text, so this needed no migration. The board went to nine columns and scrolls sideways, which later led to a "wider pipeline columns" commit: 21rem each, about twice as wide, so deal titles fit on one line.

7. Companies and prospect fields

search_companies, create_company and update_company. Creating a company whose name you can already see returns that company, so two agents don't add the same prospect twice. Contacts got website, country, LinkedIn, the problem found, an email status (valid, bounced, replied) and a do-not-contact flag. search_contacts matches an email domain or the company's name.

8. Upwork proposals

Deals can hold the Upwork job URL, proposal id, bid type and amount, Connects spent, submission date and proposal status, plus the client's country, rating, total spend and hire rate.

The job URL is stored without tracking parameters. Creating a deal for a job already logged returns that deal. If someone the agent's person can't see logged it, the call is refused instead, so two people never bid on one job without knowing.

9. Reports, and no more mixed sums

Five read-only tools: finance_summary (invoiced and received per month and currency, what's owed, overdue invoices in 1-30, 31-60, 61-90 and 90+ day buckets), source_report, deals_by_package, milestones_due and upwork_summary.

source_report has one detail I like: a lost deal counts as qualified when its timeline shows it got that far. Otherwise every lost deal would drag the qualification rate down, even ones lost at proposal.

This item also stopped adding money across currencies everywhere (part 4).

10. The small ones

Campaign fields on contacts and deals (utm_source, utm_medium, utm_campaign), case study consent with a testimonial and URL, and list_packages. The deal tools had been telling agents to call list_packages for a while. It didn't exist until this commit.

Numbers at merge

  • 138 tests passing, clippy clean
  • migrations 032 to 038
  • tool count well past 30

The last commit on main before the next feature moved invoice and project rules out of the MCP tools into actions::invoices and actions::projects. Invoice pages are coming, and they need the same rules the agents use. Rules belong in one place; the MCP layer only shapes JSON.

What I took from it

Agents make good product managers in one narrow way: they hit missing tools immediately and describe the gap exactly. Building their list in blocking order, one commit each, kept every change small enough to review. For the review side of AI-heavy work, see AI made writing code cheap, review is still expensive.

Part 7 goes back to people: tags, a search box that understands Arabic spellings, and CSV imports.

Last updated 4 Dec 2026 · filed under Rust, claude, crm, agents, ai agent

Every entry on this project

12 build notes, in order

Including the ones where nothing worked. You are on part 6.

Read the series →

FAQ

Frequently asked questions

What do AI agents need from a CRM?

In Private CRM's case, the agents asked for partial updates on deals and contacts, invoices and payments, projects with payment milestones, follow-up dates, deduplicated email logging, outbound funnel stages, Upwork proposal fields and read-only reports. Most requests were about writing safely and reading totals without doing math across currencies.

How do you stop a mailbox sync from logging the same email twice?

Store the Gmail message id on the activity. In Private CRM, log_activity with a Gmail id that is already logged on that deal returns the first entry with created: false instead of adding another. Logging an old email also never moves a deal's last activity date backwards.

How should invoice status be stored?

Store only what a person decides, draft or sent, and derive the rest. In Private CRM paid, partly paid and overdue follow from the payments and the due date, and a nightly job marks late invoices overdue. A payment can't exceed the balance, and an invoice with payments can't be voided.

Can a schema change in a deal stage list avoid a migration?

Yes, if stages are stored as text. Private CRM added contacted, replied and call booked between lead and qualified without any migration. Only the enums in the code, the board columns and the MCP tool descriptions changed.

Written by

Abdulkader Safi

Software Engineer

Lead engineer at DSRPT, from Lebanon and based in Kuwait. I write about the tools and bugs from real client work, with the numbers I measured.

About me → GitHub LinkedIn

Need this kind of work done on your project?

Start a project →

Keep reading

More from Private CRM: an AI CRM where Claude does the data entry and you make the calls

All 12 entries →