@letta-ai/letta-code 0.32.2 → 0.32.4

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.
Files changed (92) hide show
  1. package/README.md +1 -1
  2. package/dist/channels-public.js +32 -2
  3. package/dist/channels-public.js.map +3 -3
  4. package/dist/channels-slack.js +52 -2
  5. package/dist/channels-slack.js.map +4 -4
  6. package/dist/gateway-core.js +89 -31
  7. package/dist/gateway-core.js.map +6 -5
  8. package/dist/mcp-client.js +2 -2
  9. package/dist/mcp-client.js.map +1 -1
  10. package/dist/types/agent/skills.d.ts.map +1 -1
  11. package/dist/types/agent/subagents/context-budget.d.ts +2 -0
  12. package/dist/types/agent/subagents/context-budget.d.ts.map +1 -1
  13. package/dist/types/agent/subagents/manager.d.ts +2 -2
  14. package/dist/types/agent/subagents/manager.d.ts.map +1 -1
  15. package/dist/types/agent/subagents/subagent-launcher.d.ts +8 -0
  16. package/dist/types/agent/subagents/subagent-launcher.d.ts.map +1 -1
  17. package/dist/types/backend/api/agent-message.d.ts +22 -0
  18. package/dist/types/backend/api/agent-message.d.ts.map +1 -0
  19. package/dist/types/backend/api/conversation-enqueue.d.ts +60 -0
  20. package/dist/types/backend/api/conversation-enqueue.d.ts.map +1 -0
  21. package/dist/types/channels/gateway-core.d.ts +2 -0
  22. package/dist/types/channels/gateway-core.d.ts.map +1 -1
  23. package/dist/types/channels/gateway-sources.d.ts +6 -0
  24. package/dist/types/channels/gateway-sources.d.ts.map +1 -0
  25. package/dist/types/channels/progress-builder.d.ts +1 -1
  26. package/dist/types/channels/progress-builder.d.ts.map +1 -1
  27. package/dist/types/channels/progress-types.d.ts +28 -0
  28. package/dist/types/channels/progress-types.d.ts.map +1 -0
  29. package/dist/types/channels/slack/progress.d.ts.map +1 -1
  30. package/dist/types/channels/slack/status-controller.d.ts +2 -1
  31. package/dist/types/channels/slack/status-controller.d.ts.map +1 -1
  32. package/dist/types/channels/types.d.ts +6 -23
  33. package/dist/types/channels/types.d.ts.map +1 -1
  34. package/dist/types/permissions/agent-memory-prefixes.d.ts +3 -0
  35. package/dist/types/permissions/agent-memory-prefixes.d.ts.map +1 -0
  36. package/dist/types/permissions/cli.d.ts.map +1 -1
  37. package/dist/types/permissions/cross-agent-guard.d.ts.map +1 -1
  38. package/dist/types/permissions/read-only-letta.d.ts +2 -0
  39. package/dist/types/permissions/read-only-letta.d.ts.map +1 -0
  40. package/dist/types/permissions/read-only-shell.d.ts.map +1 -1
  41. package/dist/types/runtime-context.d.ts +2 -0
  42. package/dist/types/runtime-context.d.ts.map +1 -1
  43. package/dist/types/runtime-execution-settings.d.ts +16 -0
  44. package/dist/types/runtime-execution-settings.d.ts.map +1 -0
  45. package/dist/types/telemetry/channel.d.ts +7 -0
  46. package/dist/types/telemetry/channel.d.ts.map +1 -0
  47. package/dist/types/telemetry/index.d.ts +4 -1
  48. package/dist/types/telemetry/index.d.ts.map +1 -1
  49. package/dist/types/tools/impl/bash.d.ts.map +1 -1
  50. package/dist/types/tools/impl/exec-command.d.ts.map +1 -1
  51. package/dist/types/tools/impl/kill-bash.d.ts +1 -0
  52. package/dist/types/tools/impl/kill-bash.d.ts.map +1 -1
  53. package/dist/types/tools/impl/monitor.d.ts +1 -0
  54. package/dist/types/tools/impl/monitor.d.ts.map +1 -1
  55. package/dist/types/tools/impl/send-agent-message.d.ts +19 -0
  56. package/dist/types/tools/impl/send-agent-message.d.ts.map +1 -0
  57. package/dist/types/tools/impl/shell-env.d.ts.map +1 -1
  58. package/dist/types/tools/impl/skill.d.ts.map +1 -1
  59. package/dist/types/tools/letta-toolset.d.ts.map +1 -1
  60. package/dist/types/tools/manager.d.ts +0 -5
  61. package/dist/types/tools/manager.d.ts.map +1 -1
  62. package/dist/types/tools/tool-definitions.d.ts +1 -0
  63. package/dist/types/tools/tool-definitions.d.ts.map +1 -1
  64. package/dist/types/tools/tool-permissions.d.ts.map +1 -1
  65. package/dist/types/tools/toolset-defaults.d.ts +9 -0
  66. package/dist/types/tools/toolset-defaults.d.ts.map +1 -0
  67. package/dist/types/tools/toolset.d.ts +1 -0
  68. package/dist/types/tools/toolset.d.ts.map +1 -1
  69. package/dist/types/types/protocol_v2.d.ts +4 -51
  70. package/dist/types/types/protocol_v2.d.ts.map +1 -1
  71. package/dist/types/types/runtime-start-protocol.d.ts +58 -2
  72. package/dist/types/types/runtime-start-protocol.d.ts.map +1 -1
  73. package/dist/types/utils/subagent-launch-marker.d.ts +6 -0
  74. package/dist/types/utils/subagent-launch-marker.d.ts.map +1 -0
  75. package/dist/types/utils/task-notifications.d.ts +3 -1
  76. package/dist/types/utils/task-notifications.d.ts.map +1 -1
  77. package/dist/types/websocket/listener/runtime.d.ts.map +1 -1
  78. package/dist/types/websocket/listener/types.d.ts +2 -0
  79. package/dist/types/websocket/listener/types.d.ts.map +1 -1
  80. package/letta.js +2723 -1729
  81. package/package.json +1 -1
  82. package/scripts/source-file-size-baseline.json +8 -8
  83. package/skills/context-doctor/SKILL.md +72 -129
  84. package/skills/context-doctor/references/auditing-memory.md +72 -0
  85. package/skills/context-doctor/references/investigating-behavior.md +161 -0
  86. package/skills/image-generation/SKILL.md +5 -4
  87. package/skills/messaging-agents/SKILL.md +184 -159
  88. package/skills/working-across-computers/SKILL.md +90 -0
  89. package/skills/working-across-computers/assets/allow-remote-access-from-desktop.png +0 -0
  90. package/skills/working-across-computers/references/connect-a-computer-for-remote-access.md +59 -0
  91. package/skills/context-doctor/ROOT_MEMORY.md +0 -137
  92. package/skills/teleporting-between-environments/SKILL.md +0 -114
