I Built RECALL AI to Help Support Agents Remember What Already Happened
Building a customer support prototype with persistent memory, FastAPI, Supabase, Groq, and Hindsight.
A customer contacts support because their Bluetooth headphones keep disconnecting. The agent suggests restarting Bluetooth. The customer tries it, but the problem continues.
When that customer comes back later, a support assistant should be able to use that history. It should know that the issue is recurring and that the first suggestion did not help. Otherwise, the customer may have to explain everything again—and could receive the same advice again.
That is the problem I set out to explore with RECALL AI, a customer support prototype that combines an AI-assisted support workflow with persistent memory.
The problem: a transcript is not useful memory by itself
A conversation log can tell us what was said. A support agent also needs to understand what happened:
- The customer reported a recurring problem.
- The agent suggested a troubleshooting step.
- The customer later said the step did not work.
- The issue is still unresolved.
Those are different facts. In particular, an agent's suggestion does not prove that the customer tried it, and an unresolved problem should not be marked fixed without customer confirmation.
RECALL AI explores how to keep those distinctions available across support sessions.
The stack
The project has a React and TypeScript dashboard backed by a FastAPI application. Supabase PostgreSQL stores structured application data such as customers, conversations, messages, and support activity. Groq provides language-model responses, and Hindsight provides the persistent memory layer.
The separation is useful: Supabase is the application's record store, while Hindsight is used to retain and retrieve contextual information that can inform later conversations.
\
How I integrated Hindsight
I kept the Hindsight integration behind a small client factory and a MemoryService. The factory reads the configured base URL and API key from backend settings and creates the SDK client only when credentials are present:
def create_hindsight_client(settings: Settings) -> Hindsight | None:
if not settings.hindsight_api_key:
return None
return Hindsight(
base_url=str(settings.hindsight_base_url),
api_key=settings.hindsight_api_key.get_secret_value(),
timeout=20.0,
max_attempts=1,
)
The service wraps Hindsight's asynchronous operations so the rest of the application can work with workspace and subject identities instead of constructing bank IDs itself. It uses three memory operations:
- Retain saves useful facts from an interaction.
- Recall retrieves facts relevant to the customer's current message.
- Reflect asks Hindsight to synthesise an answer from a customer's stored memory when that kind of summary is useful.
For example, the recall path is a small call through the service:
bank_id = await self.ensure_bank(workspace_id, subject_id, subject_type=subject_type)
return await self.client.arecall(
bank_id=bank_id,
query=query,
include_source_facts=True,
tags=tags,
tags_match=tags_match,
)
The include_source_facts option helps the application inspect where recalled information came from before using it. The service also wraps SDK errors in application-level memory errors, so the API can handle an unavailable memory service consistently.
Giving each customer a scoped memory bank
The backend's MemoryService derives a Hindsight bank ID from the workspace, subject type, and canonical customer or visitor UUID. It uses HMAC-SHA256 with a dedicated secret, so raw customer identifiers do not appear in the bank name.
message = "\0".join(
("workspace", workspace_id, "subject", subject_type, canonical_id)
).encode("utf-8")
digest = hmac.new(
self._bank_id_secret.encode("utf-8"),
message,
hashlib.sha256,
).hexdigest()
return f"{self.bank_prefix}-{digest}"
This creates deterministic, workspace- and subject-scoped identifiers. It is an identifier strategy; authentication and authorization still belong to the application.
The memory service also gives Hindsight retention guidance to distinguish reported problems, attempted steps, failed attempts, successful fixes, preferences, confirmed resolutions, and unresolved issues. It explicitly says not to infer that an issue is resolved without confirmation.
When an interaction finishes, the workflow retains customer-reported text, the assistant response, and extracted model suggestions as separate records. It tags and labels their provenance; suggestions are marked unverified. When a customer explicitly reports a previously recommended action failed, the application links that report to the prior recommendation and retains a separate failed-attempt record with metadata describing the customer report. That lets later retrieval distinguish “the model suggested this” from “the customer says they tried this and it failed.”
Recall comes before response generation
A central design choice is to retrieve relevant memory before asking Groq to generate a response. In the support agent, the workflow recalls memory for the current workspace and customer, then prepares a bounded context for the model.
That context includes provenance checks and any relevant failed troubleshooting actions. After generation, the application checks the response against known failed-action constraints. If it cannot validate that a response avoids a reported failed step, the workflow can escalate instead of treating the generated answer as safe to send.
The ordering matters: memory informs the response while it is being generated. It is not attached after the fact.
Following a support interaction through the system
At a high level, a message moves through these stages:
- The frontend sends it to the FastAPI backend with workspace context and an idempotency key.
- The backend validates the request and loads the relevant conversation context.
- The support agent retrieves relevant customer memory from Hindsight.
- Groq generates a structured response using the current issue and prepared context.
- The workflow applies its failed-action checks and handles escalation where needed.
- Conversation data is saved in Supabase, and relevant information is submitted for memory retention.
The project also includes a development-only demo endpoint for a synthetic customer journey. It is guarded by development configuration and explicit demo seeding, rather than intended as a public customer endpoint.
A three-stage example
The repository includes a synthetic customer demonstration built around Sarah and a recurring Bluetooth issue.
First interaction: Sarah reports that her headphones disconnect about every ten minutes. The initial troubleshooting suggestion does not solve the problem.
Follow-up: Sarah returns and reports that forgetting and re-pairing the headphones did not help. The workflow can associate that reported failure with a previously recommended action and retain it with provenance.
Later session: Sarah asks for another step based on her support history. The agent can use the recalled context to move toward a different diagnostic direction, such as checking for headphone firmware or operating-system updates.
This is a demonstration of the intended workflow, not a guarantee that every repeated recommendation will always be prevented. The application currently models a bounded set of troubleshooting actions, and memory quality depends on what was reported, retained, and retrieved.
What I learned
Persistent memory is more than storing a longer transcript. The system needs to keep track of who reported a fact, whether an action was suggested or attempted, and whether an outcome was confirmed.
I also learned that retrieval alone is not enough. Even when relevant history is available, the application still needs checks around how the generated response uses it. RECALL AI combines memory with application-level provenance and response validation for the supported troubleshooting actions.
The boundary between a working prototype and a production support platform matters too. The project has a development demo and a broad backend test suite, but those do not establish production reliability. Live-service behavior, security configuration, operational monitoring, broader action coverage, and realistic evaluation still need further work before a production deployment.
What's next
The next steps are to expand the supported troubleshooting actions, evaluate memory relevance across more scenarios, and test longer multi-session support journeys. I would also want to validate behavior against live integrations and strengthen the operational pieces required for deployment.
The goal is straightforward: support should build on what has already happened. Customers should not have to repeat their history, and an agent should have a way to recognise when a suggested fix has already failed.
Project: RECALL AI on GitHub
Technologies: React, TypeScript, FastAPI, Supabase, Groq, and Hindsight
Comments
Join the discussionPersistent memory can help support, but I’d make retrieval deliberately narrow: start with the customer’s account or product and issue category, then surface only a few prior cases with resolution, version, and date. Keep the source ticket attached so an agent can verify the memory instead of treating a summary as policy. I’d also separate durable facts (device model, confirmed workaround) from one-off guesses, and expire or re-check anything tied to a software version. For evaluation, replay a small set of repeat-contact tickets and measure whether the suggested context is correct and reduces time-to-resolution; route low-confidence matches to a human rather than letting memory silently steer the answer.
