The product and the problem
MUSAIDI is a personal-AI-assistant prototype delivered as a Flutter app and a FastAPI backend. It demonstrates an assistant that can call tools, retain customer-specific memory, and report usage through an administrative interface.
I built this as a client demonstration with a deliberately smaller scope than a commercial service. The prototype demonstrates the application/backend contract, tool actions, customer-specific records, and usage controls before production delivery.
System overview
Customer-scoped assistant
Customer + role-gated admin
Tenant scope + usage limits
- LangGraph
- Memory
- Tools
How the experience works
Create an account and start a conversation
The prototype begins with a customer account and its own tenant context. The Flutter app presents conversations through the backend’s defined API contract. This gives the demonstration a complete application path: account entry, an authenticated request, a conversation record, and an assistant response. It also establishes which customer owns the records created during the interaction.
Remember a fact or request an action
A customer can provide information for later conversations or ask the assistant to use a tool. The documented prototype includes web search, personal memory, and reminder creation. These interactions go beyond producing a plausible message: the backend needs an operation, a stored result where applicable, and a response that agrees with what actually happened. Reminder creation in this version means creating the record; notification delivery belongs to a later stage.
Give an administrator a different view
An authorized administrator can access the role-gated admin area inside the same Flutter app. The documented scope includes customer management, usage, plans, limits, and status. A customer and an administrator therefore share the application shell while using different capabilities. The backend remains responsible for enforcing those roles on the corresponding endpoints.
My contribution
- Built the Flutter customer experience and role-gated admin area.
- Connected FastAPI, PostgreSQL, LangGraph, and the AI provider through a separate AgentService.
- Implemented scoped conversations, memories, reminders, tool actions, and metered usage.
- Documented the verification workflow and the boundary between the demo and a commercial MVP.
Architecture and implementation
Put assistant behavior behind AgentService
The main boundary in MUSAIDI is AgentService. The FastAPI layer handles HTTP requests, authentication, tenant context, and usage enforcement, while the service coordinates assistant behavior through LangGraph and the model provider. PostgreSQL stores the application records.
This separation gives a future communication channel a clear integration point. A WhatsApp adapter could translate an incoming message into the same application operation without rebuilding the assistant inside a webhook handler. That is an architectural direction demonstrated by the boundary, rather than a claim that the commercial WhatsApp channel is complete.
Carry customer scope through every record path
The prototype documentation scopes conversations, memories, reminders, and usage to a customer. The same scope needs to apply when creating a record, listing records, continuing a conversation, or looking up an existing identifier. Tenant context therefore belongs in the application’s data access responsibilities as well as its sign-in flow.
The documented behavior includes returning a not-found response when a direct identifier lookup falls outside the customer’s scope. The case study describes that intended and implemented boundary without turning it into a broad security-audit claim. A commercial release would still need production-specific testing, operational controls, and monitoring.
Agree on the contract before integrating the app
The project specifies backend and API verification before the Flutter integration. An OpenAPI-derived JSON contract gives the mobile work a concrete set of request and response shapes. The app also has a mock mode for reviewing the interface without a live backend.
That combination supports two distinct review tasks: checking the mobile experience in isolation and demonstrating the complete backend-connected path. My implementation responsibility covered the Flutter customer/admin experience and the backend/AI prototype, so a clear contract was useful for keeping those pieces aligned.
Key engineering decisions
Keep assistant logic behind a service boundary
AgentService is separate from HTTP and Flutter concerns, so a later channel can call the same application logic rather than duplicating the assistant.
Scope records to the customer
Conversations, memories, reminders, and usage are scoped to the customer. The intended isolation boundary is explicit; broader security claims would require production-specific verification.
Make usage and limits visible
The prototype records token use, approximate cost, and plan limits, giving an administrator a basis for controlling the demonstration rather than treating AI calls as unmetered.
Challenges and trade-offs
Make tool outcomes agree with the assistant’s words
A personal assistant becomes difficult to trust when it says it saved a fact or created a reminder without a corresponding operation. The MUSAIDI prototype explicitly calls real tools and records the relevant application state. The resulting response should describe the operation’s actual outcome.
This also makes the boundary of the demonstration clearer. A saved reminder record is visible backend behavior. Scheduling and delivering a push notification requires another delivery path, device handling, and operational verification. The prototype demonstrates the former and identifies the latter as deferred work.
Keep usage and cost visible while exploring the product
The prototype meters AI requests with token use, approximate cost, and customer plan limits. An administrator can adjust the limits without changing application code. That creates a practical control surface for a client demonstration and for later product discussions about packaging and operating cost.
The cost values are estimates, and a usage dashboard is one part of a commercial system. Billing, payment collection, subscription lifecycle changes, and production enforcement operations still require their own implementation. Separating those responsibilities lets the demonstration prove a focused slice without disguising the remaining work.
Validation and delivery considerations
Review the boundaries through two customer accounts
The project’s verification direction includes registration, authentication, a new conversation, tool execution, memory retrieval in a later conversation, and customer-specific usage. A particularly important review uses two accounts and attempts to cross the conversation, memory, reminder, and direct-record boundaries between them.
Administrative behavior has a separate check: hiding an admin screen is insufficient evidence of server authorization. The backend must decide whether each protected request is permitted. These are concrete verification questions supported by the documented architecture; this portfolio does not publish an independent audit result.
Separate a repeatable demo from production readiness
The project documentation includes an offline backend test command, a live end-to-end verification gate, Flutter analysis/tests, local database setup, and device/backend configuration. It gives the next reviewer a way to reproduce and inspect the demonstration rather than relying only on a polished conversation.
The source package does not include those execution logs. Commercial hardening also remains outside the prototype: recovery flows, migrations, rate limiting, observability, backups, payments, file understanding, and reminder push delivery need further work. The case study uses those boundaries to explain what the client could evaluate at the demonstration stage.
What was delivered
A Flutter customer/admin prototype connected to FastAPI, PostgreSQL, and an AI orchestration service. It demonstrates tool calling, personal memory, reminder records, and usage tracking through a defined backend/mobile contract.
Project scope
- Format
- Client demo prototype with customer and role-gated admin experiences.
- Architecture
- Flutter, FastAPI, PostgreSQL, and a separate AgentService.
- Boundary
- Tool actions, memory, reminder records, and metered usage, with production delivery work kept separate.
This is a client demo prototype. WhatsApp integration beyond a webhook stub, payments, reminder push delivery, recovery flows, vector storage, and production hardening are outside this version. Creating a reminder record is separate from delivering its notification.
Key takeaways
- A useful assistant prototype connects conversation, tool execution, persistence, and customer identity through one application contract.
- A separate assistant service provides a clearer foundation for adding channels after the initial mobile demonstration.
- Tenant scope, role checks, metered usage, and the distinction between recording an action and delivering it deserve explicit review.
