Remote Environments

Manage named Letta server connections — like git remotes for your agent infrastructure.

remote add

Register a named Letta server. The first remote added is automatically activated.

lettactl remote add <name> <url> [options]

Options

FlagTypeDescription
--api-keystringAPI key for authentication (required for Letta Cloud)

Examples

Self-hosted server
lettactl remote add local http://localhost:8283
Letta Cloud
lettactl remote add production https://api.letta.com --api-key sk-xxx
Staging environment
lettactl remote add staging https://staging.example.com --api-key sk-stg-xxx

Notes

The first remote added is auto-activated.

Remote configs are stored in ~/.lettactl/remotes.json.

remote remove

Remove a named remote. If the active remote is removed, the first remaining remote becomes active.

lettactl remote remove <name>

Examples

Remove a remote
lettactl remote remove staging

remote use

Set the active remote. All subsequent commands will target this server.

lettactl remote use <name>

Examples

Switch to production
lettactl remote use production
Switch and apply to shell
lettactl remote use staging && eval $(lettactl remote env)

Notes

The active remote is loaded automatically on every CLI invocation.

Explicit LETTA_BASE_URL environment variable always takes precedence over the active remote.

remote list

List all configured remotes. The active remote is marked with an asterisk (*).

lettactl remote list

Examples

List remotes
lettactl remote list

remote show

Show details of a specific remote including URL and API key status.

lettactl remote show <name>

Examples

Show remote details
lettactl remote show production

remote env

Output shell export statements for the active remote. Use with eval to apply to current session.

lettactl remote env

Examples

Apply to current shell
eval $(lettactl remote env)
Add to shell profile
eval $(lettactl remote env 2>/dev/null)

Notes

Outputs to stdout for use with eval. Errors go to stderr.

Useful for CI/CD scripts that need environment variables set.