SurfSense Documentation

Prerequisites

Required setup's before setting up SurfSense

PGVector installation Guide

SurfSense requires the pgvector extension for PostgreSQL:

Linux and Mac

Compile and install the extension (supports Postgres 13+)

cd /tmp
git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git
cd pgvector
make
make install # may need sudo

See the installation notes if you run into issues

Windows

Ensure C++ support in Visual Studio is installed, and run:

call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"

Note: The exact path will vary depending on your Visual Studio version and edition

Then use nmake to build:

set "PGROOT=C:\Program Files\PostgreSQL\16"
cd %TEMP%
git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git
cd pgvector
nmake /F Makefile.win
nmake /F Makefile.win install

See the installation notes if you run into issues


Google OAuth Setup

SurfSense user management and authentication works on Google OAuth. Lets set it up.

  1. Login to your Google Developer Console
  2. Enable People API. Google Developer Console People API
  3. Set up OAuth consent screen. Google Developer Console OAuth consent screen
  4. Create OAuth client ID and secret. Google Developer Console OAuth client ID
  5. It should look like this. Google Developer Console Config

File Upload's

Files are converted to LLM friendly formats using Unstructured

  1. Get an Unstructured.io API key from Unstructured Platform
  2. You should be able to generate API keys once registered Unstructured Dashboard

LLM Observability (Optional)

This is not required for SurfSense to work. But it is always a good idea to monitor LLM interactions. So we do not have those WTH moments.

  1. Get a LangSmith API key from smith.langchain.com
  2. This helps in observing SurfSense Researcher Agent. LangSmith

Crawler

SurfSense have 2 options for saving webpages:

  • SurfSense Extension (Overall better experience & ability to save private webpages, recommended)
  • Crawler (If you want to save public webpages)

NOTE: SurfSense currently uses Firecrawl.py for web crawling. If you plan on using the crawler, you will need to create a Firecrawl account and get an API key.


Next Steps

Once you have all prerequisites in place, proceed to the installation guide to set up SurfSense.