AI product engineering

Production AI with persistent memory

I co-led the agent platform and built its standalone memory service as primary engineer. I also built the calling integration that lets an AI speak to a service provider on someone’s behalf.

Problem
Help someone move from an appliance question to useful guidance or a well-prepared service request.
My contribution
Platform co-lead, primary memory-service engineer, and owner of outbound AI calling and messaging integrations.
Outcome
Seven personally built capabilities adopted and shipped, spanning document assistance, retained context, calling and repair flows.

These capabilities were implemented separately. This walkthrough connects them using a fictional service request. Calls and bookings are simulated.

Read the engineering story ↓
Service journey · 1 of 3

Understand the problem

The assistant starts with the saved appliance, asks when the cycle stops and shows the manual passage behind its advice.

Assistant
Person P-01

“My appliance stops mid-cycle.”

Assistant

“I found your A-240. When does the cycle stop?”

Source-linked answer

“Let’s check the operating mode described in your manual.”

A-240 guide · page 18
Ask about your appliance ↑
Existing appliance recordModel A-240
Owner
Person P-01
Source
Saved product record
Identity stays with the task
A-240 user guide

Before requesting service

“Check that the operating mode matches the selected programme.”
Document A-240 · page 18
After the guidance
ResolvedKeep the explanation + source
Still unresolved →Prepare a service case
Service journey · 2 of 3

Prepare the service case

The fault persists. The case keeps the symptoms and manual reference. Memory suggests Provider B, the warranty lists B as authorised, and the calendar supplies two possible times.

Service case C-024
Carry the evidence forward

Model A-240

Cycle stops before completion.

Manual consulted
A-240 guide · page 18
After guidance
Issue unresolved
Person
P-01
Ready to review
Warranty check

Provider B

Authorised service provider

Warranty recordAuthorised service route
Listed for the A-240.
Calendar availability

Proposed windows

Tuesday10:00–11:00Available
Thursday14:00–15:00Available
No appointment booked yet
Service journey · 3 of 3

The AI calls the provider

With permission, the AI explains the fault and discusses the proposed times. Only a confirmed appointment goes on the calendar.

Call brief

Ask Provider B about the A-240. Propose Tuesday at 10 or Thursday at 2.

AI
Calling agent

Calls for you

Proposed question

“Could you service the A-240 on Tuesday at 10?”

Pending approval
Proposed call
B
Service provider

Provider B

Example provider response

The provider has not received a call.

Waiting for the approved call
Person P-01 · calendarTuesday
10:00
Unbooked
11:00

Carry the task beyond a chat reply

I co-led the platform with one other engineer. The production team adopted and shipped seven capabilities I built, including scanning and document ingestion, answers grounded in manuals, message storage and vectorisation, and calling and repair flows.

Keep the task intact across specialist agents

The Google ADK orchestrator routed requests to 16 specialist agents. FastAPI services gave them tools for product records, documents, providers and service workflows. I co-led this runtime and connected it to the services I owned.

The important distinction was between what an agent understood and what the application retained. Account and session context identified the conversation. Product records identified the appliance and provider. Workflow state preserved the current task and the person's selection, so a follow-up did not have to start from scratch.

Workflow state kept the selected provider and proposed times together while the person reviewed the call brief.

Keep memory current without losing history

I was the primary engineer on the standalone memory service, separating long-term context from the agent runtime. PostgreSQL and pgvector supported structured facts, semantic retrieval, entities and relationships that could change over time.

Remembering more text was not enough. If a person explicitly changed their preferred provider, the service needed to retrieve the new preference without erasing the earlier record or changing which appliance they owned. My work covered contradiction detection, fact versioning, expiry, category filtering and selective writes, alongside hybrid retrieval.

Choosing a provider for one repair only updates that case. An explicit request to remember the choice updates the long-term preference.

Which provider should the assistant suggest?

The person first chose Provider A. Change their preference to see what the assistant retrieves next.

Person P-01ownsAppliance A-240
Current preferenceProvider AProvider B
Version historyFirst saved preferenceProvider A retained
Returned on the next requestProvider AProvider B
Example records from a person’s service preferences. The ownership relationship stays intact when the preference changes.

Measure which context comes back

I built the memory retrieval evaluation harness to compare four representations and model configurations. The 10 April 2026 internal experiment used 303 facts and 729 queries, including adversarial cases. OpenAI + Markdown led Recall@1; Google + JSON led Recall@3. The choice depended on whether the consuming workflow needed its first result or a shortlist.

Category reports also exposed weaknesses that an overall score could hide. These results describe that dated experiment, not a validation of every later implementation of the memory service. The detailed case retains the complete benchmark tables.

Read uploads before the agent answers

Process the upload before asking the agent to reason about it. I built scanning, document-ingestion and manual-grounded answer capabilities. The product upload path classified the document, selected a suitable extractor and supplied extracted fields to the agent alongside the question.

The implementation used Google Cloud Document AI for supported document types, Azure Document Intelligence for contracts, business cards and identity documents, and Gemini Vision for inputs such as appliance labels. Original uploads and extraction metadata could be retained with account context, rather than leaving only a generated answer.

That gave the conversation concrete information to work with: which document was uploaded and what it said. It was a different workflow from the eight-stage manuals platform, which acquired and prepared the reference collection used for search.

Give the agent information, not just an attachment.

The document type determines how the upload is read.

Label imageAppliance labelModel: A-240Original upload retained
Selected extraction pathGemini Vision
Model identifier
A-240
Before the agent respondsQuestion + extracted facts

“What can you tell me about this?”

Model identifier: A-240Document type: appliance label
Invoice PDFInvoiceInvoice: INV-024Original upload retained
Selected extraction pathGoogle Cloud Document AI
Invoice identifier
INV-024
Before the agent respondsQuestion + extracted facts

“What can you tell me about this?”

Invoice identifier: INV-024Document type: invoice
Contract PDFContractAgreement: C-018Original upload retained
Selected extraction pathAzure Document Intelligence
Agreement identifier
C-018
Before the agent respondsQuestion + extracted facts

“What can you tell me about this?”

Agreement identifier: C-018Document type: contract
Example uploads and identifiers, using the implemented extraction paths. Product uploads are processed individually; the bulk manuals pipeline builds the reference collection.

Have the AI call the service provider

This is outbound AI calling, not simply a voice interface for the user. I built calling integrations that let an AI agent contact a service provider on a person's behalf. The implemented calling path passes the service request, provider and proposed appointment information to a conversational calling agent, using ElevenLabs and Twilio. Its prompt asks the agent to discuss available times and confirm the appointment details.

The call lifecycle matters as much as the conversation. Initiating a call is not confirmation of a booking. A completion handler inspects the conversation outcome and can create a calendar event when it identifies a confirmed appointment. The separate availability tool reads calendar events to propose free periods; creating a calendar entry alone does not contact a provider.

The wider team built the shared workflow, persistence and safety components.

Keep the person's channels distinct from the provider call

I also owned integrations across Vapi, Twilio and ElevenLabs, with WebSocket and SSE streaming, and WhatsApp and LINE entry points. These let the person communicate with the assistant. The outbound calling path lets the assistant speak to a provider.

LINE included provider cards with click-to-call details, appointment-ticket summaries and calendar choices. A person could inspect options and confirm a selection. A click-to-call card and a call initiated by an AI agent are different capabilities; neither means every incoming message is permission to act.

Underneath these interfaces, my integration work covered live audio, conversation context, transcripts and connection cleanup. Those are the transport details supporting the product behavior, rather than the headline of the story.

Two directions of conversation.

The person messages the assistant. The calling agent speaks to the provider.

Person → assistantWhatsApp, LINE and conversational audio bring questions and choices into the product.

AI → service providerOutbound calling carries the service brief into a provider conversation.

Separate implemented interfaces. LINE also includes provider cards, ticket summaries and calendar choices.

Reuse backend tools through APIs and MCP

Reuse product operations instead of rebuilding them for each client. The platform exposed backend operations for records, documents and service tasks through APIs. I built and deployed two MCP servers on Google Cloud Run, making existing backend tools available to additional agent clients through typed interfaces.

The MCP deployments were an integration branch, not a replacement for the web, voice and messaging paths. Their purpose was to reuse the product's capabilities through another interface. My broader integration work also included Home Assistant device controls.

That connected product engineering to deployment and operation of the supporting services. The cloud foundation case covers my environment, delivery and recovery responsibilities.

One product, more than one way to use its tools.

Additional agent clients reuse existing operations through a separate MCP branch.

Product clientsWeb · voice · messaging
Product interfacesBackend APIs
Existing backend operationsRecords · documents · service tasks

Shared capabilities, exposed through different interfaces

Other agent clients
Integration branch I built and deployed2 MCP serversGoogle Cloud Run

Typed interfaces to existing tools

Simplified responsibility map. Product APIs and the two Cloud Run MCP deployments provide separate interfaces to existing backend operations.
Keep exploring

Document intelligence at scale

Acquisition, recovery and quality decisions across a document platform.

Open case study ↗