← Back to chat

Architecture · Query path

Chloe: question to answer loop

Claude decides when to search. It writes a search query, which is embedded and matched against the knowledge base in Weaviate. Exa (web search, FSU domains only) is a fallback: it is called only when nothing in the knowledge base matches.

Chloe question to answer loopA visitor's question goes through the chat UI to a streaming FastAPI Lambda, which checks Turnstile and runs an agent. The agent embeds the query with Titan, searches Weaviate, Exa only as a fallback when the knowledge base has no info, and Bedrock, then the answer streams back to the chat UI and the visitor.AWS LAMBDAVisitorFSU CCI siteChat UIAstro ChatWidgetFastAPI /chatFunction URL, streamAgentpydantic-ai + checkClaude Haiku 4.5via AWS BedrockCloudflare Turnstilebot checkExaFSU domains onlyTitan Embeddingsvia AWS BedrockWeaviatecollection CCIPagesLangfuseagent tracesquestionPOST /chatverifypass / 403runpromptcompletionembed queryvectorhybrid searchchunksonly if KB has no matchpagesfinal answerNDJSON streamanswerOTel traces