Urgent.News

What's breaking now, across thousands of outlets.

Tech

The Boring Backend Work That Made PayEcho's Memory Actually Reliable

Everyone wants to talk about the AI part. Nobody wants to talk about the part where an invoice update arrives twice because a webhook retried, and now the agent has “remembered” the same payment outcome three times. That's the part I owned, and it turns out it matters more than the prompt. PayEcho recommends how to recover an overdue invoice — which channel to use, when to follow up, whether a…

The article discusses the importance of the backend infrastructure behind PayEcho's Hindsight system, which builds memory based on customer interactions and invoice updates. The author, who owned the backend work, explains that the reliability of the system hinges on accurate, deduplicated, and current data.

PayEcho maintains two separate stores: a transactional database with the factual records of payments, invoices, and recovery attempts, and Hindsight, which holds interpreted memories of these events. The key to the system's reliability is the "synced_to_memory" flag, which indicates whether a transactional row has been successfully turned into a memory.

The article explains how the sync pipeline works, deciding when a row becomes a memory based on whether the outcome is final. If the sync job crashes mid-batch, no data is lost because the flag update happens per row, not as a single commit. This ensures the agent does not see duplicate versions of the same outcome.

To streamline data access, the author built a single internal API that both the dashboard and the recommendation agent can read from. This eliminates inconsistencies between the two parts of the system, such as the dashboard showing an invoice as paid while the agent still references it as outstanding.

The author provides an example where a payment received through bank reconciliation was successfully remembered by the agent, without any additional prompt engineering. This demonstrates that the backend design, ensuring accurate and current data, was as critical as the memory design itself. The backend components - the schema, sync pipeline, and shared API - work together to provide reliable, accurate context to the recommendation agent.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The Backend That Makes My Payment-Recovery Agent Remember the Right Things

A payment fails. Someone on finance pulls up the customer, sees a balance and a due date, and sends the same email reminder they'd send anyone.

  • PayEcho uses Hindsight memory layer to remember customer payment behavior.
  • Backend divided into transactional data store and intelligence store.
  • Hindsight recalls specific details for personalized recommendations.

The Collections Agent Stopped Guessing Once It Remembered

The Collections Agent Stopped Guessing Once It Remembered A wide banner shot: split-screen of the PayEcho dashboard on one side and a WhatsApp reminder thread on the other.

  • PayEcho uses Hindsight to remember past customer interactions.
  • Memory panel shows distilled statements about customer behavior and preferences.
  • AI agent panel provides recommendation with reasoning based on customer history.

More from Sunday 27 September →