Skip to content
Dexisphere
All posts
Engineering · 8 min read

How work receipts work: diffing your records around every turn

Why we compare your records before and after each chat turn instead of trusting an activity log.

Luca FerrariStaff Engineer
Share

Every reply from a Dexisphere agent can carry a work receipt: a short list of what changed in your records during that turn, each line linking to the record. It looks simple. This post explains why we built it the way we did, and the trade-offs we accepted along the way.

Why not just log the tool calls?

The obvious design is an activity log: every time the agent calls create_lead or move_deal_stage, write a row. We tried to lean on that, and ran into two problems.

  • A log describes intent, not outcome. A tool call can succeed, partly succeed or be retried. The log says what was attempted; your CRM says what's true.
  • A log can't see everything. If a teammate moves a deal while the agent is working, a tool log has no idea. Your records do.

So we flipped it around. Instead of asking the agent what it did, we ask your records what changed.

Snapshot, turn, snapshot, diff

When you send a message, the app takes a lightweight snapshot of your workspace, the agent runs its turn, and then the app takes a second snapshot and compares the two. The snapshot covers the things agents touch:

AreaWhat we compare
ListsNames and lead counts (from contacts_count, not every lead)
DealsNew deals and stage moves
Tasks and appointmentsCreated, completed and rescheduled items
CampaignsEmail, SMS and WhatsApp campaigns
FunnelsNew and updated funnels

The diff turns into human lines: "Added 32 leads to Leeds dental – Sept", "Moved Harbour Physio to Proposal", "Booked a call with Dr. Shah for Thursday 10:00". Each one links to its page in Records.

Failing safely

A receipt that lies is worse than no receipt. Most of the engineering went into making sure missing data never looks like a change.

  • A read that fails is skipped. If the deals endpoint times out on the second snapshot, deals are left out of the receipt. They never show up as "deleted".
  • Fresh snapshots are reused. If the last "after" snapshot is under 60 seconds old, it becomes the next turn's "before", which keeps rapid back-and-forth fast.
  • The message never waits. If the "before" reads take longer than 4 seconds, the turn goes ahead without a receipt rather than holding your message back.
  • Failed turns still get receipts. An agent can change things before it hits an error, and you should see those changes.

The rule we kept coming back to: never make the user choose between speed and honesty. If we can't be sure, we say less.

Luca Ferrari, Staff Engineer

Changes you didn't make

Because receipts come from your records, they catch changes the agent didn't make, like a teammate's edit or an automation firing mid-turn. We don't hide those or attribute them to the agent. The receipt notes that some changes may have happened elsewhere during the turn, so you can tell the difference.

What's next

Receipts changed how we test agents internally: instead of reading transcripts, we read diffs. We're working on making them richer, with more record types and clearer grouping for big turns. If you have ideas, tell us.

  • Receipts
  • Architecture
Share

Hand the busywork to an agent.

Describe what you'd do by hand today. Your agent finds the leads, drafts the messages, updates the pipeline and leaves you a receipt.

  • Free forever plan
  • No credit card required
  • Lifetime deals, no renewals