fix: Improvements Jan 22 (#734)

Co-authored-by: Charles Packer <packercharles@gmail.com>
Co-authored-by: dboyliao <qmalliao@gmail.com>
Co-authored-by: Shubham Naik <shub@memgpt.ai>
Co-authored-by: Shubham Naik <shubham.naik10@gmail.com>
Co-authored-by: Caren Thomas <caren@letta.com>
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
Co-authored-by: Nuno Rocha <nunuroxa@gmail.com>
Co-authored-by: Theo Conrads <theo.conrads@ella-lab.io>
Co-authored-by: Jyotirmaya Mahanta <jyotirmaya.mahanta@gmail.com>
Co-authored-by: Stephan Fitzpatrick <knowsuchagency@gmail.com>
Co-authored-by: Stephan Fitzpatrick <stephan@knowsuchagency.com>
Co-authored-by: mlong93 <35275280+mlong93@users.noreply.github.com>
Co-authored-by: Mindy Long <mindy@letta.com>
Co-authored-by: Krishnakumar R (KK) <65895020+kk-src@users.noreply.github.com>
This commit is contained in:
Matthew Zhou
2025-01-22 14:57:35 -10:00
committed by GitHub
parent 90ccc29359
commit 605f376279
12 changed files with 134 additions and 32 deletions

View File

@@ -19,18 +19,46 @@ Now, let's bring your new playground to your local machine.
git clone https://github.com/your-username/letta.git
```
### 🧩 Install Dependencies
### 🧩 Install dependencies & configure environment
#### Install poetry and dependencies
First, install Poetry using [the official instructions here](https://python-poetry.org/docs/#installation).
Once Poetry is installed, navigate to the Letta directory and install the Letta project with Poetry:
Once Poetry is installed, navigate to the letta directory and install the Letta project with Poetry:
```shell
cd Letta
cd letta
poetry shell
poetry install --all-extras
```
#### Setup PostgreSQL environment (optional)
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-poetry).
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:
```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:
```shell
export LETTA_PG_URI="postgresql://${POSTGRES_USER:-letta}:${POSTGRES_PASSWORD:-letta}@localhost:5432/${POSTGRES_DB:-letta}"
```
After this you need to prep the database with initial content. You can use alembic upgrade to populate the initial
contents from template test data. Please ensure to activate poetry environment using `poetry shell`.
```shell
alembic upgrade head
```
#### Running letta with poetry
Now when you want to use `letta`, make sure you first activate the `poetry` environment using poetry shell:
```shell
$ poetry shell
(pyletta-py3.12) $ letta run