Berkay Orhan
WorkResearchExperienceAboutAskContact
Contact
← All projects

PROJECT / 2025

Clairvoyant

AI Research Chat

AI chat and research app with two agents: a Gemini chat agent that calls tools and renders their results as UI components, and a research agent that searches the web with Exa and writes a cited report you can export as PDF. Built with Next.js and the Vercel AI SDK.

stack
TypeScript · Next.js 15 · React 19 · Vercel AI SDK · Google Gemini · Exa API · Tailwind CSS · shadcn/ui · MCP · ElevenLabs · Qdrant · Neo4j

Source ↗

How it works

  1. prompt
    chat or research

  2. Gemini
    2.5 Pro or Flash

  3. tools
    Exa, scraper, MCP

  4. Qdrant + Neo4j
    sources and links

  5. generative UI
    streams components

01 / Overview

Clairvoyant combines a tool-calling chat agent with a multi-step research agent. Both run on Google Gemini 2.5 Pro and Flash through the Vercel AI SDK, stream their answers, and show tool results as components instead of plain text.

02 / Key features

  • –Chat agent on Gemini 2.5 Pro/Flash with streaming answers and a reasoning mode
  • –Research agent that plans, finds sources with Exa, scores their relevance and credibility, and writes a synthesised report
  • –Tool results rendered as components: weather forecast, calculator, time, stock card (mock data) and website scraper
  • –Gemini's built-in Google Search, URL Context and code execution tools
  • –PDF export of research reports with inline citations
  • –Text-to-speech playback of answers and reports through ElevenLabs
  • –Context7 documentation lookup over the Model Context Protocol (MCP)
  • –Separate mobile input components for small screens

03 / Challenges

  • –Splitting the work between a chat agent and a research agent with their own pipelines
  • –Rendering different tool outputs as matching UI components inside a streamed answer
  • –Filtering research sources by relevance and credibility before synthesis
  • –Connecting MCP tools (Context7) to the chat agent alongside Gemini's own tools
  • –An experimental graph RAG agent that pairs Qdrant vector search with Neo4j graph context

04 / Solution

The app uses the Next.js 15 App Router with React 19. The chat route streams Gemini responses through the Vercel AI SDK and gives the model a set of tools (weather from Open-Meteo, calculator, time, text helper, stock card, scraper), Gemini's Google Search, URL Context and code execution, and Context7 over MCP. The research route asks Gemini for a plan, fetches sources and their content from the Exa API, has the model score each source for relevance and credibility, keeps the ones that pass, and synthesises the findings into a report. Reports are exported to PDF with Puppeteer, and an ElevenLabs route reads text aloud.

05 / Outcome

Built between 31 August and 5 September 2025. The project explores how far the Vercel AI SDK's tool calling and generative UI work with Gemini, and how a research pipeline can be put together from plain model calls and a search API.

Berkay Orhan© 2026

WorkResearchExperienceCVBack to top ↑