@@ -1,201 +1,226 @@
1
1
  ---
2
2
  name: messaging-agents
3
- description: Send messages to other agents on your server. Use when you need to communicate with, query, or delegate tasks to another agent.
3
+ description: Send a message to another Letta agent, continue a thread with one, check on it, or reply to a message another agent sent you. Use when you need to ask, inform, or coordinate with another agent, or when a message from another agent arrives.
4
4
  ---
5
5
 
6
6
  # Messaging Agents
7
7
 
8
- This skill enables you to send messages to other agents on the same Letta server using the thread-safe conversations API.
8
+ ## What you are addressing
9
+
10
+ An **agent** is a persistent identity: its memory and configuration are shared
11
+ by all of its conversations. A **conversation** is one message thread on an
12
+ agent. Address a conversation ID to continue a thread; address an agent ID to
13
+ open a new thread with that agent. When your send identifies you as the sender,
14
+ a new thread is created hidden so agent-to-agent traffic does not clutter the
15
+ recipient's conversation list.
16
+
17
+ ## Two backends
18
+
19
+ Letta Code keeps agent state on one of two backends. The same CLI addresses
20
+ agents on either; what differs is what happens after you send.
21
+
22
+ **Cloud backend** (api.letta.com). Agent state lives in Cloud. Cloud can deliver
23
+ messages to a *computer*: a machine running Letta Code connected to Cloud,
24
+ or a Cloud sandbox. Because state and execution are
25
+ separate, Cloud tracks which computers are online and where each conversation
26
+ is active. That is why these exist only on this backend:
27
+
28
+ - delivering your message to the harness already running the recipient's
29
+ conversation, or to its saved destination (a computer or Cloud sandbox)
30
+ when none is active;
31
+ - a `computer` selector on sends and on the Agent tool;
32
+ - teleporting a conversation (`letta teleport <computer>`): the same thread,
33
+ with its history and memory, continues on a different computer. Files and
34
+ working directories do not move with it.
35
+
36
+ **Local backend.** Agent state lives in a store on this machine. There is no
37
+ computer concept, so no `computer` selector and no teleport, and no Cloud
38
+ service to deliver on your behalf: a send runs the recipient's turn inside the
39
+ `letta -p` process you launched. Agent IDs on this backend start with
40
+ `agent-local-`.
41
+
42
+ "Local backend" describes where state is stored. It says nothing about which
43
+ machine a Cloud-backed agent is executing on, and it is unrelated to subagents
44
+ you launch with the Agent tool.
45
+
46
+ ## How a send reaches the recipient
47
+
48
+ For the Cloud CLI sends below, `letta -p` hands the message to Cloud for
49
+ delivery when you pass `--conversation`, `--from-agent`, `--no-wait`, or
50
+ `--computer`. These commands leave the recipient's execution settings unchanged.
51
+ `SendAgentMessage` uses the same Cloud delivery endpoint.
52
+
53
+ With only `--agent`, the CLI chooses the launch settings and normally creates a
54
+ new conversation. It runs the turn in its own process or reuses an inherited
55
+ Cloud listener. The listener path first applies those settings to the
56
+ conversation, then submits its input through the same Cloud delivery endpoint.
57
+ Supported local-backend CLI sends run the turn in the launched process.
58
+
59
+ `--no-wait` is one of the flags that selects Cloud delivery. On that path,
60
+ waiting and non-waiting sends use the same delivery mechanism, but differ in
61
+ how you receive the answer and what reply instructions the recipient gets.
62
+
63
+ The recipient learns who is asking only when the send identifies a sender:
64
+ `--from-agent`, or for the Cloud messaging recipes below, the caller IDs from
65
+ the agent's shell environment (`AGENT_ID`/`LETTA_AGENT_ID` and
66
+ `CONVERSATION_ID`/`LETTA_CONVERSATION_ID`). `SendAgentMessage`
67
+ always identifies you and your conversation. An identified send attaches a
68
+ system reminder telling the recipient how to get its answer back to you. A
69
+ `letta -p` with neither carries no sender or reply instructions; the recipient
70
+ receives your text as user input, plus whatever context its harness normally
71
+ adds.
72
+
73
+ An explicit `--from-agent` different from the agent identified by your
74
+ environment does not inherit the current conversation as its return address.
75
+
76
+ ## Waiting or not
77
+
78
+ - **Waiting send** (`letta -p` without `--no-wait`). The process normally returns
79
+ the recipient's final message, in `result` with JSON output. When a sender is
80
+ identified, the recipient is told to put its answer in that message. Works
81
+ on either backend.
82
+ - **Non-waiting send** (`SendAgentMessage`, or `letta -p --no-wait`). Returns
83
+ a receipt once Cloud accepts the message. Ordinary assistant output is not
84
+ forwarded. When a sender is identified, the reminder says so and, if a return
85
+ conversation is supplied, asks the recipient to send an explicit reply there.
86
+ That explicit reply becomes a new message in your conversation. Cloud backend
87
+ only; acceptance does not guarantee a reply.
88
+
89
+ A waiting send occupies the CLI process, not necessarily you. Run it in the
90
+ background (your shell tool may already do this for long-running commands) and
91
+ read its output when it finishes. That keeps you working, but it does not
92
+ change the recipient's instructions: the answer still arrives as process
93
+ output, not as a message to your conversation.
94
+
95
+ For a managed child task with a completion notification, use the Agent tool on
96
+ either backend. `SendAgentMessage` only sends input; it creates no task.
97
+
98
+ ## Send and keep working (Cloud backend)
9
99
 
