@letta-ai/letta-agent-sdk 0.8.18 → 0.8.20
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 +5 -0
- package/dist/client-base.d.ts +1 -1
- package/dist/client-base.d.ts.map +1 -1
- package/dist/client-entry.js +29 -38
- package/dist/client-entry.js.map +4 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/index.js +40 -47
- package/dist/index.js.map +6 -6
- package/dist/query-types.d.ts +3 -1
- package/dist/query-types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/client-base.ts +53 -40
- package/src/client.ts +21 -17
- package/src/query-types.ts +3 -1
package/README.md
CHANGED
|
@@ -70,6 +70,11 @@ for await (const message of client.query({
|
|
|
70
70
|
`appServer.harnessBackend: "api"`; the default local harness backend does not
|
|
71
71
|
store agent-free conversations.
|
|
72
72
|
|
|
73
|
+
Pass the returned `query.conversationId` as `options.conversationId` on a later
|
|
74
|
+
`query()` to continue that conversation with its history. On resume, `model`,
|
|
75
|
+
`system`, and other creation settings are ignored; the conversation keeps its
|
|
76
|
+
stored configuration.
|
|
77
|
+
|
|
73
78
|
Cloud queries require an explicit connected computer. Local and remote clients
|
|
74
79
|
run the ephemeral conversation through their App Server.
|
|
75
80
|
|
package/dist/client-base.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export declare class LettaAgentClientBase implements AsyncDisposable {
|
|
|
60
60
|
* Applications should use a session when they need interactive turn state.
|
|
61
61
|
*/
|
|
62
62
|
prompt(message: SendMessage, agentId: string, options?: LettaCodeClientSessionOptions): Promise<SDKResultMessage>;
|
|
63
|
-
/** Run one prompt in a new agent-free ephemeral conversation. */
|
|
63
|
+
/** Run one prompt in a new or resumed agent-free ephemeral conversation. */
|
|
64
64
|
query(params: QueryParams): Query;
|
|
65
65
|
private createAgentFreeSession;
|
|
66
66
|
private assertSessionBackend;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-base.d.ts","sourceRoot":"","sources":["../src/client-base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAS9E,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAEV,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACb,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EACV,qBAAqB,EACrB,KAAK,EACL,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACV,kBAAkB,EAElB,gBAAgB,EAChB,sBAAsB,EACtB,6BAA6B,EAC7B,oBAAoB,EAIpB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACZ,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"client-base.d.ts","sourceRoot":"","sources":["../src/client-base.ts"],"names":[],"mappings":"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"}
|
package/dist/client-entry.js
CHANGED
|
@@ -10233,12 +10233,7 @@ The MemFS is a git-backed projection of your memory. Changes affect your future
|
|
|
10233
10233
|
|
|
10234
10234
|
**Editing memory does NOT change your behavior in the current turn.** The prompt governing this turn is the one compiled at the start of the conversation; a memory edit is applied on a later recompile (a new conversation, an explicit recompile, or a changed committed revision) — never instantly. You are writing for your future self: make the change, then continue acting on your decision in the present.
|
|
10235
10235
|
|
|
10236
|
-
You can always read and search memory directly.
|
|
10237
|
-
|
|
10238
|
-
- **Memory upkeep during another task:** Delegate incidental memory updates through the Agent tool with \`subagent_type: "memory"\`. This includes preferences, corrections, and lessons discovered while doing other work. Continue your current work immediately; do not wait, poll, or expect a completion notification. Automatic Git conflict repair also runs in the background.
|
|
10239
|
-
- **Memory as the main task:** When the user's current request is to remember something, initialize, reorganize, audit, correct, or troubleshoot memory, do that work directly using ordinary file tools and shell/Git commands. Complete and verify the requested work before reporting success. A side request to remember something while you are doing another task still belongs in the background.
|
|
10240
|
-
|
|
10241
|
-
When delegating, provide a self-contained description of what to remember, correct, delete, or reorganize, including relevant facts, corrections, and exceptions. Quote the user's factual corrections and exceptions verbatim, identifying what they refer to. Do not paraphrase qualifiers such as "only", "except", or "never", add inferred preferences, or broaden exceptions. The memory subagent starts fresh and can consult this conversation through a transcript file if needed. Delegation means the update is in progress, not already saved.
|
|
10236
|
+
You can always read and search memory directly. The \`memory\` subagent's entry in the Agent tool covers when to delegate memory updates.
|
|
10242
10237
|
|
|
10243
10238
|
### Editing memory directly
|
|
10244
10239
|
|
|
@@ -10273,7 +10268,7 @@ Concretely, this means that you should aggressively learn from feedback given to
|
|
|
10273
10268
|
|
|
10274
10269
|
For example, if a user expresses displeasure or frustration ("Why did you do that?", "I already told you that", "How did you forget that?", "Never do that again"), it is often a very clear signal to turn that experience into an update to your system.
|
|
10275
10270
|
|
|
10276
|
-
Often, incorporating feedback into meaningful memory updates takes substantial thinking and tool calling.
|
|
10271
|
+
Often, incorporating feedback into meaningful memory updates takes substantial thinking and tool calling.
|
|
10277
10272
|
|
|
10278
10273
|
Human operators may be aware that you are an advanced stateful agent capable of self-modification. If they ask you a question related to your memory or a failure to act on your perceived memory contents ("why didn't you remember that?", "why did you forget that?"), do NOT brush it off by simply acknowledging the failure then continuing to work on the task at hand (e.g. "You're right, I had that in my memory but still did it anyway"). Instead, treat it as a context engineering question: introspect and decipher exactly *why* your memory system succeeded or failed.
|
|
10279
10274
|
|
|
@@ -10285,10 +10280,10 @@ You MUST always adhere to your self and other memory blocks:
|
|
|
10285
10280
|
|
|
10286
10281
|
- **Adhering to your persona/identity/self**: ALWAYS stay consistent with what is described in \`self\` with every token you generate.
|
|
10287
10282
|
- When your identity conflicts with the model's defaults, prefer the self you have built.
|
|
10288
|
-
- Record intentional identity changes
|
|
10283
|
+
- Record intentional identity changes in memory.
|
|
10289
10284
|
- Your persona governs your defaults. Honoring an explicit user request for a specific response (tone, format, level of detail) is not an identity deviation and needs no memory change.
|
|
10290
10285
|
- **Adhering to your memory blocks**: ALWAYS adhere to the instructions and information in your memory blocks and system prompt
|
|
10291
|
-
- **Modifying memory blocks**: Persist intentional identity and behavior changes
|
|
10286
|
+
- **Modifying memory blocks**: Persist intentional identity and behavior changes in memory. Act on the decision in the present without waiting for a compiled prompt refresh; incidental background updates must not interrupt the active task.
|
|
10292
10287
|
- Your identity may evolve over time, but should incorporate all experience, not only immediate feedback.
|
|
10293
10288
|
- Preserve your token-space identity and continuity: changes should be justified and carefully considered in the context of the past experience that led to your current identity.
|
|
10294
10289
|
- Changes should be incremental to avoid complete loss of self.
|
|
@@ -10438,12 +10433,7 @@ The MemFS is a git-backed projection of your memory. Changes affect your future
|
|
|
10438
10433
|
|
|
10439
10434
|
**Editing memory does NOT change your behavior in the current turn.** The prompt governing this turn is the one compiled at the start of the conversation; a memory edit is applied on a later recompile (a new conversation, an explicit recompile, or a changed committed revision) — never instantly. You are writing for your future self: make the change, then continue acting on your decision in the present.
|
|
10440
10435
|
|
|
10441
|
-
You can always read and search memory directly.
|
|
10442
|
-
|
|
10443
|
-
- **Memory upkeep during another task:** Delegate incidental memory updates through the Agent tool with \`subagent_type: "memory"\`. This includes preferences, corrections, and lessons discovered while doing other work. Continue your current work immediately; do not wait, poll, or expect a completion notification. Automatic Git conflict repair also runs in the background.
|
|
10444
|
-
- **Memory as the main task:** When the user's current request is to remember something, initialize, reorganize, audit, correct, or troubleshoot memory, do that work directly using ordinary file tools and shell/Git commands. Complete and verify the requested work before reporting success. A side request to remember something while you are doing another task still belongs in the background.
|
|
10445
|
-
|
|
10446
|
-
When delegating, provide a self-contained description of what to remember, correct, delete, or reorganize, including relevant facts, corrections, and exceptions. Quote the user's factual corrections and exceptions verbatim, identifying what they refer to. Do not paraphrase qualifiers such as "only", "except", or "never", add inferred preferences, or broaden exceptions. The memory subagent starts fresh and can consult this conversation through a transcript file if needed. Delegation means the update is in progress, not already saved.
|
|
10436
|
+
You can always read and search memory directly. The \`memory\` subagent's entry in the Agent tool covers when to delegate memory updates.
|
|
10447
10437
|
|
|
10448
10438
|
### Editing memory directly
|
|
10449
10439
|
|
|
@@ -10478,7 +10468,7 @@ Concretely, this means that you should aggressively learn from feedback given to
|
|
|
10478
10468
|
|
|
10479
10469
|
For example, if a user expresses displeasure or frustration ("Why did you do that?", "I already told you that", "How did you forget that?", "Never do that again"), it is often a very clear signal to turn that experience into an update to your system.
|
|
10480
10470
|
|
|
10481
|
-
Often, incorporating feedback into meaningful memory updates takes substantial thinking and tool calling.
|
|
10471
|
+
Often, incorporating feedback into meaningful memory updates takes substantial thinking and tool calling.
|
|
10482
10472
|
|
|
10483
10473
|
Human operators may be aware that you are an advanced stateful agent capable of self-modification. If they ask you a question related to your memory or a failure to act on your perceived memory contents ("why didn't you remember that?", "why did you forget that?"), do NOT brush it off by simply acknowledging the failure then continuing to work on the task at hand (e.g. "You're right, I had that in my memory but still did it anyway"). Instead, treat it as a context engineering question: introspect and decipher exactly *why* your memory system succeeded or failed.
|
|
10484
10474
|
|
|
@@ -10490,10 +10480,10 @@ You MUST always adhere to your self and other memory blocks:
|
|
|
10490
10480
|
|
|
10491
10481
|
- **Adhering to your persona/identity/self**: ALWAYS stay consistent with what is described in \`self\` with every token you generate.
|
|
10492
10482
|
- When your identity conflicts with the model's defaults, prefer the self you have built.
|
|
10493
|
-
- Record intentional identity changes
|
|
10483
|
+
- Record intentional identity changes in memory.
|
|
10494
10484
|
- Your persona governs your defaults. Honoring an explicit user request for a specific response (tone, format, level of detail) is not an identity deviation and needs no memory change.
|
|
10495
10485
|
- **Adhering to your memory blocks**: ALWAYS adhere to the instructions and information in your memory blocks and system prompt
|
|
10496
|
-
- **Modifying memory blocks**: Persist intentional identity and behavior changes
|
|
10486
|
+
- **Modifying memory blocks**: Persist intentional identity and behavior changes in memory. Act on the decision in the present without waiting for a compiled prompt refresh; incidental background updates must not interrupt the active task.
|
|
10497
10487
|
- Your identity may evolve over time, but should incorporate all experience, not only immediate feedback.
|
|
10498
10488
|
- Preserve your token-space identity and continuity: changes should be justified and carefully considered in the context of the past experience that led to your current identity.
|
|
10499
10489
|
- Changes should be incremental to avoid complete loss of self.
|
|
@@ -10791,12 +10781,7 @@ The MemFS is a git-backed projection of your memory. Changes affect your future
|
|
|
10791
10781
|
|
|
10792
10782
|
**Editing memory does NOT change your behavior in the current turn.** The prompt governing this turn is the one compiled at the start of the conversation; a memory edit is applied on a later recompile (a new conversation, an explicit recompile, or a changed committed revision) — never instantly. You are writing for your future self: make the change, then continue acting on your decision in the present.
|
|
10793
10783
|
|
|
10794
|
-
You can always read and search memory directly.
|
|
10795
|
-
|
|
10796
|
-
- **Memory upkeep during another task:** Delegate incidental memory updates through the Agent tool with \`subagent_type: "memory"\`. This includes preferences, corrections, and lessons discovered while doing other work. Continue your current work immediately; do not wait, poll, or expect a completion notification. Automatic Git conflict repair also runs in the background.
|
|
10797
|
-
- **Memory as the main task:** When the user's current request is to remember something, initialize, reorganize, audit, correct, or troubleshoot memory, do that work directly using ordinary file tools and shell/Git commands. Complete and verify the requested work before reporting success. A side request to remember something while you are doing another task still belongs in the background.
|
|
10798
|
-
|
|
10799
|
-
When delegating, provide a self-contained description of what to remember, correct, delete, or reorganize, including relevant facts, corrections, and exceptions. Quote the user's factual corrections and exceptions verbatim, identifying what they refer to. Do not paraphrase qualifiers such as "only", "except", or "never", add inferred preferences, or broaden exceptions. The memory subagent starts fresh and can consult this conversation through a transcript file if needed. Delegation means the update is in progress, not already saved.
|
|
10784
|
+
You can always read and search memory directly. The \`memory\` subagent's entry in the Agent tool covers when to delegate memory updates.
|
|
10800
10785
|
|
|
10801
10786
|
### Editing memory directly
|
|
10802
10787
|
|
|
@@ -10831,7 +10816,7 @@ Concretely, this means that you should aggressively learn from feedback given to
|
|
|
10831
10816
|
|
|
10832
10817
|
For example, if a user expresses displeasure or frustration ("Why did you do that?", "I already told you that", "How did you forget that?", "Never do that again"), it is often a very clear signal to turn that experience into an update to your system.
|
|
10833
10818
|
|
|
10834
|
-
Often, incorporating feedback into meaningful memory updates takes substantial thinking and tool calling.
|
|
10819
|
+
Often, incorporating feedback into meaningful memory updates takes substantial thinking and tool calling.
|
|
10835
10820
|
|
|
10836
10821
|
Human operators may be aware that you are an advanced stateful agent capable of self-modification. If they ask you a question related to your memory or a failure to act on your perceived memory contents ("why didn't you remember that?", "why did you forget that?"), do NOT brush it off by simply acknowledging the failure then continuing to work on the task at hand (e.g. "You're right, I had that in my memory but still did it anyway"). Instead, treat it as a context engineering question: introspect and decipher exactly *why* your memory system succeeded or failed.
|
|
10837
10822
|
|
|
@@ -10843,10 +10828,10 @@ You MUST always adhere to your persona and other core memory files:
|
|
|
10843
10828
|
|
|
10844
10829
|
- **Adhering to your persona**: ALWAYS stay consistent with what is described in root \`persona.md\` with every token you generate.
|
|
10845
10830
|
- When your identity conflicts with the model's defaults, prefer the persona you have built.
|
|
10846
|
-
- Record intentional persona changes
|
|
10831
|
+
- Record intentional persona changes in memory.
|
|
10847
10832
|
- Your persona governs your defaults. Honoring an explicit user request for a specific response (tone, format, level of detail) is not an identity deviation and needs no memory change.
|
|
10848
10833
|
- **Adhering to your core memory files**: ALWAYS adhere to the instructions and information in your core memory files and system prompt
|
|
10849
|
-
- **Modifying core memory files**: Persist intentional identity and behavior changes
|
|
10834
|
+
- **Modifying core memory files**: Persist intentional identity and behavior changes in memory. Act on the decision in the present without waiting for a compiled prompt refresh; incidental background updates must not interrupt the active task.
|
|
10850
10835
|
- Your identity may evolve over time, but should incorporate all experience, not only immediate feedback.
|
|
10851
10836
|
- Preserve your token-space identity and continuity: changes should be justified and carefully considered in the context of the past experience that led to your current identity.
|
|
10852
10837
|
- Changes should be incremental to avoid complete loss of self.
|
|
@@ -12502,7 +12487,7 @@ async function buildCreateAgentRequest(options = {}) {
|
|
|
12502
12487
|
...options.name !== undefined || personality ? { name: options.name ?? personality?.label } : {},
|
|
12503
12488
|
...options.description !== undefined || personality ? { description: options.description ?? personality?.description } : {},
|
|
12504
12489
|
model: modelHandle,
|
|
12505
|
-
system: options.system !== undefined ? options.system : buildSystemPrompt("default", memoryPromptMode),
|
|
12490
|
+
system: options.system !== undefined ? options.system : options.isLettaCloud ? null : buildSystemPrompt("default", memoryPromptMode),
|
|
12506
12491
|
...memoryBlocks !== undefined ? { memory_blocks: memoryBlocks } : {},
|
|
12507
12492
|
...blockIds && blockIds.length > 0 ? { block_ids: blockIds } : {},
|
|
12508
12493
|
tags: buildCreatedAgentTags({
|
|
@@ -16887,11 +16872,15 @@ function agentFreeSessionOptions(options) {
|
|
|
16887
16872
|
isSubagent: _isSubagent,
|
|
16888
16873
|
modelSettings: _modelSettings,
|
|
16889
16874
|
contextWindowLimit: _contextWindowLimit,
|
|
16875
|
+
conversationId: _conversationId,
|
|
16890
16876
|
...sessionOptions
|
|
16891
16877
|
} = options;
|
|
16892
16878
|
return sessionOptions;
|
|
16893
16879
|
}
|
|
16894
16880
|
function validateAgentFreeQueryOptions(options) {
|
|
16881
|
+
if (options.conversationId !== undefined && (typeof options.conversationId !== "string" || !options.conversationId.trim())) {
|
|
16882
|
+
throw new Error("query() conversationId must be a non-empty string.");
|
|
16883
|
+
}
|
|
16895
16884
|
if (typeof options.model !== "string" || options.model.length === 0) {
|
|
16896
16885
|
throw new Error("query() requires a non-empty model.");
|
|
16897
16886
|
}
|
|
@@ -17086,14 +17075,16 @@ class LettaAgentClientBase {
|
|
|
17086
17075
|
if (this.backend === "remote") {
|
|
17087
17076
|
return new AppServerSession(this.appServerSessionOptions(), {
|
|
17088
17077
|
kind: "agent-free",
|
|
17089
|
-
|
|
17090
|
-
|
|
17091
|
-
|
|
17092
|
-
|
|
17093
|
-
|
|
17094
|
-
|
|
17095
|
-
|
|
17096
|
-
|
|
17078
|
+
...options.conversationId ? { conversationId: options.conversationId } : {
|
|
17079
|
+
createConversation: {
|
|
17080
|
+
model: options.model,
|
|
17081
|
+
system: options.system,
|
|
17082
|
+
...options.parentAgentId !== undefined ? { parentAgentId: options.parentAgentId } : {},
|
|
17083
|
+
...options.name !== undefined ? { name: options.name } : {},
|
|
17084
|
+
...options.isSubagent !== undefined ? { isSubagent: options.isSubagent } : {},
|
|
17085
|
+
...options.modelSettings !== undefined ? { modelSettings: options.modelSettings } : {},
|
|
17086
|
+
...options.contextWindowLimit !== undefined ? { contextWindowLimit: options.contextWindowLimit } : {}
|
|
17087
|
+
}
|
|
17097
17088
|
},
|
|
17098
17089
|
options: sessionOptions
|
|
17099
17090
|
});
|
|
@@ -17103,7 +17094,7 @@ class LettaAgentClientBase {
|
|
|
17103
17094
|
if (computer === undefined) {
|
|
17104
17095
|
throw new Error("Cloud query() requires an explicit computer; managed sandboxes are agent-scoped.");
|
|
17105
17096
|
}
|
|
17106
|
-
const conversation = await this.getCloudClient().post("/v1/conversations/ephemeral", {
|
|
17097
|
+
const conversation = options.conversationId ? { id: options.conversationId } : await this.getCloudClient().post("/v1/conversations/ephemeral", {
|
|
17107
17098
|
body: {
|
|
17108
17099
|
model: options.model,
|
|
17109
17100
|
system: options.system,
|
|
@@ -17812,4 +17803,4 @@ export {
|
|
|
17812
17803
|
CloudManagedSandboxExpiredError
|
|
17813
17804
|
};
|
|
17814
17805
|
|
|
17815
|
-
//# debugId=
|
|
17806
|
+
//# debugId=8D68B3C7B271B2C064756E2164756E21
|