Inspecting your database

Directly view your data with pgadmin

If you’d like to directly view the contents of your Letta Server’s database, you can connect to it via pgAdmin.

If you’re using Docker, you’ll need to make sure you expose port 5432 from the Docker container to your host machine by adding -p 5432:5432 to your docker run command:

1# replace `~/.letta/.persist/pgdata` with wherever you want to store your agent data
2docker run \
3 -v ~/.letta/.persist/pgdata:/var/lib/postgresql/data \
4 -p 8283:8283 \
5 -p 5432:5432 \
6 -e OPENAI_API_KEY="your_openai_api_key" \
7 letta/letta:latest

Once you expose port 5432, you will be able to connect to the container’s internal PostgreSQL instance. The default configuration uses letta as the database name / user / password, and 5432 as the port, which is what you’ll use to connect via pgAdmin: