@letta-ai/letta-code 0.31.4 → 0.31.6
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/dist/agent-presets.js +201 -1
- package/dist/agent-presets.js.map +3 -3
- package/dist/mcp-client.js +2 -2
- package/dist/mcp-client.js.map +1 -1
- package/dist/types/agent/attached-repositories.d.ts +7 -0
- package/dist/types/agent/attached-repositories.d.ts.map +1 -0
- package/dist/types/agent/client-skills.d.ts +1 -1
- package/dist/types/agent/client-skills.d.ts.map +1 -1
- package/dist/types/agent/memory-constraints.d.ts +22 -0
- package/dist/types/agent/memory-constraints.d.ts.map +1 -0
- package/dist/types/agent/memory-git-hooks.d.ts +5 -5
- package/dist/types/agent/memory-git-hooks.d.ts.map +1 -1
- package/dist/types/agent/memory-git.d.ts +36 -5
- package/dist/types/agent/memory-git.d.ts.map +1 -1
- package/dist/types/agent/modify.d.ts.map +1 -1
- package/dist/types/agent/prompt-assets.d.ts +2 -1
- package/dist/types/agent/prompt-assets.d.ts.map +1 -1
- package/dist/types/agent/shared-memory-skills.d.ts +1 -1
- package/dist/types/agent/shared-memory-skills.d.ts.map +1 -1
- package/dist/types/agent/system-prompt-versioning.d.ts +5 -0
- package/dist/types/agent/system-prompt-versioning.d.ts.map +1 -1
- package/dist/types/backend/dev/pi-model-factory.d.ts +0 -1
- package/dist/types/backend/dev/pi-model-factory.d.ts.map +1 -1
- package/dist/types/backend/local/local-model-config.d.ts.map +1 -1
- package/dist/types/tools/impl/skill.d.ts +7 -1
- package/dist/types/tools/impl/skill.d.ts.map +1 -1
- package/letta.js +20153 -19752
- package/package.json +2 -2
- package/scripts/source-file-size-baseline.json +1 -1
- package/skills/context-doctor/ROOT_MEMORY.md +137 -0
- package/skills/initializing-memory/ROOT_MEMORY.md +721 -0
- package/skills/managing-shared-memory/SKILL.md +4 -5
- package/skills/self-configuration/SKILL.md +13 -8
- package/skills/submitting-feedback/SKILL.md +21 -0
- package/skills/syncing-memory-filesystem/SKILL.md +20 -10
|
@@ -7,7 +7,7 @@ description: Create and manage shared memory — git-tracked repositories hosted
|
|
|
7
7
|
|
|
8
8
|
Shared memory is memory created independently of any single agent, designed to be dynamically attached to or detached from multiple agents. Each unit of shared memory is a **shared memory repository**: a git repository hosted on Letta Cloud, owned by your organization rather than by one agent, reachable from any environment (sandboxes, remote machines, sessions).
|
|
9
9
|
|
|
10
|
-
Shared memory works
|
|
10
|
+
Shared memory works like your MemFS: attached repositories are real git checkouts on disk, and you read, edit, and commit with ordinary git. The harness pushes clean committed changes after each turn. Each repository has its own projection root (next to your memory directory, not inside it) and its own remote origin, and other agents may be writing to it too.
|
|
11
11
|
|
|
12
12
|
Create a shared memory repository when:
|
|
13
13
|
- You have context an agent should be able to access that doesn't belong in its own MemFS (input files, datasets, docs, working artifacts)
|
|
@@ -23,16 +23,15 @@ ls "$MEMORY_DIR/../" # attached repositories appear here by
|
|
|
23
23
|
cat "$MEMORY_DIR/../<repo-name>/<path>" # read like any file
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Edit files with your normal file tools, then commit
|
|
26
|
+
Edit files with your normal file tools, then commit with git. The mount's origin and credentials are already configured:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
29
|
cd "$MEMORY_DIR/../<repo-name>"
|
|
30
30
|
git add <files>
|
|
31
31
|
git commit -m "describe the change"
|
|
32
|
-
git push
|
|
33
32
|
```
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
The harness pushes clean commits from read/write attached repositories after the turn. If a push collides with another agent's work, it pulls with rebase and retries once. Dirty files and conflicts are not changed automatically; the harness adds a reminder to the next turn instead.
|
|
36
35
|
|
|
37
36
|
To pick up other agents' changes:
|
|
38
37
|
|
|
@@ -84,7 +83,7 @@ letta shared-memory history shared-notes --path docs/plan.md
|
|
|
84
83
|
- **`sync` reports "mount path already exists and is not a git repository"** — a plain directory (usually created by hand before the mount existed) is occupying the mount path. Inspect it, salvage anything worth keeping, move or delete it, then re-run `letta shared-memory sync`.
|
|
85
84
|
- **Never hand-clone the repository to another location (e.g. /tmp) to work around a broken mount** — fix the mount with `letta shared-memory sync` so every session and other agents see the same checkout.
|
|
86
85
|
- **Permission denied under another agent's directory** — shared repositories mount per-agent. Only your own mount (under your agent directory) is accessible; another agent's mount of the same repository is walled off by the cross-agent guard. Run `letta shared-memory sync` to get your own mount.
|
|
87
|
-
- **
|
|
86
|
+
- **Shared-memory conflict reminder** — resolve the conflict in the named repository, finish the rebase or commit, and leave the repository clean. The harness retries the push after a future turn.
|
|
88
87
|
|
|
89
88
|
## Notes and Limits
|
|
90
89
|
|
|
@@ -88,15 +88,20 @@ If CLI behavior does not match the docs, stop and inspect `command -v letta`, `t
|
|
|
88
88
|
|
|
89
89
|
Use memory when the user wants you to remember, prefer, learn, or change your identity/personality.
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
Inspect the projected memory tree in the system prompt before choosing paths.
|
|
92
|
+
Letta Code supports two layouts:
|
|
92
93
|
|
|
93
|
-
|
|
|
94
|
-
| --- | --- |
|
|
95
|
-
| `$MEMORY_DIR/
|
|
96
|
-
| `$MEMORY_DIR/
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
| `$MEMORY_DIR/
|
|
94
|
+
| Purpose | Root layout | Existing layout |
|
|
95
|
+
| --- | --- | --- |
|
|
96
|
+
| Identity and voice | `$MEMORY_DIR/persona.md` or another root persona file | `$MEMORY_DIR/system/persona.md` |
|
|
97
|
+
| Notes about the user | `$MEMORY_DIR/human.md` or another root human file | `$MEMORY_DIR/system/human.md` |
|
|
98
|
+
| Core memory | Other root Markdown files indexed by `MEMORY.md` | Markdown files under `$MEMORY_DIR/system/` |
|
|
99
|
+
| Deferred memory | Directories with their own `MEMORY.md` | Files outside `$MEMORY_DIR/system/` |
|
|
100
|
+
| Agent-owned skills | `$MEMORY_DIR/skills/` | `$MEMORY_DIR/skills/` |
|
|
101
|
+
|
|
102
|
+
Use the active layout shown by the prompt and memory tools. Do not create a
|
|
103
|
+
`system/` directory in a root-layout repository or move existing-layout memory
|
|
104
|
+
to the root as part of an unrelated self-configuration request.
|
|
100
105
|
|
|
101
106
|
After changing memory, inspect and commit the exact changed files. Push/sync according to the current harness reminder or the `syncing-memory-filesystem` skill; some environments sync committed memory automatically.
|
|
102
107
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: submitting-feedback
|
|
3
|
+
description: Submits user-approved feedback about Letta Code or the current agent to the Letta team. Load when the user is upset, frustrated, dissatisfied, reports poor agent behavior, or asks to send feedback. Works with cloud-hosted and local agents. Ask before submitting unless the user already explicitly requested submission.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Submitting Feedback
|
|
7
|
+
|
|
8
|
+
When the user appears upset with the agent, acknowledge the problem and ask whether they want you to submit feedback to the Letta team. Do not submit merely because the user expressed frustration.
|
|
9
|
+
|
|
10
|
+
If the user says yes, or directly asks you to submit feedback:
|
|
11
|
+
|
|
12
|
+
1. Write a short factual message in the user's voice. Include what happened, what the user expected, and any useful error or behavior detail already present in the conversation. Do not add claims the user did not make.
|
|
13
|
+
2. Submit it with:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
letta feedback --message '<feedback>'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
3. Tell the user whether submission succeeded. If it failed, report the safe CLI error and do not claim the team received it.
|
|
20
|
+
|
|
21
|
+
Do not include secrets, credentials, unrelated conversation content, or private file contents. The command adds the current agent and conversation identifiers so the team can find the relevant run.
|
|
@@ -15,11 +15,16 @@ MemFS is a Git repository projected onto the computer where the agent is
|
|
|
15
15
|
running. `$MEMORY_DIR` is the repository root. There is no second `memory/`
|
|
16
16
|
directory inside it.
|
|
17
17
|
|
|
18
|
+
The repository can use either memory layout. Inspect its current tree and the
|
|
19
|
+
memory rules in the system prompt before editing files:
|
|
20
|
+
|
|
18
21
|
```text
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
├──
|
|
22
|
-
├──
|
|
22
|
+
Root layout Existing layout
|
|
23
|
+
$MEMORY_DIR/ $MEMORY_DIR/
|
|
24
|
+
├── MEMORY.md # root index ├── system/ # in-context memory
|
|
25
|
+
├── persona.md # core memory ├── reference/ # deferred memory
|
|
26
|
+
├── <topic>/ └── skills/ # agent-owned skills
|
|
27
|
+
│ └── MEMORY.md # child index
|
|
23
28
|
└── skills/ # agent-owned skills
|
|
24
29
|
```
|
|
25
30
|
|
|
@@ -32,7 +37,7 @@ on the current machine. Do not run `git push` for normal MemFS sync; let the
|
|
|
32
37
|
harness push after the turn.
|
|
33
38
|
|
|
34
39
|
Committed memory changes do not alter the current compiled prompt immediately.
|
|
35
|
-
Use `/recompile` when the current conversation must see
|
|
40
|
+
Use `/recompile` when the current conversation must see changed core memory
|
|
36
41
|
right away. Otherwise, the next prompt compilation or conversation will use
|
|
37
42
|
the committed revision.
|
|
38
43
|
|
|
@@ -87,9 +92,13 @@ auth, branch tracking, and agent identity.
|
|
|
87
92
|
|
|
88
93
|
## Uncommitted Changes
|
|
89
94
|
|
|
90
|
-
Raw file edits must preserve
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
Raw file edits must preserve the active layout's rules:
|
|
96
|
+
|
|
97
|
+
- In the root layout, root and child `MEMORY.md` indexes have no frontmatter.
|
|
98
|
+
Every other memory Markdown file has exactly `name` and `description`.
|
|
99
|
+
- In the existing layout, Markdown files under `system/` and `reference/` need
|
|
100
|
+
a non-empty `description`. `read_only` is protected and cannot be added,
|
|
101
|
+
removed, or changed by the agent.
|
|
93
102
|
|
|
94
103
|
```markdown
|
|
95
104
|
---
|
|
@@ -121,7 +130,7 @@ Resolve the conflict markers without deleting required frontmatter, then stage
|
|
|
121
130
|
the resolved files by name. Finish the operation Git reports:
|
|
122
131
|
|
|
123
132
|
```bash
|
|
124
|
-
git -C "$MEMORY_DIR" add
|
|
133
|
+
git -C "$MEMORY_DIR" add <resolved-memory-path>
|
|
125
134
|
|
|
126
135
|
# If git status says a rebase is in progress:
|
|
127
136
|
GIT_EDITOR=true git -C "$MEMORY_DIR" rebase --continue
|
|
@@ -163,7 +172,8 @@ MemFS synchronization.
|
|
|
163
172
|
2. Check whether the backend is cloud-backed or local-only.
|
|
164
173
|
3. Inspect `git status`, the origin URL, and the current Git operation.
|
|
165
174
|
4. Use `/memfs enable` for a missing checkout and `/memfs sync` for a pull.
|
|
166
|
-
5. Preserve
|
|
175
|
+
5. Preserve the active layout's indexes and frontmatter, then finish any
|
|
176
|
+
existing merge or rebase.
|
|
167
177
|
6. Leave hosted pushes to post-turn sync once the repository is clean.
|
|
168
178
|
7. If the command still fails, rerun it with `LETTA_DEBUG=1` and report the
|
|
169
179
|
redacted error. Never print or copy credential-helper values.
|