npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@letta-ai/letta-code

v0.27.11

Published

Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.

Readme

Letta Code

npm Discord

Letta Code is a memory-first agent harness, designed for long-lived agents that can learn from experience and maintain a cohesive identity across models (Claude, GPT, Gemini, GLM, Kimi, and more).

You can interact with Letta Code agents through:

Letta Code is a frontier coding agent and can also be used as a long-lived personal agent.

Feature Overview

[!TIP] Letta Code agents are designed to be self-configuring. If you want to configure something (e.g. skills, behavior, hooks, permissions), try asking your agent to do it for you.

| Feature | Description | |---|---| | Self-improvement & Learning | Agents programmatically rewrite their context to improve and adapt over time, including system prompt learning (through memory blocks) and skill learning. Configure periodic dreaming with /sleeptime, audit memory quality with /doctor, and view memory with /palace | | Message search | Search across all messages and agents with /search. Agent can also search their own conversations or the conversations of other agents | | MemFS | All context (including memory blocks) is tracked via git. Sync context to a custom GitHub repository by setting /memory-repository set [email protected]:... | | Skills | Loads global skills (~/.letta), project-scoped skills (.agents/skills), and agent-scoped skills (stored in MemFS). View skills with /skills and create with /skill-creator | | Subagents & Multi-agent | Call built-in subagents (general-purpose, forked, recall, history-analyzer) async or sync. Agents can call any other agent (including themselves) as subagents | | Messaging Integrations | Chat with the same agent from Slack, Telegram, your browser (chat.letta.com) including mobile, and through custom channels | | Hooks | Run custom scripts at key points of agent execution to automate workflows | | Permissions | Set permission modes and customize what actions are auto-approved or auto-denied | | Crons & Schedules | Configure heartbeats and crons, and let agents work across time with self-managed schedules | | Remote & Multi-Env (requires Constellation login) | Agents work across multiple environments. Make any machine available as a remote environment by running letta server --env-name "..." | | Secrets (requires Constellation login) | Make secrets available as environment variables (across machines) while obfuscating their values from context |

See the full list of slash commands in our documentation.

Get started

Install the package via npm:

npm install -g @letta-ai/letta-code

Navigate to your project directory and run letta (see command-line options in the docs).

On first run, choose how you want to start:

  • Proceed locally keeps agent state on this device. This is the local-first path and does not require a Constellation login.
  • Login to Constellation syncs agent state through Constellation so you can access the same agents from chat.letta.com, the desktop app, and other machines — and agents can work across multiple machines.

Run /connect to configure your own LLM API keys (OpenAI / ChatGPT, Anthropic, Z.ai coding plan, etc.), and use /model to swap models.

You can also download the desktop app for macOS, Windows, and Linux. Agents created in the CLI are available via the desktop app, and vice versa.

Local mode

Local mode runs an embedded stateful agent server inside Letta Code. Agents, conversations, memory, provider connections, and secrets are stored on your machine.

You can enter local mode from the first-run setup menu, or explicitly with:

letta --backend local

Connect a provider from inside the TUI with /connect, or from the shell with letta --backend local connect:

letta --backend local connect anthropic --api-key "$ANTHROPIC_API_KEY"
letta --backend local connect ollama
letta --backend local connect lmstudio
letta --backend local connect llama-cpp
letta --backend local connect chatgpt

For slow local inference servers, configure a provider-level timeout when connecting. For example, LM Studio-compatible llama-server backends that need up to 10 minutes for large-context compaction can use:

letta --backend local connect lmstudio --base-url http://127.0.0.1:1234/v1 --timeout 600s

Timeouts are stored per local provider in milliseconds; pass --no-timeout or --timeout false to disable the provider timeout.

Then create a local agent:

letta --backend local --new-agent --model anthropic/claude-sonnet-4-6

Local backend state is stored by default in:

~/.letta/lc-local-backend

You can override this location for isolated experiments:

export LETTA_LOCAL_BACKEND_DIR="$PWD/.letta-local"
letta --backend local --new-agent

Local agents do not appear in the Constellation, but their memory is still a normal git repository under ~/.letta/lc-local-backend/memfs/<agent-id>/memory.

🌌 Constellation

Agents hosted on Constellation can be accessed from any machine: your laptop, GitHub Actions, a sandbox, remote VM, or a Mac Mini. You can also chat with agents through chat.letta.com or through the desktop app.

graph TD
    Constellation["🌌 Constellation"]
    Constellation --> A["💻 Your Laptop"]
    Constellation --> B["☁️ Cloud VM"]
    Constellation --> C["🖥️ Mac Mini"]
    Constellation --> D["📦 Sandbox"]

Remote environments

If you're interacting with an agent from desktop or chat.letta.com, you can set agents to run on any available environment. Any machine can be made into an available environment by running:

letta server
letta server --env-name "work-laptop"

See our guides for using Railway, DigitalOcean, and Fly.io as remote environments.

Installing external skills

Install skills into a specific agent's memory with letta skills install <skill>:

| Source | Example | |---|---| | GitHub | letta skills install https://github.com/owner/repoletta skills install https://github.com/owner/repo/tree/main/path/to/skillletta skills install https://github.com/owner/repo/blob/main/path/to/skill/SKILL.md | | ClawHub | openclaw skills install <skill-slug>letta skills install <skill-slug> | | Hermes Skills Hub | hermes skills install <skill-path>letta skills install <skill-path> |

To view skills run letta skills list --agent <agent-id>, and delete skills with letta skills delete <skill-name> --agent <agent-id>.

Research

Letta Code is developed by the creators of MemGPT and sleep-time compute (now called "dreaming"), and driven by our research in AI memory and continual learning.

Other

Community maintained packages are available for Arch Linux users on the AUR:

yay -S letta-code # release
yay -S letta-code-git # nightly

Nix users can run or install Letta Code through the repository flake:

nix run github:letta-ai/letta-code
nix profile install github:letta-ai/letta-code

See docs/nix.md for Home Manager and NixOS service examples.


Made with 💜 in San Francisco