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.

status connecting… brain pages chunks MCP

Conversation

Ask anything about Aditya — his blogs, projects, or how to reach him. Then keep the conversation going; it remembers what you asked.
Agent activity — reason → act → observe

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. 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. 2

    Chunk & embed

    Each page is split into overlapping passages and turned into vectors with the Gemini Embedding API. The vectors are cached to disk, so a corpus is embedded once — not on every boot.

  3. 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. 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. 5

    Act via MCP tools

    Two MCP servers give it hands: search_blog to look things up in the index, and send_message to email Aditya through Formspree when you want to get in touch.

  6. 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 ↗.