Alex OS
A FastAPI reasoning and retrieval layer that sits between the CMS and the public site — grounded answers, journey-aware recommendations, and a relationship-graph reasoning pass, not an open-ended chatbot.
- Category
- ai_rag
- Tech stack
- FastAPI, Python, Anthropic API, Postgres, pgvector
- Metrics
- Source-grounded answers, Per-call cost tracing
- Role
- Architecture + build
Content
Alex OS is a separate service, not a feature bolted onto the CMS. It reads structured content through the CMS's internal API, retrieves and ranks relevant items, and answers questions using that content as grounding — it doesn't invent facts and it doesn't have its own opinions about what a visitor should see. The three homepage journeys (Proof, Build, Thinking) influence what it prioritizes when answering, but the assistant doesn't create or control the journeys themselves.
Problem
A static portfolio site can show work, but it can't answer specific questions about it, connect related pieces, or reprioritize itself based on what a visitor actually cares about.
Architecture
FastAPI service with distinct route groups for ask/surface/recommend/capture/synthesis/admin, a config-driven engine layer (persona resolver, model router, block composer), and a services layer for retrieval, embeddings, and relationship-graph traversal. Reads CMS content over an internal HTTP API rather than touching the CMS database directly.
Decisions
Chose to make Postgres/pgvector optional with a keyword-scoring fallback rather than a hard dependency, so retrieval degrades instead of failing outright. Chose config-driven personas/prompts (stored as data, editable without a redeploy) over hardcoding assistant behavior in Python.
Limitations
Production hardening is still an open checklist item per the internal progress tracker — confirming Nginx doesn't expose the service publicly, rate limits on public AI endpoints, and secret handling are noted as unconfirmed rather than done.
Next steps
Close out the hardening checklist; expand automated eval coverage for retrieval quality.
Outcome
Grounded Q&A, journey recommendations, and content surfacing.