SurfSense is an open source AI research agent designed to connect large language models (LLMs) with your internal knowledge sources — including documents, emails, Slack threads, Notion pages, GitHub repos, and more. It enables teams to ask natural language questions and receive cited, context-aware answers without exposing sensitive data to third-party clouds. Built as a self-hostable alternative to proprietary tools like NotebookLM and Glean, SurfSense empowers organizations to maintain control over their data while leveraging cutting-edge RAG (Retrieval-Augmented Generation) and agent-based reasoning. It’s ideal for technical teams, researchers, and knowledge workers who need to synthesize information across disparate systems without relying on cloud-based AI platforms.
What You Get
- Connect to 20+ internal data sources - Integrate with Google Drive, Notion, Slack, GitHub, Confluence, Gmail, Jira, Airtable, Obsidian, Elasticsearch, and more to ingest and query private content.
- Cited, source-tracked answers - Get responses with inline citations pointing back to original documents or web pages, ensuring transparency and auditability.
- Local LLM support via Ollama and vLLM - Run inference entirely on-premises using local models without requiring external API keys.
- Real-time team collaboration - Multiple users can chat simultaneously in shared workspaces with role-based access control (Owner, Admin, Editor, Viewer) and comment threads on conversations.
- Advanced RAG with hybrid search - Combine semantic embeddings (via pgvector) and full-text search using Reciprocal Rank Fusion for highly accurate results across 6000+ embedding models.
- Podcast generation from chat logs - Automatically convert conversations into 3-minute audio podcasts using local TTS providers like Kokoro or cloud services like OpenAI and Azure.
- Web extension for saving authenticated pages - Use the Chrome extension to save web content behind login walls directly into your knowledge base.
- Self-hostable with Docker - Deploy the full stack (frontend, backend, database, Redis, Celery) in a single command with persistent data volumes.
- Extensible agent architecture - Build custom tools and agents using LangGraph and LangChain, with a simple registration system for new integrations.
Common Use Cases
- Building a secure internal knowledge assistant - A legal firm uses SurfSense to connect its Notion case database and Slack archives to a local LLM, allowing associates to ask questions like ‘What was the outcome of case XYZ last quarter?’ with fully cited responses.
- Research team analyzing public and private data - A university lab ingests PDF research papers, YouTube lectures, and GitHub code repos into SurfSense to enable natural language queries across their entire project corpus without uploading data externally.
- Problem: Employees waste hours searching through scattered documents → Solution: SurfSense - A SaaS company had 50+ Confluence pages, Slack channels, and Google Docs with product documentation. After deploying SurfSense, support agents reduced average response time by 65% using conversational search with source citations.
- DevOps teams managing microservices and documentation - Engineering teams use SurfSense to query their GitHub repositories, Jira tickets, and runbooks through a unified interface — asking ‘Show me recent failures in the payment service’ and getting structured, cited answers with links to logs and PRs.
Under The Hood
SurfSense is an AI-powered platform designed for document processing and chat interactions, integrating with a wide range of data sources and LLM providers through a modular connector architecture. It combines a robust backend built with Python and FastAPI, alongside a modern frontend developed using TypeScript and Next.js.
Architecture
The project adopts a monolithic structure with well-defined backend and frontend components, emphasizing layered design and modular organization.
- The backend follows a layered architecture with distinct modules for database models, API routing, and asynchronous task handling via Celery.
- The frontend is structured as a Next.js application with component-based UIs and state management for dynamic user experiences.
- Design patterns such as strategy for connector types and middleware for authentication are consistently applied across the codebase.
Tech Stack
The tech stack reflects a hybrid approach using Python and TypeScript, supported by modern tools for development, deployment, and data handling.
- The backend is powered by Python with FastAPI and Celery, while the frontend leverages TypeScript and React within a Next.js framework.
- Key dependencies include SQLAlchemy for database operations, Alembic for migrations, and Pydantic/Zod for robust data validation.
- Development tools encompass Docker for containerization, uv for Python dependency management, and PostCSS/Tailwind CSS for frontend styling.
Code Quality
The codebase demonstrates a mixed quality profile, with some structured patterns and clear separation of concerns, yet marked by inconsistencies and gaps in testing.
- Code linting is configured with tools like Ruff and Black, indicating an emphasis on style and maintainability.
- Error handling is present but not uniformly implemented across all modules, leading to potential reliability issues.
- Technical debt is evident in the form of extensive migration scripts and legacy code patterns that require attention.
What Makes It Unique
SurfSense distinguishes itself through its extensible connector architecture and deep integration capabilities with multiple services.
- The platform supports a wide variety of data sources and LLM providers, making it highly adaptable to diverse use cases.
- Its modular design allows for easy extension and customization, supporting a broad ecosystem of third-party integrations.
- The system’s ability to process documents and engage in chat-based interactions with AI models sets it apart from generic tools.