At a Glance
| Field | Detail |
|---|
| Client | Family connection mobile platform (under NDA) |
| Sector | Consumer social, private family networks |
| Engagement | Design, build, and integrate a personalized daily question engine |
| Platform | LangGraph, Agentic RAG, OpenAI GPT, FastAPI, AWS EC2, Docker |
| Focus | Structured JSON personalization served to a mobile app in real time |
| Outcome | Increased daily user engagement through personalized storytelling prompts |
The Product
The client runs a premium, invite-only mobile platform that helps families stay genuinely connected: no ads, no algorithms, no strangers. Its signature feature is a daily group prompt. Every day, family members receive a question designed to spark a story, a memory, or a conversation, and their answers, in text, voice, or video, build a shared family archive over time.
The daily question is the heartbeat of the product. If it lands, families talk. If it feels generic, the streak dies and so does the habit. The client wanted every member to receive questions that felt written for them personally, and they needed it delivered as a clean API their mobile app could consume without friction.
The engagement centered on four objectives:
- Generate daily questions personalized to each user's profile, preferences, and moment in time.
- Match the emotional tone of prompts to the person and the occasion, not just the topic.
- Deliver everything as structured JSON through fast, reliable REST endpoints the mobile app consumes directly.
- Deploy a production service the client's team could operate, monitor, and evolve.
The Challenge
The core tension of this project was personal versus repeatable. A human writer can craft a touching question for one family; the system had to do it for every user, every day, automatically, and hand it to a mobile app as clean data.
-
Generic prompts kill engagement. A question bank on rotation feels like a question bank on rotation. Personalization had to run deep: a user who chose humor packs should get playful prompts, one focused on spirituality or self-reflection should get depth, and a dad should get questions that fit that role.
-
Timing is part of the message. The right question on a random Tuesday is different from the right question before a birthday or heading into a weekend. Temporal context, birthdates, day of the week, upcoming weekends, had to shape generation, not just profile data.
-
An LLM behind a mobile app cannot improvise formats. The app renders prompts natively, which means the API must return strict, structured JSON every single time. One malformed response is a broken screen in a paying member's hands.
-
Production from day one. This was not a demo. The service had to run reliably on the client's AWS infrastructure, be observable when something misbehaved, and integrate into an existing mobile release cycle.
My Approach
I built the feature as an agentic service with a hard contract at its edge: creative generation inside, strict JSON outside.
An agentic generator, not a prompt template. The question generator is a LangGraph agent using Agentic RAG over user context. For each user it reasons over profile attributes, selected preference packs such as dad-pack, humor, spirituality, and self-reflection, and temporal signals like birthdate, day of the week, and upcoming weekends, then composes a question aligned with the user's emotional tone and moment. The same machinery produces a playful weekend prompt for one member and a reflective one for another, from one codebase.
Structured output as a contract. Generation is constrained to a defined JSON schema that the mobile app renders natively. The app team integrates against a stable shape, and the AI's creativity stays inside the fields.
FastAPI as the integration surface. The agent is served through FastAPI REST endpoints purpose-built for mobile consumption: fast responses, clean status codes, and predictable payloads. FastAPI's typed request and response models double as living documentation for the mobile team, so integration questions were answered by the schema instead of by meetings.
Deployed and observable on AWS. The service runs Dockerized on AWS EC2. LangSmith tracing covers every generation end to end, and LangGraph Studio was used throughout development to inspect and debug the agent's reasoning paths before they reached users.
Engineering Highlights
- LangGraph agent with Agentic RAG. Context-aware generation reasoning over profile, preference packs, and temporal signals per user, per day.
- Preference-pack personalization. Dad-pack, humor, spirituality, and self-reflection styles shape tone and subject, so the same feature feels different to every member.
- Temporal awareness. Birthdays, weekdays, and upcoming weekends steer question selection, making prompts feel timely instead of scheduled.
- Strict structured JSON. Schema-constrained output the mobile app renders directly, with no parsing gymnastics on the client side.
- Mobile-first FastAPI design. Typed Pydantic models, predictable payloads, and response times fit for an in-app daily experience.
- Dockerized EC2 deployment. A containerized service on the client's own AWS account, fitting their existing operations.
- Full generation tracing. LangSmith instrumentation on every request, so any odd question can be traced back through the agent's reasoning.
- Studio-driven development. LangGraph Studio used to visualize and debug agent paths during development, shortening the iteration loop.
The Impact
- Daily engagement went up. Personalized storytelling prompts gave members a reason to open the app every day, and the client credits the feature with increasing daily user engagement.
- The mobile team shipped without friction. A stable JSON contract and typed FastAPI endpoints meant the app integration was a consumer of clean data, not a negotiation with an AI system.
- Personal at scale. Every member receives questions shaped by who they are and what day it is, from a single automated service.
- A pattern to build on. The agent, schema, and API structure generalize to other personalized content surfaces the platform adds next.
Tech Stack and Deliverables
- Platform: LangGraph, Agentic RAG, OpenAI GPT, LangSmith, LangGraph Studio
- Backend: FastAPI, Docker, AWS EC2
- Deliverables: Agentic question generation service, personalization logic over preference packs and temporal context, structured JSON output schema, mobile-facing REST API, Dockerized AWS deployment, tracing and observability setup