Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
Update contributing.md with corrected local setup steps (#3123)
neversettle44f35793db5e
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 5cf146ca0..8816505ca 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -21,34 +21,51 @@ git clone https://github.com/your-username/letta.git### 🧩 Install dependencies & configure environment-#### Install uv and dependencies+This project requires **PostgreSQL** to be installed and running on your system. Assuming you have a running PostgreSQL instance, first you need to create the user, database and ensure the pgvector+extension is ready. Here are sample steps for a case where user and database name is letta and assumes no password is set:-First, install uv using [the official instructions here](https://docs.astral.sh/uv/getting-started/installation/).+#### 1. Enter the PostgreSQL Shell+Open your terminal (or Command Prompt on Windows) and run:+```bash+# On Mac/Linux:+sudo -u postgres psql++# On Windows:+psql -U postgres-Once uv is installed, navigate to the letta directory and install the Letta project with uv:-```shell-cd letta-eval $(uv env activate)-uv sync --all-extras```-#### Setup PostgreSQL environment (optional)+#### 2. Run Setup Commands+Once inside the PostgreSQL prompt (you will see `postgres=#`), run the following SQL block:-If you are planning to develop letta connected to PostgreSQL database, you need to take the following actions.-If you are not planning to use PostgreSQL database, you can skip to the step which talks about [running letta](#running-letta-with-uv).+```sql+-- 1. Create a dedicated role with login and superuser permissions+CREATE ROLE letta WITH LOGIN SUPERUSER PASSWORD 'letta';-Assuming you have a running PostgreSQL instance, first you need to create the user, database and ensure the pgvector-extension is ready. Here are sample steps for a case where user and database name is letta and assumes no password is set:+-- 2. Create the database and assign 'letta' as the owner+CREATE DATABASE letta OWNER letta;++-- 3. Switch connection to the new 'letta' database+\c letta++-- 4. Enable the pgvector extension for vector embeddings+CREATE EXTENSION IF NOT EXISTS vector;-```shell-createuser letta-createdb letta --owner=letta-psql -d letta -c 'CREATE EXTENSION IF NOT EXISTS vector'-```Setup the environment variable to tell letta code to contact PostgreSQL database:```shellexport LETTA_PG_URI="postgresql://${POSTGRES_USER:-letta}:${POSTGRES_PASSWORD:-letta}@localhost:5432/${POSTGRES_DB:-letta}"```+#### Install uv and dependencies++First, install uv using [the official instructions here](https://docs.astral.sh/uv/getting-started/installation/).++Once uv is installed, navigate to the letta directory and install the Letta project with uv:+```shell+cd letta+eval $(uv env activate)+uv sync --all-extras+```+```After this you need to prep the database with initial content. You can use alembic upgrade to populate the initialcontents from template test data.```shell@@ -59,7 +76,7 @@ uv run alembic upgrade headNow when you want to use `letta`, you can use `uv run` to run any letta command:```shell-uv run letta run+uv run letta server```#### Installing pre-commit