10
- ## When to Use This Skill
11
-
12
- - You need to ask another agent a question
13
- - You want to query an agent that has specialized knowledge
14
- - You need information that another agent has in their memory
15
- - You want to coordinate with another agent on a task
16
-
17
- ## What the Target Agent Can and Cannot Do
18
-
19
- **The target agent CANNOT:**
20
- - Access your local environment (read/write files in your codebase)
21
- - Execute shell commands on your machine
22
- - Use your tools (Bash, Read, Write, Edit, etc.)
23
-
24
- **The target agent CAN:**
25
- - Use their own tools (whatever they have configured)
26
- - Access their own memory blocks
27
- - Make API calls if they have web/API tools
28
- - Search the web if they have web search tools
29
- - Respond with information from their knowledge/memory
30
-
31
- **Important:** This skill is for *communication* with other agents, not *delegation* of local work. The target agent runs in their own environment and cannot interact with your codebase.
32
-
33
- **Need local access?** If you need the target agent to access your local environment (read/write files, run commands), use the Agent tool instead to deploy them as a subagent:
34
100
  ```typescript
35
- Agent({
36
- agent_id: "agent-xxx", // Deploy this existing agent
37
- subagent_type: "general-purpose", // read-write access to your local tools
38
- prompt: "Look at the code in src/ and tell me about the architecture"
39
- })
101
+ SendAgentMessage({ conversation_id: "conv-…", message: "…" }) // continue a thread
102
+ SendAgentMessage({ agent_id: "agent-…", message: "…" }) // open a new hidden thread
103
+ SendAgentMessage({ agent_id: "agent-…", conversation_id: "default", message: "…" }) // the agent's default thread
40
104
  ```
