Letta Snippets
Letta Snippets is a VS Code extension that provides code snippets for the Letta Python SDK. It helps you quickly scaffold common Letta patterns—agent creation, memory blocks, tool definitions, and more—without typing boilerplate from scratch.
Installation
Section titled “Installation”Install directly from the VS Code Marketplace:
- Open VS Code
- Go to Extensions (
Cmd+Shift+Xon Mac,Ctrl+Shift+Xon Windows/Linux) - Search for “Letta Snippets”
- Click Install
Or install via the command line:
code --install-extension Vedant0200.letta-snippetsAvailable Snippets
Section titled “Available Snippets”Type a prefix and press Tab to expand the snippet. All snippets are available in Python files.
| Prefix | Description |
|---|---|
letta-client | Initialize a Letta client |
letta-agent | Create a new agent |
letta-tool | Define a custom tool |
letta-memory | Create a memory block |
letta-message | Send a message to an agent |
Example Usage
Section titled “Example Usage”Type letta-agent in a Python file and press Tab to expand:
from letta_client import Letta
client = Letta(token="your-api-key")
agent = client.agents.create( name="my-agent", model="gpt-4o", embedding="openai/text-embedding-ada-002",)The snippet places your cursor at key positions so you can quickly customize the generated code.
Resources
Section titled “Resources”- VS Code Marketplace: Letta Snippets
- GitHub repository: https://github.com/Vedant020000/letta-snippets