Shubhojeet.
ProjectsBlogConnect
← All projects
October 3, 2025

Agentic chat

Agentic chat is an AI workspace that combines document search, long-term memory, web research, and OAuth-connected apps so it can answer with better context and take real action on your behalf.

External linkLive projectGitHubGitHub

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.

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.

From there, a LangGraph orchestrator takes over. It runs a planner, an agent, and a tool execution loop, deciding at each step whether to call a tool or return a response. The agent can connect to Gmail, Google Calendar, Drive, Docs, Sheets, Slack, Notion, GitHub, and Linear through Composio. Any action that writes, sends, or deletes something pauses and asks for explicit approval before it runs.

The stack is Next.js 16, React 19, PostgreSQL with pgvector for vector search, Prisma, Better Auth for Google sign-in, and UploadThing for file storage. Users can bring their own OpenAI key — it's encrypted at rest and never sent to the client. LangSmith traces every step of the graph.

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.
  • 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.
  • Integrated Composio to load each user's connected tools at runtime based on their OAuth accounts. Built the connect, callback, and status routes, plus a dangerous-action allowlist and a verb-based detector that together catch write operations and route them through an approval card before execution.
  • Built the BYOK flow: AES-256-GCM encryption of the user's API key on save, and a server-side proxy that decrypts and forwards it to OpenAI so the plaintext key never touches the client.
  • Wired SSE streaming from LangGraph's event stream to the client: token chunks, tool progress updates, approval request events, and planning steps all stream in real time with full abort support.

Impact

  • Semantic caching cut redundant API calls by 40% — similar queries return from cache instead of re-running embeddings and generation.
  • Composio replaced a hand-rolled Google Workspace integration with a single SDK that covers 9 services and 80+ actions, removing a large chunk of per-service OAuth plumbing.
  • Semantic caching cut redundant API calls by 40% — similar queries return from cache instead of re-running embeddings and generation.
  • Composio replaced a hand-rolled Google Workspace integration with a single SDK that covers 9 services and 80+ actions, removing a large chunk of per-service OAuth plumbing.
  • The approval card pattern made it safe to expose write actions in a chat interface — users see exactly what the agent wants to do and confirm before anything is sent or changed.
  • BYOK support made the product usable for teams that already have OpenAI contracts, without asking them to trust a third party with their keys.

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.
  • 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.
  • Two-layer safety for Composio actions: an explicit allowlist of dangerous slugs, plus a verb detector as a fallback — so new actions don't silently bypass approval.

Tech Stack

Next.js 16React 19TypeScript 6LangGraph 1.3.2LangChainLangSmithOpenAI SDK v6ComposioExa SearchFirecrawlCohere RerankingMem0PostgreSQL + pgvectorPrisma v6Better AuthRAGBYOK (AES-256-GCM)Tailwind CSS 4

More Projects

Additional work across AI products, developer tooling, and full-stack systems.

Browse all →

Next.js 16

Edward

An AI coding workspace where developers can describe apps in plain language, generate production-ready code, inspect and edit files in real-time, run projects in isolated Docker environments, publish live previews, and sync everything directly to GitHub without leaving the product.

View projectArrow right

Next.js

Bonkers by Foyer

Creative production system built at Foyer Tech — led the v2→v3 rebuild with reusable templates, multi-model routing, and faster repeat workflows for high-quality visual asset creation.

View projectArrow right

AWS (ECS, ECR, S3)

DeployNinja

GitHub-native deployment platform for automated builds, live logs, and repeatable releases.

View projectArrow right