@letta-ai/letta-code 0.1.19 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +103 -0
- package/letta.js +1465 -476
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -76,6 +76,75 @@ Letta Code uses a hierarchical memory system:
|
|
|
76
76
|
Memory blocks are highly configurable — see our [docs](https://docs.letta.com/guides/agents/memory-blocks) for advanced configuration options.
|
|
77
77
|
Join our [Discord](https://discord.gg/letta) to share feedback on persistence patterns for coding agents.
|
|
78
78
|
|
|
79
|
+
## Skills
|
|
80
|
+
|
|
81
|
+
**Skills are automatically discovered from a `.skills` directory in your project.**
|
|
82
|
+
|
|
83
|
+
Skills allow you to define custom capabilities that the agent can reference and use. When you start a new session, Letta Code recursively scans for `SKILL.MD` files and loads any skill definitions found.
|
|
84
|
+
|
|
85
|
+
### Creating Skills
|
|
86
|
+
|
|
87
|
+
Create a `.skills` directory in your project root and organize skills in subdirectories:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
mkdir -p .skills/data-analysis
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Each skill is defined in a file named `SKILL.MD`. The directory structure determines the skill ID:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
.skills/
|
|
97
|
+
├── data-analysis/
|
|
98
|
+
│ └── SKILL.MD # skill id: "data-analysis"
|
|
99
|
+
└── web/
|
|
100
|
+
└── scraper/
|
|
101
|
+
└── SKILL.MD # skill id: "web/scraper"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Create a skill file (`.skills/data-analysis/SKILL.MD`):
|
|
105
|
+
|
|
106
|
+
```markdown
|
|
107
|
+
---
|
|
108
|
+
name: Data Analysis Skill
|
|
109
|
+
description: Analyzes CSV files and generates statistical reports
|
|
110
|
+
category: Data Processing
|
|
111
|
+
tags:
|
|
112
|
+
- analytics
|
|
113
|
+
- statistics
|
|
114
|
+
- csv
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
# Data Analysis Skill
|
|
118
|
+
|
|
119
|
+
This skill analyzes data files and generates comprehensive reports.
|
|
120
|
+
|
|
121
|
+
## Usage
|
|
122
|
+
|
|
123
|
+
Use this skill to analyze CSV files and generate statistical summaries...
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Skill File Format:**
|
|
127
|
+
|
|
128
|
+
- **File name:** Must be named `SKILL.MD` (case-insensitive)
|
|
129
|
+
- **Required frontmatter:**
|
|
130
|
+
- `name` - Display name for the skill
|
|
131
|
+
- `description` - Brief description of what the skill does
|
|
132
|
+
- **Optional frontmatter:**
|
|
133
|
+
- `category` - Category for organizing skills (skills are grouped by category in the agent's memory)
|
|
134
|
+
- `tags` - Array of tags for filtering/searching
|
|
135
|
+
- **Body:** Additional details and documentation about the skill
|
|
136
|
+
|
|
137
|
+
Skills are automatically loaded into the agent's memory on startup, making them available for reference throughout your session.
|
|
138
|
+
|
|
139
|
+
### Custom Skills Directory
|
|
140
|
+
|
|
141
|
+
You can specify a custom skills directory using the `--skills` flag:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
letta --skills /path/to/custom/skills
|
|
145
|
+
letta -p "Use the custom skills" --skills ~/my-skills
|
|
146
|
+
```
|
|
147
|
+
|
|
79
148
|
## Usage
|
|
80
149
|
|
|
81
150
|
### Interactive Mode
|
|
@@ -86,10 +155,44 @@ letta --agent <id> # Use specific agent ID
|
|
|
86
155
|
letta --model <model> # Specify model (e.g., claude-sonnet-4.5, gpt-4o)
|
|
87
156
|
letta -m <model> # Short form of --model
|
|
88
157
|
letta --continue # Resume global last agent (deprecated, use project-based)
|
|
158
|
+
|
|
159
|
+
# Managing tools (requires --agent flag)
|
|
160
|
+
letta --agent <id> --link # Attach Letta Code tools to agent, then start session
|
|
161
|
+
letta --agent <id> --unlink # Remove Letta Code tools from agent, then start session
|
|
89
162
|
```
|
|
90
163
|
|
|
91
164
|
> **Note:** The `--model` flag is inconsistent when resuming sessions. We recommend using the `/model` command instead to change models in interactive mode.
|
|
92
165
|
|
|
166
|
+
#### Interactive Commands
|
|
167
|
+
|
|
168
|
+
While in a session, you can use these commands:
|
|
169
|
+
- `/agent` - Show current agent link
|
|
170
|
+
- `/model` - Switch models
|
|
171
|
+
- `/stream` - Toggle token streaming on/off
|
|
172
|
+
- `/link` - Attach Letta Code tools to current agent (enables Read, Write, Edit, Bash, etc.)
|
|
173
|
+
- `/unlink` - Remove Letta Code tools from current agent
|
|
174
|
+
- `/clear` - Clear conversation history
|
|
175
|
+
- `/exit` - Exit and show session stats
|
|
176
|
+
- `/logout` - Clear credentials and exit
|
|
177
|
+
|
|
178
|
+
#### Managing Letta Code Tools
|
|
179
|
+
|
|
180
|
+
Letta Code provides tools like `Bash`, `Read`, `Write`, `Edit`, `Grep`, `Glob`, and more. You can attach or remove these tools from any agent:
|
|
181
|
+
|
|
182
|
+
**Via CLI flags** (before starting session):
|
|
183
|
+
```bash
|
|
184
|
+
letta --agent <id> --link # Attach Letta Code tools
|
|
185
|
+
letta --agent <id> --unlink # Remove Letta Code tools
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Via interactive commands** (during session):
|
|
189
|
+
```bash
|
|
190
|
+
/link # Attach Letta Code tools to current agent
|
|
191
|
+
/unlink # Remove Letta Code tools from current agent
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
When you attach tools with `/link` or `--link`, they are added to the agent with approval rules enabled (human-in-the-loop). This means the agent can use these tools, but you'll be prompted to approve each tool call. Use permission modes to control approval behavior (see Permissions section below).
|
|
195
|
+
|
|
93
196
|
### Headless Mode
|
|
94
197
|
```bash
|
|
95
198
|
letta -p "Run bun lint and correct errors" # Auto-resumes project agent
|