Logging Telemetry

Letta uses Clickhouse to store telemetry. Clickhouse is a database optimized for storing logs and traces. Traces can be used to view raw requests to LLM providers and also understand your agent’s system performance metrics.

Configuring Clickhouse

You will need to have a Clickhouse DB (either running locally or with Clickhouse Cloud) to connect to Letta.

You can configure Clickhouse by passing the required enviornment variables:

1docker run \
2 -v ~/.letta/.persist/pgdata:/var/lib/postgresql/data \
3 -p 8283:8283 \
4 ...
5 -e CLICKHOUSE_ENDPOINT=${CLICKHOUSE_ENDPOINT} \
6 -e CLICKHOUSE_DATABASE=${CLICKHOUSE_DATABASE} \
7 -e CLICKHOUSE_USERNAME=${CLICKHOUSE_USERNAME} \
8 -e CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD} \
9 letta/letta:latest

Finding your credentials in Clickhouse Cloud

You can find these variable inside of Clickhouse Cloud by selecting the “Connection” button in the dashboard.

Connecting to Grafana

We recommend connecting Clickhouse to Grafana to query and view traces.