@letta-ai/letta-code 0.1.7 → 0.1.9

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 CHANGED
@@ -2,12 +2,18 @@
2
2
 
3
3
  A self-improving, stateful coding agent that can learn from experience and improve with use.
4
4
 
5
+ https://github.com/user-attachments/assets/5561a3ff-afd9-42a9-8601-55d245946394
6
+
7
+ ---
8
+
5
9
  ## What is Letta Code?
6
10
 
7
11
  Letta Code is a command-line harness around the stateful Letta [Agents API](https://docs.letta.com/api-reference/overview). You can use Letta Code to create and connect with any Letta agent (even non-coding agents!) - Letta Code simply gives your agents the ability to interact with your local dev environment, directly in your terminal.
8
12
 
13
+ Letta Code is model agnostic, and supports Sonnet 4.5, GPT-5, Gemini 2.5, GLM-4.6, and more.
14
+
9
15
  > [!IMPORTANT]
10
- > Letta Code is a **research preview** in active development, and may have bugs or unexpected issues. To learn more about the roadmap and chat with the dev team, visit our Discord at [discord.gg/letta](https:/discord.gg/letta). Contributions welcome, join the fun.
16
+ > Letta Code is a **research preview** in active development, and may have bugs or unexpected issues. To learn more about the roadmap and chat with the dev team, visit our [Discord](https:/discord.gg/letta). Contributions welcome, join the fun.
11
17
 
12
18
  ## Quickstart
13
19
 
@@ -28,12 +34,41 @@ Then run `letta` to start Letta Code (see various command-line options below):
28
34
  letta
29
35
  ```
30
36
 
37
+ Any of the agents you create in Letta Code will be viewable (and fully interactable!) inside the [Agent Development Environment](https://app.letta.com).
38
+
39
+ ## Persistence
40
+
41
+ All agents in Letta are **stateful**: they maintain context forever and can self-edit their own [memory blocks](https://www.letta.com/blog/memory-blocks). Agents can share memory blocks across projects—for example, multiple agents can share user coding preferences while maintaining project-specific memories independently.
42
+
43
+ ### Memory Configuration
44
+
45
+ Letta Code uses a hierarchical memory system with both global and local blocks:
46
+
47
+ **Global** (`~/.letta/settings.json`)
48
+ - `persona` block - defines agent behavior
49
+ - `human` block - stores user coding preferences
50
+
51
+ **Local** (`./.letta/settings.json`)
52
+ - `project` block - stores project-specific context
53
+
54
+ ### Starting Letta
55
+
56
+ ```bash
57
+ letta # New agent (attaches to existing memory blocks or creates new)
58
+ letta --continue # Resume last agent session
59
+ letta --agent <id> # Resume specific agent session
60
+ ```
61
+
62
+ When you start a new agent, it automatically connects to existing memory block IDs from your settings files. If none exist, it creates them.
63
+
64
+ Memory blocks are highly configurable — see our [docs](https://docs.letta.com/guides/agents/memory-blocks) for advanced configuration options. Join our [Discord](https://discord.gg/letta) to share feedback on persistence patterns for coding agents.
65
+
31
66
  ## Usage
32
67
 
33
68
  ### Interactive Mode
34
69
  ```bash
35
- letta # Start new session
36
- letta --continue # Resume last session
70
+ letta # Start new session (new agent with shared memory blocks)
71
+ letta --continue # Resume last session (last recently used agent)
37
72
  letta --agent <id> # Open specific agent
38
73
  ```
39
74
 
@@ -57,6 +92,30 @@ letta -p "run tests" --tools "Bash,Read" # Only load specific tools
57
92
  letta -p "analyze code" --tools "" # No tools (analysis only)
58
93
  ```
59
94
 
95
+ Use `--output-format json` to get additional information, including the agent ID ("session_id"):
96
+ ```bash
97
+ # regular text output
98
+ $ letta -p "hi there"
99
+ Hi! How can I help you today?
100
+
101
+ # structured output
102
+ $ letta -p "hi there" --output-format json
103
+ {
104
+ "type": "result",
105
+ "subtype": "success",
106
+ "is_error": false,
107
+ "duration_ms": 5454,
108
+ "duration_api_ms": 2098,
109
+ "num_turns": 1,
110
+ "result": "Hi! How can I help you today?",
111
+ "session_id": "agent-8ab431ca-63e0-4ca1-ba83-b64d66d95a0f",
112
+ "usage": {
113
+ "input_tokens": 294,
114
+ "output_tokens": 97
115
+ }
116
+ }
117
+ ```
118
+
60
119
  ### Permissions
61
120
 
62
121
  **Tool selection** (controls which tools are loaded):
@@ -102,8 +161,8 @@ First, install Bun if you don't have it yet: [https://bun.com/docs/installation]
102
161
  bun install
103
162
 
104
163
  # run the CLI from TypeScript sources (pick up changes immediately)
105
- bun run dev:ui
106
- bun run dev:ui -- -p "Hello world" # example with args
164
+ bun run dev
165
+ bun run dev -- -p "Hello world" # example with args
107
166
  ```
108
167
 
109
168
  ### Build + link the standalone binary