← All projects

Agentic Chat

Agentic Chat is an AI workspace combining document search, long-term memory, web research, and OAuth-connected apps for context-aware action.

Overview

Agentic Chat is built around the idea that a good AI response depends on what context you give it. Before the model sees a message, the system decides what to pull in — past conversation memory, relevant document chunks, a live web search, or the content of a URL — and assembles that into the prompt automatically.

How It Was Built

The main technical choices behind the product, from system design to the parts that make it work day to day.

  • Built the LangGraph orchestrator from scratch: a planner node that breaks down the request, a supervisor agent that decides what to do, and a tool node that executes — all wired in a loop with PostgreSQL checkpointing so the conversation can resume after an approval interrupt.
  • Built the document pipeline end-to-end: file upload via UploadThing, parsing for PDF, DOCX, XLS, and CSV, 800-token semantic chunking, OpenAI embeddings stored in pgvector, hybrid retrieval, and Cohere reranking to surface the most relevant chunks.

Impact

  • Semantic cache with pgvector similarity search reuses prior answers for repeated or near-identical queries, avoiding redundant embedding and generation calls when context matches.
  • Composio replaced per-service OAuth plumbing with one integration covering 9 toolkits and 94 essential actions (Gmail, Calendar, Drive, Docs, Sheets, Slack, Notion, GitHub, Linear).

Highlights

  • LangGraph loop with PostgreSQL checkpointing keeps conversation state across approval interrupts — the agent picks up exactly where it left off.
  • 3-tier web scraping (Readability → Firecrawl → Jina Reader) means the agent can read most pages, including JS-rendered ones, without a browser.

Tech Stack

Next.jsTypeScriptLangGraphLangChainLangSmithOpenAI SDKComposioExa SearchFirecrawlCohere RerankingMem0PostgreSQL + pgvectorPrismaBetter AuthRAGBYOK (AES-256-GCM)Tailwind CSS