Repolode
mfmezger

mfmezger/conversational-agent-langchain

FastAPI backend for a conversational RAG agent that embeds documents into Qdrant, runs semantic and hybrid search, and answers questions with LLMs.

Stars
257
Forks
44
Open issues
9
Last commit
7 days ago

What is it?

This project is a REST backend for a retrieval-augmented generation (RAG) chat agent. It lets you embed documents into the Qdrant vector database, search them semantically, and answer questions grounded in those documents. The pipeline is built with LangChain and LangGraph and can call models from Google Gemini, Cohere, Azure OpenAI and other providers, with LiteLLM used to reach a wide range of backends.

The backend exposes a /rag endpoint with citation metadata, plus OpenAI-compatible /v1/chat/completions and /v1/responses endpoints that support streaming for text-only requests. Retrieval can be improved with reranking through Cohere or the local FlashRank library, and hybrid search uses BM25 via FastEmbed. Phoenix tracing records pipeline runs so you can inspect retrieved documents and generation steps.

The repository ships with Docker Compose for the API, Qdrant, a Streamlit frontend and Phoenix, along with demo data loading scripts and a test suite.

Key features

  • 01Embeds documents into Qdrant and runs semantic and hybrid (BM25) search.
  • 02Answers questions over documents using LLMs through LangGraph and LiteLLM.
  • 03Offers OpenAI-compatible chat completions and responses endpoints with streaming.
  • 04Supports reranking via Cohere or local FlashRank.
  • 05Provides Phoenix tracing for inspecting retrieval and generation steps.

Use cases

  • Building a document question-answering backend on top of your own files.
  • Prototyping a RAG chat service with Gemini, Cohere or Ollama models.
  • Pointing an OpenAI SDK client at a private, document-grounded model alias.
  • Learning how to structure a FastAPI and LangGraph RAG application.

Quick start

  1. 1

    Clone the repository

    git clone https://github.com/mfmezger/conversational-agent-langchain.git
  2. 2

    Enter the project directory

    cd conversational-agent-langchain
  3. 3

    Create a .env file from template.env and set GEMINI_API_KEY and COHERE_API_KEY

  4. 4

    Start the full system with Docker Compose

    docker compose up -d

Things to know

  • Requires API keys for Google Gemini and Cohere to run out of the box.
  • Setup expects Docker and an /etc/hosts entry for qdrant on Linux or Mac.
  • Several embedding providers are only placeholders for extension.

Topics

FAQ

What is conversational-agent-langchain?
FastAPI backend for a conversational RAG agent that embeds documents into Qdrant, runs semantic and hybrid search, and answers questions with LLMs. This project is a REST backend for a retrieval-augmented generation (RAG) chat agent. It lets you embed documents into the Qdrant vector database, search them semantically, and answer questions grounded in those documents. The pipeline is built with LangChain and LangGraph and can call models from Google Gemini, Cohere, Azure OpenAI and other providers, with LiteLLM used to reach a wide range of backends.
Is conversational-agent-langchain free to use? What license does it have?
conversational-agent-langchain is open source under the MIT license. Check the license terms before using it in commercial products.
Is conversational-agent-langchain still maintained?
Actively maintained. The last commit to conversational-agent-langchain was on Oct 30, 2026.
What can I use conversational-agent-langchain for?
Building a document question-answering backend on top of your own files. Prototyping a RAG chat service with Gemini, Cohere or Ollama models. Pointing an OpenAI SDK client at a private, document-grounded model alias. Learning how to structure a FastAPI and LangGraph RAG application.
How do I install conversational-agent-langchain?
Clone the repository: git clone https://github.com/mfmezger/conversational-agent-langchain.git Enter the project directory: cd conversational-agent-langchain Create a .env file from template.env and set GEMINI_API_KEY and COHERE_API_KEY Start the full system with Docker Compose: docker compose up -d
Where can I get conversational-agent-langchain?
The source code and installation instructions are on GitHub: https://github.com/mfmezger/conversational-agent-langchain

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects