Installing Letta from source

This guide is intended for developers that want to modify and contribute to the Letta open source codebase. It assumes that you are on MacOS, Linux, or Windows WSL (not Powershell or cmd.exe).

Prerequisites

First, install Poetry using the official instructions here. You’ll also need to have git installed.

Downloading the source code

Navigate to https://github.com/letta-ai/letta and click the “fork” button. Once you’ve created your fork, you can download the source code via the command line:

1# replace YOUR-GITHUB-USERNAME with your real GitHub username
2git clone https://github.com/YOUR-GITHUB-USERNAME/letta.git

Creating a fork will allow you to easily open pull requests to contribute back to the main codebase.

Alternatively, you can clone the original open source repository without a fork:

$git clone https://github.com/letta-ai/letta.git

Installing from source

Navigate to the letta directory and install the letta package using Poetry:

1cd letta
2poetry install --all-extras

Running Letta Server from source

If you’ve also installed Letta with pip, you may have conflicting installs which can lead to bugs. To check where your current Letta install is located, you can run the command which letta.

Now when you want to use letta server, make sure you first activate the poetry environment using poetry shell:

$poetry shell

After running poetry shell, you will be able to run letta server.

Alternatively, you can use poetry run (which will activate the poetry environment for the letta server command directly):

$poetry run letta server
Built with