Separate responsibilities
I am designing a FastAPI service layer, a retrieval pipeline for knowledge context, an agent orchestration layer, and persistent application state. Clear boundaries make it easier to test failures and replace components.
Retrieval before generation
A support assistant needs relevant, up-to-date context. My planned pipeline includes ingestion, chunking, embeddings, pgvector retrieval, and an evaluation loop that checks whether the retrieved passages actually answer the question.
Agents need boundaries
LangGraph is the planned orchestration layer for deciding when to search, use a tool, or return an answer. Tool access, retry behavior and explicit state transitions should be designed rather than left implicit in a prompt.
Observe what happened
I want to log retrieval decisions, tool calls, latency, failures and answer quality. Without those signals, debugging an AI workflow becomes guesswork.
Build in verified increments
The first milestone is architecture and a testable FastAPI backend. Database integration, retrieval, agents, UI and deployment follow as separate milestones. This article records the design direction, not a completed product.