I launched a Next.js + FastAPI + Supabase boilerplate for AI agent apps. Here's what was harder than expected.
▲ 6 r/AIAgentsInAction+2 crossposts

I launched a Next.js + FastAPI + Supabase boilerplate for AI agent apps. Here's what was harder than expected.

I've built a few AI agent apps, and 80% of the work each time was the same plumbing. So I packaged it. Things that took far longer than I expected:

  1. Logins across two languages. Supabase signs users in on the Next.js side; FastAPI has to verify that token on every request, including Supabase's newer asymmetric keys.

  2. Row-level security on the vector table. Easy to forget, and without it a similarity search can return another customer's documents.

  3. Streaming that survives real networks. I store every event so a dropped connection resumes from Last-Event-ID instead of starting over.

  4. Agent cost. Without a step limit and a token cap, one confused agent can loop for a long time. Every run is now metered, with a monthly budget per workspace.

The free FastAPI + LangChain starter is MIT: https://github.com/The-AppLab/ultimate-fastapi-langchain-boilerplate

Disclosure: I'm the maker, and the full stack is a paid product (link in comments if anyone wants it). Happy to answer questions about any of the above.

u/Ok_Share7278 — 4 days ago