@letta-ai/letta-code 0.21.17 → 0.21.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.21.17",
3
+ "version": "0.21.18",
4
4
  "description": "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: scheduling-tasks
3
+ description: Schedules reminders and recurring tasks via the letta cron CLI. Use when the user asks to be reminded of something, wants periodic messages, or needs to manage scheduled tasks.
4
+ ---
5
+
6
+ # Scheduling Tasks
7
+
8
+ This skill lets you create, list, and manage scheduled tasks using the `letta cron` CLI. Scheduled tasks send a prompt to the agent on a timer — useful for reminders, periodic check-ins, and deferred follow-ups.
9
+
10
+ ## When to Use This Skill
11
+
12
+ - User asks to be reminded of something ("remind me to X at Y")
13
+ - User wants a recurring check-in ("every morning ask me about X")
14
+ - User wants a one-shot delayed message ("in 30 minutes, check on X")
15
+ - User wants to see or cancel existing scheduled tasks
16
+
17
+ ## CLI Usage
18
+
19
+ All commands go through `letta cron` via the Bash tool. Output is JSON.
20
+
21
+ ### Creating a Task
22
+
23
+ ```bash
24
+ letta cron add --name <short-name> --description <text> --prompt <text> <schedule>
25
+ ```
26
+
27
+ **Required flags:**
28
+
29
+ | Flag | Description |
30
+ |------|-------------|
31
+ | `--name <text>` | Short identifier for the task (e.g. "dog-walk-reminder") |
32
+ | `--description <text>` | Human-readable description of what the task does |
33
+ | `--prompt <text>` | The message that will be sent to the agent when the task fires |
34
+
35
+ **Schedule (pick one):**
36
+
37
+ | Flag | Type | Example |
38
+ |------|------|---------|
39
+ | `--every <interval>` | Recurring | `5m`, `2h`, `1d` |
40
+ | `--at <time>` | One-shot | `"3:00pm"`, `"in 45m"` |
41
+ | `--cron <expr>` | Raw cron (recurring) | `"0 9 * * 1-5"` |
42
+
43
+ **Optional flags:**
44
+
45
+ | Flag | Description |
46
+ |------|-------------|
47
+ | `--agent <id>` | Agent ID (defaults to `LETTA_AGENT_ID` env var — usually already set) |
48
+ | `--conversation <id>` | Conversation ID (defaults to `LETTA_CONVERSATION_ID` or `"default"`) |
49
+
50
+ ### Listing Tasks
51
+
52
+ ```bash
53
+ letta cron list
54
+ ```
55
+
56
+ Optional filters: `--agent <id>`, `--conversation <id>`
57
+
58
+ ### Getting a Single Task
59
+
60
+ ```bash
61
+ letta cron get <task-id>
62
+ ```
63
+
64
+ ### Deleting Tasks
65
+
66
+ ```bash
67
+ # Delete a specific task
68
+ letta cron delete <task-id>
69
+
70
+ # Delete all tasks for the current agent
71
+ letta cron delete --all
72
+ ```
73
+
74
+ ## Examples
75
+
76
+ ### "Remind me every morning at 9am to walk the dog"
77
+
78
+ ```bash
79
+ letta cron add \
80
+ --name "dog-walk-reminder" \
81
+ --description "Daily morning reminder to walk the dog" \
82
+ --prompt "Hey! It's 9am — time to walk the dog." \
83
+ --every 1d
84
+ ```
85
+
86
+ Note: `--every 1d` fires once daily at midnight. For a specific time like 9am, use a raw cron expression:
87
+
88
+ ```bash
89
+ letta cron add \
90
+ --name "dog-walk-reminder" \
91
+ --description "Daily 9am reminder to walk the dog" \
92
+ --prompt "Hey! It's 9am — time to walk the dog." \
93
+ --cron "0 9 * * *"
94
+ ```
95
+
96
+ ### "Check on the deploy in 30 minutes"
97
+
98
+ ```bash
99
+ letta cron add \
100
+ --name "deploy-check" \
101
+ --description "One-time check on deployment status" \
102
+ --prompt "The user asked you to check on the deploy — ask them how it went." \
103
+ --at "in 30m"
104
+ ```
105
+
106
+ ### "Every weekday at 5pm, remind me to submit my timesheet"
107
+
108
+ ```bash
109
+ letta cron add \
110
+ --name "timesheet-reminder" \
111
+ --description "Weekday 5pm timesheet reminder" \
112
+ --prompt "Friendly reminder: don't forget to submit your timesheet before EOD!" \
113
+ --cron "0 17 * * 1-5"
114
+ ```
115
+
116
+ ### "What reminders do I have?"
117
+
118
+ ```bash
119
+ letta cron list
120
+ ```
121
+
122
+ ### "Cancel the dog walk reminder"
123
+
124
+ First list to find the task ID, then delete:
125
+
126
+ ```bash
127
+ letta cron list
128
+ # Find the task ID from the output, then:
129
+ letta cron delete <task-id>
130
+ ```
131
+
132
+ ## Writing Good Prompts
133
+
134
+ The `--prompt` value is what gets sent to you (the agent) when the task fires. Write it as a message that will make sense when you receive it later, with enough context to act on:
135
+
136
+ - **Good**: "The user asked to be reminded to review the PR for the auth refactor. Check if it's still open and nudge them."
137
+ - **Bad**: "reminder"
138
+
139
+ Include context about what the user originally asked for, so you can give a helpful response when the prompt arrives.
140
+
141
+ ## Important Notes
142
+
143
+ - **Minimum granularity**: 1 minute. Intervals under 60 seconds are rounded up.
144
+ - **Recurring TTL**: Recurring tasks auto-expire after 3 days. The user would need to re-create them or you can note this limitation.
145
+ - **One-shot cleanup**: One-shot tasks are garbage-collected 24 hours after firing.
146
+ - **Timezone**: Tasks use the user's local timezone by default.
147
+ - **Scheduler requirement**: Tasks only fire while a Letta session is running (a WS listener must be active). If no session is running, tasks will be marked as missed.
148
+ - **`--at` for specific times**: `--at "3:00pm"` schedules a one-shot. If the time has already passed today, it schedules for tomorrow.
149
+ - **`--every` for daily**: `--every 1d` fires daily at midnight. For a specific time of day, use `--cron` instead (e.g. `--cron "0 9 * * *"` for 9am daily).
150
+
151
+ ## Cron Expression Reference
152
+
153
+ For `--cron`, use standard 5-field cron syntax:
154
+
155
+ ```
156
+ ┌───────────── minute (0-59)
157
+ │ ┌───────────── hour (0-23)
158
+ │ │ ┌───────────── day of month (1-31)
159
+ │ │ │ ┌───────────── month (1-12)
160
+ │ │ │ │ ┌───────────── day of week (0-6, Sun=0)
161
+ │ │ │ │ │
162
+ * * * * *
163
+ ```
164
+
165
+ Common patterns:
166
+ - `*/5 * * * *` — every 5 minutes
167
+ - `0 */2 * * *` — every 2 hours
168
+ - `0 9 * * *` — daily at 9am
169
+ - `0 9 * * 1-5` — weekdays at 9am
170
+ - `30 8 1 * *` — 8:30am on the 1st of each month