MARKRAHIMI.
All projects

2026

Beestoon Chat

A production AI support agent. From vector search to the chat bubble a customer clicks.

Beestoon Chat

Overview

I built Beestoon Chat from a blank repository into a full-stack AI support platform that handles real customer conversations in production. At its core sits a LangGraph agent. It classifies intent, searches a knowledge base with retrieval-augmented generation, and decides, turn by turn, whether to answer, escalate to a human, or open a support ticket.

The agent runs against a PostgreSQL database with the pgvector extension, so knowledge retrieval is a real vector similarity search over embedded documentation, not a keyword match. Every response streams back to the visitor over Server-Sent Events, through a FastAPI backend and into a Next.js chat widget with live token-by-token rendering.

This runs in front of real customers, so most of the engineering effort went into the parts a demo never shows. Retries around flaky LLM calls. Fail-open rate limiting so a provider outage never blocks a conversation. Bounded context so costs and latency stay predictable. A full RBAC system so staff only see what their role allows.

I also built the evaluation side: 53 automated tests and an LLM-as-a-judge harness that scores response quality against a rubric, so regressions get caught before a change ships, not after a customer complains.

The problem

The support team fielded a high volume of repetitive questions that documentation could already answer. There was no automated first line of defense that could search real knowledge, hand off cleanly to a human when it mattered, and stay safe if the LLM provider had a bad day.

The approach

A LangGraph state machine with dedicated nodes for intent classification, RAG search, response generation, ticket handling, escalation, and small talk. It runs inside a FastAPI service with SSE streaming, a Next.js widget for visitors, and a full staff dashboard for oversight, tickets, and settings.

Key features

  • A multi-node LangGraph agent: classify_intent, then rag_search, then generate_response, with dedicated branches for tickets, escalation, and chitchat
  • A pgvector-backed knowledge base, chunked and embedded from a living markdown source, re-ingestible on demand
  • Server-Sent Events streaming from FastAPI straight into a React chat widget with token-level rendering
  • Fail-open rate limiting and automatic retries around every LLM call, so provider hiccups degrade gracefully instead of breaking the chat
  • A bounded conversation context that keeps latency and token cost predictable at scale
  • Data-driven RBAC: roles and permissions seeded from code, no migration needed to add a new role
  • A staff admin dashboard: live conversation list, ticket board, and runtime-managed LLM settings stored in the database, not .env files
  • 53 automated tests plus an LLM-as-a-judge evaluation harness that scores answer quality against a rubric on every change

Impact

53

Automated tests shipped

5

Criteria in the build-vs-buy study the team adopted

4

Repositories touched across 60+ reviewed commits

100%

Streaming responses over SSE

Have something similar in mind?

I'm open to software, full-stack, and AI engineering roles and projects across France and Europe.

Get in touch