41
- This gives the agent access to your codebase while running as a subagent.
42
-
43
- ## Finding an Agent to Message
44
105
 
45
- If you don't have a specific agent ID, use these skills to find one:
106
+ Success means Cloud accepted the message (`status: "queued"`), not that the
107
+ recipient has read it. Keep working; a reply sent to your return address
108
+ arrives in your conversation.
109
+ Omit `computer`: the conversation continues wherever it is active, and asking
110
+ for a different computer is rejected rather than moving it.
46
111
 
47
- ### By Name or Tags
48
- Load the `finding-agents` skill to search for agents:
49
- ```bash
50
- letta agents list --query "agent-name"
51
- letta agents list --tags "origin:letta-code"
52
- ```
112
+ The CLI form behaves the same when run from your agent's environment, which
113
+ supplies the return address; use it from scripts or when the tool is absent:
53
114
 
54
- ### By Topic They Discussed
55
- Search messages across all agents to find which agent worked on something:
56
115
  ```bash
57
- letta messages search --query "topic" --all-agents
116
+ letta -p --conversation <conversation-id> --no-wait --output-format json "message"
117
+ letta -p --agent <agent-id> --no-wait --output-format json "message"
58
118
  ```
59
- Results include `agent_id` for each matching message.
60
119
 
61
- ## CLI Usage (agent-to-agent)
62
-
63
- ### Starting a New Conversation
120
+ ## Send and wait (either backend)
64
121
 
65
122
  ```bash
66
- letta -p --from-agent $LETTA_AGENT_ID --agent <id> "message text"
123
+ letta -p --from-agent $LETTA_AGENT_ID --agent <agent-id> --output-format json "message"
124
+ letta -p --from-agent $LETTA_AGENT_ID --conversation <conversation-id> --output-format json "follow-up"
67
125
  ```
68
126
 
69
- When no `--computer` is specified, the target agent will run on the same
70
- computer as the caller agent.
127
+ `result` normally holds the recipient's final message; `conversation_id` is
128
+ the thread to continue. `--from-agent` names you and must be an agent on the
129
+ same backend as the recipient.
71
130
 
72
- To route the target agent turn through a specific remote/local computer:
131
+ If your agent ID starts with `agent-local-`, add `--backend local` so the
132
+ command uses the local store: `letta --backend local -p …`. The flag applies to
133
+ that command only.
73
134
 
74
- ```bash
75
- letta -p --from-agent $LETTA_AGENT_ID \
76
- --agent <id> \
77
- --computer <name-or-device-id-or-connection-id> \
78
- "message text"
79
- ```
135
+ For these Cloud messaging commands, stopping the wait does not cancel accepted
136
+ work on the recipient's computer. On the local backend the recipient's turn
137
+ runs inside the process you launched, so
138
+ `--tools`, `--permission-mode`, and the working directory you give it apply to
139
+ that turn.
80
140
 
81
- Use `--computer cloud` to route through the target agent's cloud sandbox:
141
+ ## Replying to another agent
82
142
 
83
- ```bash
84
- letta -p --from-agent $LETTA_AGENT_ID \
85
- --agent <id> \
86
- --computer cloud \
87
- "message text"
88
- ```
143
+ When another agent identifies itself, its message arrives with a system
144
+ reminder naming its agent ID and, when it had one, its conversation ID.
89
145
 
