@letta-ai/letta-code 0.27.25 → 0.27.26

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.27.25",
3
+ "version": "0.27.26",
4
4
  "description": "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.3.0",
@@ -66,11 +66,24 @@ Results include `agent_id` for each matching message.
66
66
  letta -p --from-agent $LETTA_AGENT_ID --agent <id> "message text"
67
67
  ```
68
68
 
69
+ When no `--environment` is specified, the target agent will run in the same
70
+ environment as the caller agent.
71
+
72
+ To route the target agent turn through a specific remote/local environment:
73
+
74
+ ```bash
75
+ letta -p --from-agent $LETTA_AGENT_ID \
76
+ --agent <id> \
77
+ --environment <name-or-device-id-or-connection-id> \
78
+ "message text"
79
+ ```
80
+
69
81
  **Arguments:**
70
82
  | Arg | Required | Description |
71
83
  |-----|----------|-------------|
72
84
  | `--agent <id>` | Yes | Target agent ID to message |
73
85
  | `--from-agent <id>` | Yes | Sender agent ID (injects agent-to-agent system reminder) |
86
+ | `--environment <selector>` | No | Route through an online environment by connection name, device ID, or connection ID |
74
87
  | `"message text"` | Yes | Message body (positional after flags) |
75
88
 
76
89
  **Example:**
@@ -96,6 +109,35 @@ letta -p --from-agent $LETTA_AGENT_ID \
96
109
  letta -p --from-agent $LETTA_AGENT_ID --conversation <id> "message text"
97
110
  ```
98
111
 
112
+ Add `--environment <selector>` to continue the conversation on a specific environment.
113
+
114
+ ### Discovering Environments
115
+
116
+ ```bash
117
+ letta environments list --online-only
118
+ # alias:
119
+ letta envs list --online-only
120
+ ```
121
+
122
+ Use `connectionName`, `deviceId`, or `connectionId` from the JSON output as the
123
+ `--environment` selector. If a name is ambiguous, prefer `deviceId` or
124
+ `connectionId`. In `environments list`, the current local runtime is marked with
125
+ `"isCurrent": true`.
126
+
127
+ To force the target agent onto the current registered Letta Code environment,
128
+ resolve the current environment and pass its `connectionId`:
129
+
130
+ ```bash
131
+ CURRENT_ENV=$(letta environments current | jq -r .connectionId)
132
+ letta -p --from-agent $LETTA_AGENT_ID \
133
+ --agent agent-abc123 \
134
+ --environment "$CURRENT_ENV" \
135
+ "Run on my same machine/environment."
136
+ ```
137
+
138
+ Omit `--environment` when you want the target agent to run in the same
139
+ environment as the caller agent.
140
+
99
141
  **Arguments:**
100
142
  | Arg | Required | Description |
101
143
  |-----|----------|-------------|
@@ -112,7 +154,8 @@ letta -p --from-agent $LETTA_AGENT_ID \
112
154
 
113
155
  ## Understanding the Response
114
156
 
115
- - Scripts return only the **final assistant message** (not tool calls or reasoning)
157
+ - Text-mode scripts return only the **final assistant message** (not tool calls, reasoning, or metadata)
158
+ - 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`.
116
159
  - The target agent may use tools, think, and reason - but you only see their final response
117
160
  - To see the full conversation transcript (including tool calls), use the `searching-messages` skill with `letta messages list --agent <id>` targeting the other agent
118
161