Description
This project is in PREVIEW and has not been officially released, try it out and create issues
n8n-nodes-letta
This is the official n8n node that allows you to integrate Letta AI agents into your n8n workflows.
n8n is a fair-code licensed workflow automation platform.
Letta is a platform for building stateful AI agents with long-term memory.
Quick Start
New to this node? Check out our 5-minute Quick Start Guide and demo workflows to get started quickly!
Developers: See DEVELOPMENT.md for local testing and development setup.
Installation
Community Node (Recommended)
- Go to Settings > Community Nodes in your n8n instance
- Select Install
- Enter
@letta-ai/n8n-nodes-lettain Enter npm package name - Agree to the risks of using community nodes
- Select Install
Manual Installation
To get started install the package in your n8n root directory:
npm install @letta-ai/n8n-nodes-letta
For Docker-based n8n installations, add the following line before the $N8N_CUSTOM_EXTENSIONS variable in your .env file:
N8N_CUSTOM_EXTENSIONS=@letta-ai/n8n-nodes-letta
Configuration
Credentials
This node requires Letta API credentials:
- Go to your Letta dashboard
- Navigate to API settings and generate an API token
- In n8n, create new Letta API credentials by clicking on the "+"
- Select "Letta API" as the credential type and click on "Continue".
- Fill your credential details:
- API Token: Your Letta API token
- Base URL:
https://api.letta.com(default) or your self-hosted instance URL
Operations
Send Message
Send a message to a Letta agent and receive a response.
Parameters
Required:
- Agent ID: The ID of your Letta agent (e.g.,
agent_abc123) - Role: The role of the message sender
user: Message from the usersystem: System messageassistant: Message from the assistant
- Message: The message content to send
Optional:
- Max Steps: Maximum number of steps the agent can take (1-100, default: 10)
- Use Assistant Message: Include assistant message in response (default: true)
- Enable Thinking: Enable agent's thinking process in response (default: false)
- Return Message Types: Filter message types in response
- Internal Monologue
- Function Call
- Function Return
- Reasoning
Output
The node returns the complete response from the Letta API, including:
- messages: Array of messages from the agent
- stop_reason: Reason for ending the conversation
- usage: Token and step usage statistics
Demo Workflows
We provide ready-to-use example workflows in the demo/ directory:
- Simple Chat – Basic message sending and response handling
- Webhook Chat API – REST API endpoint for chat applications
- Scheduled Summary – Automated daily summaries via email
π View Full Demo Documentation with detailed setup instructions, usage examples, and best practices.
Quick Example: Simple Chat
βββββββββββ ββββββββββββ βββββββββββ
β Trigger ββββββΆβ Letta ββββββΆβ Display β
βββββββββββ ββββββββββββ βββββββββββ
- Manual Trigger: Click to test
- Letta Node: Sends message to agent
- Display: Shows agent response
API Reference
This node uses the Letta Messages API:
- Endpoint:
POST /v1/agents/{agent_id}/messages - Documentation: https://docs.letta.com/api-reference/agents/messages/create
Compatibility
- n8n version: 1.0.0+
- Letta API version: v1
Resources
Development
Setup
# Install dependencies
npm install
# Build the node
npm run build
# Watch for changes during development
npm run dev
# Lint code
npm run lint
# Format code
npm run format
Project Structure
letta-n8n-node/
βββ credentials/
β βββ LettaApi.credentials.ts # API credentials definition
βββ nodes/
β βββ Letta/
β βββ Letta.node.ts # Main node implementation
β βββ letta.svg # Node icon
βββ dist/ # Compiled JavaScript (generated)
βββ package.json
βββ tsconfig.json
βββ README.md
Testing in n8n
To test your changes locally:
- Build the node:
npm run build - Link to your n8n installation:
npm link - In your n8n directory:
npm link @letta-ai/n8n-nodes-letta - Restart n8n
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
Support
For issues and questions:
- Node issues: Open an issue in this repository
- n8n questions: n8n community forum
- Letta questions: Letta documentation