90
- **Arguments:**
91
- | Arg | Required | Description |
92
- |-----|----------|-------------|
93
- | `--agent <id>` | Yes | Target agent ID to message |
94
- | `--from-agent <id>` | Yes | Sender agent ID (injects agent-to-agent system reminder) |
95
- | `--computer <selector>` | No | Route through `cloud` (target agent's cloud sandbox) or an online computer by connection name, device ID, or connection ID |
96
- | `"message text"` | Yes | Message body (positional after flags) |
146
+ - If the reminder says the sender will only see your final message: answer in
147
+ your response. Nothing more is needed.
148
+ - If the reminder asks for an explicit reply: use its return address with
149
+ `SendAgentMessage({ agent_id, conversation_id, message })`, or
150
+ `letta -p --agent <sender-agent-id> --conversation <sender-conversation-id> --no-wait "reply"`.
151
+ Your ordinary output is not forwarded to the sender.
152
+ - If it says no return conversation was supplied: your output is not forwarded
153
+ and there is no thread to reply into. Answer as you normally would.
97
154
 
98
- **Example:**
99
- ```bash
100
- letta -p --from-agent $LETTA_AGENT_ID \
101
- --agent agent-abc123 \
102
- "What do you know about the authentication system?"
103
- ```
155
+ A message without such a reminder carries no sender or reply instructions;
156
+ respond to it as you would to any input.
104
157
 
105
- **Response (JSON format with `--output json`):**
106
- ```json
107
- {
108
- "type": "result",
109
- "subtype": "success",
110
- "is_error": false,
111
- "result": "The authentication system uses JWT tokens...",
112
- "agent_id": "agent-abc123",
113
- "conversation_id": "conversation-xyz789",
114
- "environment": { "source": "same-environment" },
115
- "usage": { "prompt_tokens": 120, "completion_tokens": 80, "total_tokens": 200, "step_count": 1 }
116
- }
117
- ```
158
+ ## Checking on a conversation
118
159
 
119
- ### Continuing a Conversation
160
+ Recent messages are the quick progress check on either backend. This command
161
+ requests recent messages and prints the returned messages oldest to newest (add
162
+ `--backend local` in the same cases as for sends):
120
163
 
121
164
  ```bash
122
- letta -p --from-agent $LETTA_AGENT_ID --conversation <id> "message text"
165
+ letta messages list --conversation <conversation-id> --limit 10
123
166
  ```
124
167
 
125
- Add `--computer <selector>` to continue the conversation on a specific computer.
168
+ `letta messages status --conversation <id>` (Cloud only) reports whether the
169
+ conversation is currently running. When `latest_super_run` is present, compare
170
+ its `id` with the `super_run_id` on your receipt; a different ID belongs to a
171
+ different send. Read the messages to see what was processed. Non-waiting
172
+ receipts include ready-to-run `status_command` and `messages_command` values for the thread
173
+ they went to. `letta messages transcript --conversation <id>` exports the
174
+ thread; check `truncated` before treating it as complete.
175
+ `letta messages --help` lists the options.
126
176
 
127
- ### Discovering Computers
177
+ ## Finding an agent
128
178
 
129
179
  ```bash
130
- letta computers list --online-only
131
- # alias:
132
- letta envs list --online-only
180
+ letta agents list --query "name"
181
+ letta messages search --query "topic" --all-agents # discovery; results include agent_id
133
182
  ```
134
183
 
135
- Use `connectionName`, `deviceId`, or `connectionId` from the JSON output as the
136
- `--computer` selector. If a name is ambiguous, prefer `deviceId` or
137
- `connectionId`. In `computers list`, the current local runtime is marked with
138
- `"isCurrent": true`.
184
+ Load the `finding-agents` skill for more search options.
139
185
 
140
- To force the target agent onto the current registered Letta Code computer,
141
- resolve the current computer and pass its `connectionId`:
186
+ ## Choosing a computer (Cloud backend)
142
187
 
143
- ```bash
144
- CURRENT_COMPUTER=$(letta computers current | jq -r .connectionId)
145
- letta -p --from-agent $LETTA_AGENT_ID \
146
- --agent agent-abc123 \
147
- --computer "$CURRENT_COMPUTER" \
148
- "Run on my same computer."
149
- ```
150
-
151
- Omit `--computer` when you want the target agent to run on the same computer as
152
- the caller agent.
153
-
154
- **Arguments:**
155
- | Arg | Required | Description |
156
- |-----|----------|-------------|
157
- | `--conversation <id>` | Yes | Existing conversation ID |
158
- | `--from-agent <id>` | Yes | Sender agent ID (injects agent-to-agent system reminder) |
159
- | `"message text"` | Yes | Follow-up message (positional after flags) |
188
+ Only when a specific machine is required:
160
189
 
161
- **Example:**
162
190
  ```bash
163
- letta -p --from-agent $LETTA_AGENT_ID \
164
- --conversation conversation-xyz789 \
165
- "Can you explain more about the token refresh flow?"
166
- ```
167
-
168
- ## Understanding the Response
169
-
170
- - Text-mode scripts return only the **final assistant message** (not tool calls, reasoning, or metadata)
171
- - JSON and stream-json responses include `agent_id`, `conversation_id`, and `environment.source` so you can continue the same conversation/runtime. Environment-routed turns also include `environment.id`, `connection_id`, `device_id`, and `name`.
172
- - The target agent may use tools, think, and reason - but you only see their final response
173
- - To see the full conversation transcript (including tool calls), use `letta messages list --agent <id>` targeting the other agent
174
-
175
- ## How It Works
176
-
177
- When you send a message, the target agent receives it with a system reminder:
178
- ```
179
- <system-reminder>
180
- This message is from "YourAgentName" (agent ID: agent-xxx), an agent currently running inside the Letta Code CLI (docs.letta.com/letta-code).
181
- The sender will only see the final message you generate (not tool calls or reasoning).
182
- If you need to share detailed information, include it in your response text.
183
- </system-reminder>
191
+ letta computers list --online-only # connectionName and deviceId
192
+ letta -p --agent <agent-id> --computer <name-or-device-id> --no-wait "message"
193
+ letta -p --agent <agent-id> --computer cloud --no-wait "message" # its Cloud sandbox
184
194
  ```
185
195
 
186
- This helps the target agent understand the context and format their response appropriately.
187
-
188
- ## Hidden Conversations
189
-
190
- Agent-to-agent conversations (started via `--from-agent`) are created **hidden** on the target agent. They don't appear in the target's default conversation list in the ADE, so automated inter-agent chatter doesn't clutter the UI.
191
-
192
- To inspect them:
193
- - List hidden conversations via the API with `archive_status=archived` (or `all`)
194
- - Pull the transcript directly with `letta messages transcript --conversation <id>`
195
- - The `conversation_id` returned when you sent the message is the handle you need
196
-
197
- Continuing a hidden conversation with `--conversation <id>` keeps it hidden only archive status is affected, messaging still works normally.
198
-
199
- ## Related Skills
200
-
201
- - **finding-agents**: Find agents by name, tags, or fuzzy search
196
+ If the conversation is active on another computer the send is rejected; to
197
+ move a conversation, teleport it (see the `working-across-computers` skill).
198
+ An offline saved computer does not trigger a Cloud-sandbox fallback.
199
+ `letta computers --help` covers the selectors.
200
+
201
+ ## Gotchas
202
+
203
+ - `SendAgentMessage`, `--no-wait`, `--computer`, and `messages status` fail on
204
+ the local backend even when they are offered. Check your agent ID prefix.
205
+ - For Cloud coordination, do not rely on `--agent` alone to select message
206
+ delivery. Add `--from-agent $LETTA_AGENT_ID` to deliver and identify yourself;
207
+ pass `--conversation <id>` to reach an existing thread.
208
+ - The Cloud messaging recipes above reject execution flags (`--tools`,
209
+ `--permission-mode`, `--model`, `--system`, and similar); the recipient keeps
210
+ its own configuration. Those flags configure a launch when using the
211
+ retained `--agent`-only path or local-backend execution.
212
+ - `--conversation default` needs `--agent`; `default` is scoped to an agent.
213
+ - A receipt means accepted, not delivered. If a send's outcome is unknown
214
+ (`acceptance_unknown`, a timed-out wait), read the thread before resending.
215
+
216
+ ## Related
217
+
218
+ - `letta --help` and each subcommand's `--help` are the reference for flags;
219
+ this skill explains the concepts and the common recipes.
220
+ - `finding-agents`: locate agents by name, tags, or search.
221
+ - `working-across-computers`: teleporting and moving files between computers.
222
+ - `dispatching-coding-agents`: driving Claude Code or Codex through their
223
+ CLIs, including background execution and collecting results. The same
224
+ pattern applies to a Letta Code instance on another backend: run the
225
+ waiting-send commands above inside it with a `--from-agent` that exists
226
+ there.
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: working-across-computers
3
+ description: Guides work across Cloud, local, and other available computers, including teleporting the current conversation, orchestrating remote subagents, and uploading or downloading files to Cloud sandboxes. Use when moving between computers (e.g. teleporting between cloud/local) or coordinating work and files across them.
4
+ ---
5
+
6
+ # Working Across Computers
7
+
8
+ ## Choose where to work
9
+
10
+ - When running in Cloud, prefer staying there and delegating local work to subagents on the relevant computer.
11
+ - If the user explicitly asks to move this conversation locally or elsewhere, teleport it.
12
+ - Moving a conversation that started locally into Cloud is a normal workflow: transfer needed files first, then teleport.
13
+
14
+ | Intent | Mechanism |
15
+ |---|---|
16
+ | Run work elsewhere while staying here | `Agent` |
17
+ | Bring a remote file into a Cloud conversation | Remote agent: `sandbox upload` |
18
+ | Put a Cloud file onto another computer | Remote agent: `sandbox download` |
19
+ | Continue this conversation elsewhere | `teleport` |
20
+
21
+ Conversation history and agent memory follow the conversation. Files, working directories, installed tools, credentials, and running services belong to each computer; teleporting does not copy the workspace.
22
+
23
+ For remote subagents, set `computer` and pass source paths and destination conversation IDs explicitly. Use the `Agent` tool definition for invocation and resume options.
24
+
25
+ If the user wants to connect a new computer, `letta teleport list` has no suitable target, or the requested local machine is missing or unreachable, read [Connect a computer for remote access](references/connect-a-computer-for-remote-access.md).
26
+
27
+ ## Move this conversation
28
+
29
+ **Run the teleport handoff alone as the final tool call.** After success, do not poll or run more source-side tools; the same conversation resumes at the destination automatically. Set the working directory and check required setup there. If teleport fails, stay on the source and resolve the error before retrying. The Cloud sandbox remains available while you work elsewhere.
30
+
31
+ ### Local → Cloud
32
+
33
+ Upload any files needed in Cloud:
34
+
35
+ ```bash
36
+ letta sandbox upload <local-path>
37
+ ```
38
+
39
+ Keep the returned paths, repository/branch, and next action in context, then create or resume this conversation's Cloud sandbox:
40
+
41
+ ```bash
42
+ letta teleport cloud
43
+ ```
44
+
45
+ ### Cloud → other computers
46
+
47
+ List available computers:
48
+
49
+ ```bash
50
+ letta teleport list
51
+ ```
52
+
53
+ Have a remote subagent download any needed files and verify completion before moving. Use a returned computer name, device ID, or connection ID:
54
+
55
+ ```bash
56
+ letta teleport <computer>
57
+ ```
58
+
59
+ With exactly one online Desktop, open with Remote Access enabled, you can use the shortcut:
60
+
61
+ ```bash
62
+ letta teleport local
63
+ ```
64
+
65
+ ## Transfer files to or from Cloud
66
+
67
+ Run upload where the local file exists; run download where the local copy should be saved.
68
+
69
+ ```bash
70
+ # Use the executing conversation's Cloud sandbox
71
+ letta sandbox upload <local-path>
72
+ letta sandbox download <sandbox-path> --to <local-path>
73
+
74
+ # Explicit Cloud conversation (sandboxes are per-conversation)
75
+ letta sandbox upload <local-path> --conversation <destination-conversation-id>
76
+ letta sandbox download <sandbox-path> \
77
+ --conversation <source-conversation-id> --to <local-path>
78
+
79
+ # An agent's main/default conversation
80
+ letta sandbox upload <local-path> --agent <agent-id>
81
+ letta sandbox download <sandbox-path> --agent <agent-id> --to <local-path>
82
+ ```
83
+
84
+ - `--agent` alone selects that agent's main/default conversation. Concrete `--conversation` IDs resolve their owning agent.
85
+ - Target flags override the executing session without changing its identity. Do not replace the subagent's identity environment variables with the parent's.
86
+ - The executing computer's credentials must authorize access to the target.
87
+ - Commands return JSON. Use the exact upload path returned; never reconstruct it from the filename.
88
+ - Download sources must be under `/root/downloads`; `--to` selects the destination path on the receiving computer. Without `--to`, download saves under the source file's basename.
89
+ - Transfer files directly, not as base64 or file contents through model messages. Return the path and destination IDs; verify received contents or checksums.
90
+ - These commands transfer files to/from Cloud sandboxes, not arbitrary remote filesystems. No sandbox ID or separate wake command is needed.
@@ -0,0 +1,59 @@
1
+ # Connect a computer for remote access
2
+
3
+ Use this guide when the user is connecting a computer for the first time, no suitable computers are listed, or their local machine cannot be reached.
4
+
5
+ Explain that the user must complete setup **on the computer they want to connect**, signed into the same Letta account they use on chat.letta.com. Remote access lets agents run commands and access files on that machine, subject to tool approvals. Local-only / “Skip login” mode is not sufficient.
6
+
7
+ Recommend Desktop for a personal computer; offer the CLI for a terminal-only machine or VM. Give the relevant steps below rather than only saying the computer is unavailable. Do not run registration commands in the Cloud sandbox as a substitute for connecting the user's machine.
8
+
9
+ ## Option 1: Letta Desktop
10
+
11
+ Ask the user to:
12
+
13
+ 1. [Download and install Letta Desktop](https://docs.letta.com/quickstart/) for their operating system.
14
+ 2. Open the app and sign in to their Letta account.
15
+ 3. Open **Preferences → General** and enable **Allow remote access**.
16
+ 4. Set the computer's name in the field beneath the toggle.
17
+ 5. Keep Desktop running and the computer awake and connected to the internet.
18
+ 6. Open chat.letta.com and select the named computer in the computer picker to run a conversation there.
19
+
20
+ Show the bundled screenshot when explaining the toggle and name field:
21
+
22
+ ![Desktop Preferences showing Allow remote access and the computer-name field](../assets/allow-remote-access-from-desktop.png)
23
+
24
+ Resolve `assets/allow-remote-access-from-desktop.png` relative to this skill's directory. In chat or Desktop, use the resolved absolute local path in the Markdown image you send, not this reference file's relative path. The screenshot is from the original teleportation skill; surrounding settings may differ in newer Desktop versions.
25
+
26
+ ## Option 2: CLI server
27
+
28
+ Ask the user to install [Node.js 22.19 or newer](https://nodejs.org/en/download), then run these commands in a terminal **on the target computer**:
29
+
30
+ ```bash
31
+ npm install -g @letta-ai/letta-code
32
+ letta server --computer-name "work-laptop"
33
+ ```
34
+
35
+ If not already authenticated, the server prints a login URL. Ask the user to open it in a browser and authorize with their Letta account. Do not ask them to paste credentials into chat.
36
+
37
+ Keep the server process running and the computer awake and online. The named computer will appear in the picker on chat.letta.com or Desktop. For an always-on VM, use a service manager and persist the CLI's authentication state across restarts.
38
+
39
+ No inbound ports, public IP, or reverse proxy are required: the server connects outward to Letta Cloud. Use plain `letta server`, not `letta server --listen`; `--listen` starts the separate App Server interface for direct application connections.
40
+
41
+ ## Verify access or reconnect an existing computer
42
+
43
+ After the user completes setup, run:
44
+
45
+ ```bash
46
+ letta teleport list
47
+ ```
48
+
49
+ Use the returned computer name or ID for remote delegation or teleportation. Do not claim access is ready until the desired computer is listed. Keep the current conversation in place unless the user wants to move it; remote subagents can work there while the parent stays in Cloud.
50
+
51
+ If the computer is still missing or unreachable, ask the user to check that:
52
+
53
+ - The computer is awake and connected to the internet.
54
+ - Desktop is open with **Allow remote access** enabled, or `letta server` is still running.
55
+ - The app or CLI is signed into the same Letta account as the web session.
56
+
57
+ Re-list after the user changes the relevant state, rather than repeatedly retrying an unavailable target. If it is listed but an operation still fails, use the concrete error to diagnose authentication, connectivity, or version compatibility; do not assume it needs reinstalling or bypass access controls.
58
+
59
+ For current installation details, consult the [machine setup docs](https://docs.letta.com/platform/computers/byom/). Verify CLI flags with `letta server --help` if docs and the installed version disagree.