feat: replace prompt with query API - #264
Merged
sarahwooders merged 3 commits intoAug 10, 2026
Merged
Conversation
Align one-shot and streaming calls with the Claude Agent SDK shape while preserving Letta agent identity when supplied and creating hidden stateless workers otherwise. See [trace](https://app.letta.com/chat/agent-57231da8-42f3-4523-b190-66c3eda21057?conversation=conv-ef0008da-f395-4fe3-960f-4ee31ea3c3fb). Resume conversation with `letta --conv conv-ef0008da-f395-4fe3-960f-4ee31ea3c3fb` 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
sarahwooders
marked this pull request as ready for review
August 10, 2026 20:53
Expose familiar query lifecycle controls and consume async prompts concurrently so callers can inject work while a turn is active. Keep model-selected queries stateless by requiring persistent-agent calls to use the agent configuration unchanged. See [trace](https://app.letta.com/chat/agent-57231da8-42f3-4523-b190-66c3eda21057?conversation=conv-50816367-009e-4137-b7b2-c4fc55674cb9). Resume conversation with `letta --conv conv-50816367-009e-4137-b7b2-c4fc55674cb9` 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
Allow model selection when querying an existing agent because the new conversation owns the override, and simplify the public documentation around query behavior. See [trace](https://app.letta.com/chat/agent-57231da8-42f3-4523-b190-66c3eda21057?conversation=conv-50816367-009e-4137-b7b2-c4fc55674cb9). Resume conversation with `letta --conv conv-50816367-009e-4137-b7b2-c4fc55674cb9` 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
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
prompt()with a Claude Agent SDK-shapedquery({ prompt, options })async message streamagentId; existing agents receive a fresh conversation, while omitted IDs create a hidden non-MemFS agent and force stateless executionAsyncIterable<SendMessage>for multi-turn queries and close the underlying session when iteration completes or stopsTest plan
bun run checkbun testbun run buildagentIdreturnedQUERY_OKfrom a hidden stateless agent👾 Generated with Letta Code