What shipping an AI assistant for STEM education taught me

Latency, invented components, one agent doing everything, slow database reads and checkpoint bloat. What broke in production and how I fixed each.

Abdullah Abdul Samad, . A 1 minute read. First posted on LinkedIn in April 2026.

I built an AI assistant for STEM education. It helped students explore robotics projects, suggested components, and generated curriculum plans for teachers. On paper that is simple. In practice it was not even close.

Here is what broke and how I fixed it.

Latency

Students and teachers do not wait. If responses are slow, they leave. The cause was inefficient async handling and non-streaming responses in my first setup. I fixed it by streaming responses, trimming API calls and running requests in parallel where possible.

Components that did not exist

The model would confidently recommend parts that were not real. I moved to structured retrieval instead of relying on the model alone.

One agent doing everything

It does not scale and it does not work. I split the agent into structured workflows, each with a clear responsibility.

API integrations

Far messier and slower to build than any demo makes them look.

Context and memory

Keeping context across interactions is still one of the most underrated hard problems in AI systems.

Slow database reads

Fetching user data took 100 to 300 ms each time. I built a thread-safe in-memory cache with expiry for user data, which brought fetches to under 1 ms and cut the load on the database.

Checkpoint bloat

Old conversation checkpoints piled up and started to affect performance. I added a cleanup utility that removes stale data on a schedule.

The stack

Python, FastAPI, LangChain, LangGraph, LangSmith, Next.js, Supabase, AWS and the Shopify APIs.

The takeaway

The hard part of AI is not the model. It is the architecture around it.