Retrieval-Augmented Agent · built from scratch
Chat with my Portfolio —
and watch it think.
This is the transparent view of the chatbot that lives on the site. Every answer is grounded in a crawl of the pages; here you can watch the ReAct agent reason, decide to call an MCP tool, read the passages it retrieves, and only then answer. It's a real conversation — ask a follow-up and it remembers the thread. The clean version is the chat bubble in the corner; this page shows what's happening behind it.
Conversation
Full transcript — exact prompts, raw model output & tool I/O
Under the hood
What happens when you ask a question
There's no vector-database service and no framework doing the heavy lifting — the whole pipeline is written from scratch and runs on a free-tier box. Here's the path from your question to a grounded answer.
-
1
Crawl
A scheduled job reads the site's sitemap, fetches every page, and strips the HTML down to clean prose — committing a fresh snapshot whenever the site changes, so the backend boots without hitting the live site.
-
2
Chunk & embed
Each page is split into overlapping passages and turned into vectors with the
Gemini EmbeddingAPI. The vectors are cached to disk, so a corpus is embedded once — not on every boot. -
3
Retrieve
Your question is embedded the same way and matched against those vectors by cosine similarity, pulling back the handful of passages most likely to hold the answer — with their source URLs.
-
4
Reason (ReAct)
A ReAct agent (Gemini) decides what to do: answer from what it knows, or act. You see each Thought → Action → Observation step play out in the activity log above.
-
5
Act via MCP tools
Two MCP servers give it hands:
search_blogto look things up in the index, andsend_messageto email Aditya through Formspree when you want to get in touch. -
6
Answer & remember
It writes an answer grounded in the retrieved passages, citing the real page URLs — then keeps the turn in context so your follow-ups make sense.
Want the full story? Read the write-up on the blog ↗.
— generation & embeddings by Gemini · retrieval & contact over MCP