feat: add memfs option to SDK session/agent options#36
Open
feat: add memfs option to SDK session/agent options#36
Conversation
Enables SDK users to toggle memory filesystem (git-backed persistent memory) via `memfs: true/false` on createSession, resumeSession, and createAgent. Also surfaces `memfsEnabled` on the init message so callers can confirm the state. Written by Cameron and Letta Code "Memory is the diary that we all carry about with us." -- Oscar Wilde
The Letta API emits approval_request_message (not tool_call_message) for tools that go through the approval flow. These were being dropped by transformMessage(), so SDK consumers never saw tool_call events for approved tools like memory_rethink, Bash, Edit, etc. Written by Cameron and Letta Code "The beginning of wisdom is the definition of terms." -- Socrates
This reverts commit b6d181a.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
memfs?: booleanoption toCreateSessionOptions,CreateAgentOptions, andInternalSessionOptions--memfs/--no-memfsflags to the CLI subprocess intransport.tsmemfsEnabled?: booleanonSDKInitMessageso callers can confirm the statememfs_enabledin the headless init message)Usage
Test plan
tsc --noEmitpasses (confirmed locally)memfs: truewith a Letta Cloud agent -- session should initialize with memfs enabledmemfs: falsedisables memfsmemfsEnabledis returned on init message (requires companion letta-code PR)memfsoption leaves state unchangedWritten by Cameron and Letta Code
"Memory is the diary that we all carry about with us." -- Oscar Wilde