@letta-ai/letta-agent-sdk 0.5.0 → 0.5.2

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 (52) hide show
  1. package/AGENTS.md +35 -0
  2. package/README.md +22 -10
  3. package/dist/agent-repositories.d.ts +15 -0
  4. package/dist/agent-repositories.d.ts.map +1 -0
  5. package/dist/app-server-management.d.ts +10 -7
  6. package/dist/app-server-management.d.ts.map +1 -1
  7. package/dist/app-server-models.d.ts +4 -0
  8. package/dist/app-server-models.d.ts.map +1 -0
  9. package/dist/app-server-session.d.ts +3 -3
  10. package/dist/app-server-session.d.ts.map +1 -1
  11. package/dist/client-base.d.ts +5 -0
  12. package/dist/client-base.d.ts.map +1 -1
  13. package/dist/client-entry.js +3386 -639
  14. package/dist/client-entry.js.map +85 -13
  15. package/dist/cloud-client.d.ts +7 -0
  16. package/dist/cloud-client.d.ts.map +1 -0
  17. package/dist/cloud-management.d.ts +21 -18
  18. package/dist/cloud-management.d.ts.map +1 -1
  19. package/dist/cloud-session.d.ts +7 -5
  20. package/dist/cloud-session.d.ts.map +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +3400 -653
  24. package/dist/index.js.map +86 -14
  25. package/dist/management-types.d.ts +85 -64
  26. package/dist/management-types.d.ts.map +1 -1
  27. package/dist/management.d.ts +11 -9
  28. package/dist/management.d.ts.map +1 -1
  29. package/dist/remote-session-protocol.d.ts +1 -1
  30. package/dist/remote-session-protocol.d.ts.map +1 -1
  31. package/dist/remote.d.ts +4 -5
  32. package/dist/remote.d.ts.map +1 -1
  33. package/dist/repositories.d.ts +3 -2
  34. package/dist/repositories.d.ts.map +1 -1
  35. package/dist/types.d.ts +22 -34
  36. package/dist/types.d.ts.map +1 -1
  37. package/package.json +3 -2
  38. package/src/agent-repositories.ts +159 -0
  39. package/src/app-server-management.ts +56 -116
  40. package/src/app-server-models.ts +20 -0
  41. package/src/app-server-session.ts +71 -146
  42. package/src/client-base.ts +72 -20
  43. package/src/cloud-client.ts +46 -0
  44. package/src/cloud-management.ts +128 -275
  45. package/src/cloud-session.ts +168 -267
  46. package/src/index.ts +6 -0
  47. package/src/management-types.ts +107 -64
  48. package/src/management.ts +46 -39
  49. package/src/remote-session-protocol.ts +6 -2
  50. package/src/remote.ts +18 -63
  51. package/src/repositories.ts +26 -99
  52. package/src/types.ts +22 -35
package/AGENTS.md CHANGED
@@ -33,6 +33,41 @@ the selected transport adapter.
33
33
  Those methods operate at different layers and should not be combined merely
34
34
  because they share a name.
35
35
 
36
+ ## Cloud API ownership
37
+
38
+ - `@letta-ai/letta-code` owns the agent harness, app-server protocol, runtime
39
+ lifecycle, and tool execution boundary.
40
+ - `@letta-ai/letta-client` owns Letta API HTTP contracts, authentication,
41
+ headers, retries, pagination, and API errors. Declare it as a direct
42
+ dependency when importing it; do not rely on Letta Code's transitive copy.
43
+ - Before adding a Cloud REST call, inspect the installed generated client. Use
44
+ the generated resource method when it covers the endpoint.
45
+ - When an endpoint is not generated yet, use the shared Letta client's typed
46
+ `get`/`post`/`patch`/`delete` method and validate the ungenerated response at
47
+ that boundary. Do not add raw `fetch`, URL/auth/header helpers, response
48
+ parsers, retry loops, or parallel HTTP error types.
49
+ - `LettaAgentClientBase` owns one lazy Cloud client and injects it into
50
+ management, repository, environment, and session code. New Cloud REST
51
+ surfaces should reuse that instance. WebSocket transport remains separate.
52
+ - Keep the public management types portable across Cloud and app-server
53
+ backends. Generated Cloud types belong at the Cloud transport seam; do not
54
+ narrow the shared facade to shapes that the app-server protocol cannot
55
+ promise.
56
+ - Reuse generated Letta entity, request, and response types whenever the SDK
57
+ contract has the same semantics. Camel-case SDK facades may rename fields,
58
+ but their value types should derive from the generated params. Do not mirror
59
+ generated entities as partial `Record<string, unknown>` shapes or rewrite
60
+ app-server envelopes already exported by `app-server-protocol`.
61
+ - Verify generated route paths against the live API before introducing or
62
+ preserving a generic-request exception. Server routing evolves: a mismatch
63
+ proven in an older PR may no longer exist. Prefer the generated resource as
64
+ soon as its live route works, and delete the workaround rather than
65
+ fossilizing it in new architecture.
66
+
67
+ After changing this boundary, run `bun run check`, `bun test`, and
68
+ `bun run build`. If path behavior changed, run the narrow live route test too;
69
+ do not infer POST/DELETE slash behavior from a successful GET.
70
+
36
71
  ## Change discipline
