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

ai-sdk-letta

v0.23.0

Published

A persistent, Letta-backed Vercel AI SDK Agent with memory, dreaming, application-owned tools and human-in-the-loop.

Readme

ai-sdk-letta

A persistent, Letta-backed Vercel AI SDK Agent with memory, dreaming, application-owned tools and human-in-the-loop. Unofficial; not affiliated with Letta or Vercel.

npm install ai-sdk-letta ai

Needs Node.js 22.19+, the Letta CLI and a local Letta backend with a connected model (prerequisites).

import { askUserTool, createLettaAgent, defineAgent } from 'ai-sdk-letta';

const definition = defineAgent({ id: 'my-agent', name: 'My Agent', model: 'openai-codex/gpt-5.5',
  instructions: 'Be helpful.', tools: { ask_user: askUserTool }, permissions: { ask_user: 'allow' } });
const { agent, close } = await createLettaAgent(definition);

Main exports:

  • defineAgent(input): validate a definition (fail-closed permissions).
  • openLettaAgent(definition, options) / createLettaAgent(...): open or create the agent on the local Letta backend; returns { agent, identity, navigation, close }.
  • LettaAgent: the AI SDK Agent (generate, stream, interactions, presentation, transcript, close). User turns may include images (image/file parts), sent as Letta ImageContent.
  • IMAGE_LIMITS, ImageInputError, validateImages, decodeImagePart: image validation (PNG, JPEG, GIF, WebP).
  • fileTools, FILE_TOOL_PERMISSIONS: opt-in list_files, read_file, search_files, bound to the current conversation's attachment folder. With them, user turns may carry file parts (PDF, text, Markdown, CSV, JSON, code), stored per conversation and announced by a short "Attached: ..." note.
  • AttachmentStore, UploadStaging, FILE_LIMITS, FileInputError, detectFileType, extractPdfText: the storage, validation and PDF layer (unpdf, pure JavaScript).
  • sandboxTools, SANDBOX_TOOL_PERMISSIONS and the definition's sandbox option: opt-in run_command (no network) and run_command_online (always asks) in an isolated sandbox per conversation, through the AI SDK Experimental_SandboxSession. Providers are optional peers: @lgrammel/apple-container-sandbox or ai-sdk-sandbox-docker, or your own factory.
  • SandboxManager, checkProjectFolder, gitConfigCredentials, detectSandboxProvider, prepareSandbox: the sandbox lifecycle and safety checks.
  • ToolInteractions: the broker for approvals and ask_user questions.
  • createToolBridge, askUserTool, fileTraceWriter: the tool policy layer (it passes the bound sandbox to tools as experimental_sandbox).
  • resolveStateDirectory, acquireIdentity, history and navigation helpers.

See the repository README for prerequisites, the security model, state and identity, and limitations. License: Apache-2.0.