37
72
 
38
73
  - Keep transport parsing out of the session facade.
package/README.md CHANGED
@@ -44,12 +44,6 @@ for await (const message of session.stream()) {
44
44
  }
45
45
  ```
46
46
 
47
- Assistant and reasoning messages are incremental text fragments. Reconcile
48
- fragments by `type` and `otid` when `otid` is available; `uuid` is a legacy
49
- transport identifier and is not a portable lineage key. After reconnecting,
50
- use `(runId, seqId)` to suppress replayed fragments. Sequence IDs are scoped to
51
- their run and must not be compared across runs.
52
-
53
47
  An agent is the persistent entity with memory. A conversation is a thread on that agent. A session is the active connection used to send messages, stream events, execute tools, and handle approvals.
54
48
 
55
49
  - `createSession(agentId)` starts a new conversation.
@@ -86,7 +80,8 @@ approvals when a mobile or web client returns to the foreground:
86
80
  ```ts
87
81
  const status = await session.getDeviceStatus();
88
82
  // status.permissionMode, status.workingDirectory, status.isOnline,
89
- // status.isProcessing, status.pendingControlRequests, status.raw
83
+ // status.isProcessing, status.memoryDirectory,
84
+ // status.pendingControlRequests, status.raw
90
85
 
91
86
  const unsubscribe = session.onDeviceStatus((status) => {
92
87
  // Called for every device-status update pushed by the runtime.
@@ -180,16 +175,33 @@ const conversations = await client.conversations.list({
180
175
  // No open session required — safe for model pickers and settings screens.
181
176
  const { entries: models, availableHandles } = await client.models.list();
182
177
 
183
- await client.agents.delete(agents[0].id);
184
-
185
178
  const repository = await client.repositories.create({ name: "inputs" });
186
179
  await client.repositories.files.create(repository.id, {
187
180
  path: "brief.md",
188
181
  content: "# Project brief\n",
189
182
  });
183
+
184
+ // Persistent agent knowledge: attach once during provisioning. This
185
+ // recompiles the agent's default conversation after the relationship is
186
+ // visible, and session.close() will not detach it.
187
+ await client.agents.repositories.attach(agents[0].id, repository.id, {
188
+ permissions: "read",
189
+ });
190
+
191
+ // Remove persistent knowledge explicitly during deprovisioning.
192
+ await client.agents.repositories.detach(agents[0].id, repository.id);
193
+ await client.agents.delete(agents[0].id);
190
194
  ```
191
195
 
192
- `client.repositories` is available on the `cloud` backend. See [Cloud repositories](https://docs.letta.com/letta-agent-sdk/repositories) for file operations, version history, and session resources.
196
+ `client.repositories` and `client.agents.repositories` are available on the
197
+ `cloud` backend. Persistent agent relationships belong under
198
+ `client.agents.repositories`; use session `resources` only when the session
199
+ should own attachment and cleanup. Attach and detach recompile the agent's
200
+ default conversation by default; pass `{ recompile: false }` only when the
201
+ caller will handle prompt recompilation separately. Existing explicit
202
+ conversations are not silently recompiled. If recompilation fails after a
203
+ successful relationship mutation, the method rejects but the attachment state
204
+ remains changed; retrying is safe. See [Cloud repositories](https://docs.letta.com/letta-agent-sdk/repositories) for file operations, version history, and session resources.
193
205
 
194
206
  ## Documentation
195
207
 
@@ -0,0 +1,15 @@
1
+ import type { AgentRepositoriesClient, AgentRepository, AgentRepositoryPermissions } from "./management-types.js";
2
+ export interface AgentRepositoriesTransport {
3
+ listAgentRepositories(agentId: string): Promise<AgentRepository[]>;
4
+ attachAgentRepository(agentId: string, repositoryId: string, permissions: AgentRepositoryPermissions | undefined): Promise<AgentRepository>;
5
+ detachAgentRepository(agentId: string, repositoryId: string): Promise<void>;
6
+ recompileAgentSystemPrompt(agentId: string): Promise<void>;
7
+ }
8
+ type TransportProvider = () => AgentRepositoriesTransport;
9
+ type VisibilityOptions = {
10
+ timeoutMs?: number;
11
+ pollIntervalMs?: number;
12
+ };
13
+ export declare function createAgentRepositoriesClient(transportProvider: TransportProvider, visibilityOptions?: VisibilityOptions): AgentRepositoriesClient;
14
+ export {};
15
+ //# sourceMappingURL=agent-repositories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-repositories.d.ts","sourceRoot":"","sources":["../src/agent-repositories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,eAAe,EAIf,0BAA0B,EAC3B,MAAM,uBAAuB,CAAC;AAK/B,MAAM,WAAW,0BAA0B;IACzC,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IACnE,qBAAqB,CACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,0BAA0B,GAAG,SAAS,GAClD,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5B,qBAAqB,CACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D;AAED,KAAK,iBAAiB,GAAG,MAAM,0BAA0B,CAAC;AAE1D,KAAK,iBAAiB,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAmEF,wBAAgB,6BAA6B,CAC3C,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,GAAE,iBAAsB,GACxC,uBAAuB,CAyDzB"}
@@ -1,4 +1,7 @@
1
- import type { ManagementQuery, ManagementTransport } from "./management.js";
1
+ import type { AgentListParams, AgentUpdateParams } from "@letta-ai/letta-client/resources/agents/agents";
2
+ import type { ConversationCreateParams, ConversationListParams, ConversationUpdateParams } from "@letta-ai/letta-client/resources/conversations/conversations";
3
+ import type { MessageListParams } from "@letta-ai/letta-client/resources/conversations/messages";
4
+ import type { ManagementTransport } from "./management.js";
2
5
  import type { ConversationMessagesResult, LettaAgent, LettaConversation } from "./management-types.js";
3
6
  import type { LettaCodeRemoteClientOptions, ListModelsResult } from "./types.js";
4
7
  type OwnedConnection = {
@@ -21,16 +24,16 @@ export declare class AppServerManagementTransport implements ManagementTransport
21
24
  private connectionPromise;
22
25
  private closingConnections;
23
26
  constructor(options: AppServerManagementOptions);
24
- listAgents(query: ManagementQuery): Promise<LettaAgent[]>;
27
+ listAgents(query: AgentListParams): Promise<LettaAgent[]>;
25
28
  retrieveAgent(agentId: string): Promise<LettaAgent>;
26
- updateAgent(agentId: string, body: Record<string, unknown>): Promise<LettaAgent>;
29
+ updateAgent(agentId: string, body: AgentUpdateParams): Promise<LettaAgent>;
27
30
  deleteAgent(agentId: string): Promise<void>;
28
31
  listModels(): Promise<ListModelsResult>;
29
- listConversations(query: ManagementQuery): Promise<LettaConversation[]>;
32
+ listConversations(query: ConversationListParams): Promise<LettaConversation[]>;
30
33
  retrieveConversation(conversationId: string): Promise<LettaConversation>;
31
- createConversation(body: Record<string, unknown>): Promise<LettaConversation>;
32
- updateConversation(conversationId: string, body: Record<string, unknown>): Promise<LettaConversation>;
33
- listConversationMessages(conversationId: string, query: ManagementQuery): Promise<ConversationMessagesResult>;
34
+ createConversation(body: ConversationCreateParams): Promise<LettaConversation>;
35
+ updateConversation(conversationId: string, body: ConversationUpdateParams): Promise<LettaConversation>;
36
+ listConversationMessages(conversationId: string, query: MessageListParams): Promise<ConversationMessagesResult>;
34
37
  private request;
35
38
  private acquireConnection;
36
39
  private openConnection;
@@ -1 +1 @@
1
- {"version":3,"file":"app-server-management.d.ts","sourceRoot":"","sources":["../src/app-server-management.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EACV,0BAA0B,EAC1B,UAAU,EACV,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAEV,4BAA4B,EAC5B,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB,KAAK,eAAe,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,IAAI,IAAI,CAAA;CAAE,CAAC;AAkCtD,MAAM,MAAM,0BAA0B,GACpC,OAAO,CAAC,4BAA4B,CA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,UAAU,CAAC;IAahB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAW3C,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAWvC,iBAAiB,CACrB,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAYzB,oBAAoB,CACxB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,iBAAiB,CAAC;IAavB,kBAAkB,CACtB,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,iBAAiB,CAAC;IAavB,kBAAkB,CACtB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,iBAAiB,CAAC;IAavB,wBAAwB,CAC5B,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,0BAA0B,CAAC;YAgBxB,OAAO;IA4BrB,OAAO,CAAC,iBAAiB;YAsBX,cAAc;IA+C5B,OAAO,CAAC,iBAAiB;IAUzB,OAAO,CAAC,sBAAsB;CAW/B"}
@@ -0,0 +1,4 @@
1
+ import type { ListModelsResponseMessage } from "@letta-ai/letta-code/app-server-protocol";
2
+ import type { ListModelsResult } from "./types.js";
3
+ export declare function normalizeAppServerModels(response: ListModelsResponseMessage): ListModelsResult;
4
+ //# sourceMappingURL=app-server-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-server-models.d.ts","sourceRoot":"","sources":["../src/app-server-models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,yBAAyB,GAClC,gBAAgB,CAclB"}
@@ -5,7 +5,7 @@ type UpdateModelPayload = {
5
5
  model_id?: string;
6
6
  model_handle?: string;
7
7
  };
8
- export declare function agentToolNames(agent: Record<string, unknown> | null | undefined): string[] | undefined;
8
+ export declare function agentToolNames(agent: object | null | undefined): string[] | undefined;
9
9
  export type AppServerSessionOptions = Partial<LettaCodeRemoteClientOptions> & {
10
10
  /** Base websocket URL. */
11
11
  url?: string;
@@ -52,10 +52,10 @@ export declare class AppServerRuntimeController implements RemoteClientRuntimeCo
52
52
  send(command: Record<string, unknown>): void;
53
53
  sendTurnMessage(runtime: RuntimeScope, message: SendMessage, options: RuntimeSendTurnOptions): void;
54
54
  abort(runtime: RuntimeScope): Promise<void>;
55
- request(type: string, body: Record<string, unknown>, options?: {
55
+ request<TResponse extends ProtocolMessage = ProtocolMessage>(type: string, body: Record<string, unknown>, options?: {
56
56
  timeoutMs?: number;
57
57
  predicate?: (message: ProtocolMessage) => boolean;
58
- }): Promise<ProtocolMessage>;
58
+ }): Promise<TResponse>;
59
59
  listModels(): Promise<ListModelsResult>;
60
60
  updateModel(runtime: RuntimeScope, payload: UpdateModelPayload): Promise<UpdateModelResult>;
61
61
  recoverPendingApprovals(runtime: RuntimeScope, options?: RecoverPendingApprovalsOptions): Promise<RecoverPendingApprovalsResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"app-server-session.d.ts","sourceRoot":"","sources":["../src/app-server-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,gCAAgC,EAEtC,MAAM,wCAAwC,CAAC;AAahD,OAAO,EACL,uBAAuB,EAKvB,KAAK,eAAe,EACpB,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,4BAA4B,EAC5B,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAElB,8BAA8B,EAC9B,6BAA6B,EAC7B,WAAW,EACX,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IAAI;CAGd;AAED,qBAAa,gBAAiB,SAAQ,uBAAuB;IAOzD,OAAO,CAAC,QAAQ,CAAC,aAAa;IANhC,OAAO,CAAC,eAAe,CAAkC;IACzD,OAAO,CAAC,aAAa,CAAmC;IACxD,OAAO,CAAC,yBAAyB,CAA6B;IAC9D,OAAO,CAAC,2BAA2B,CAA6B;gBAG7C,aAAa,EAAE,uBAAuB,EACvD,IAAI,EAAE,oBAAoB;cAYT,iBAAiB,CAAC,OAAO,EAAE,6BAA6B,GAAG,kBAAkB,GAAG,OAAO;cAKjF,2BAA2B,IAAI,OAAO,CAAC,kBAAkB,CAAC;cA0DhE,WAAW,IAAI,IAAI;YASxB,mBAAmB;YAenB,YAAY;YAOZ,wBAAwB;YAiExB,0BAA0B;CAqBzC"}
@@ -20,6 +20,8 @@ export declare class LettaAgentClientBase {
20
20
  readonly models: ModelsClient;
21
21
  protected readonly options: LettaCodeClientOptions;
22
22
  private repositoriesClient;
23
+ private agentRepositoriesClient;
24
+ private cloudClient;
23
25
  private managementTransport;
24
26
  constructor(options?: LettaCodeClientOptions);
25
27
  /**
@@ -54,6 +56,9 @@ export declare class LettaAgentClientBase {
54
56
  private remoteOptions;
55
57
  private appServerSessionOptions;
56
58
  private getRepositoriesClient;
59
+ private getAgentRepositoriesClient;
60
+ private getCloudManagementTransport;
61
+ private getCloudClient;
57
62
  private getManagementTransport;
58
63
  private cloudOptions;
59
64
  }
@@ -1 +1 @@
1
- {"version":3,"file":"client-base.d.ts","sourceRoot":"","sources":["../src/client-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAavD,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,kBAAkB,EAElB,gBAAgB,EAChB,sBAAsB,EACtB,6BAA6B,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