Commit Graph

6838 Commits

Author SHA1 Message Date
cthomas
1d360cc239 feat: dump thread state on event loop hang (#8388) 2026-01-12 10:57:48 -08:00
cthomas
a775bbfdf2 feat: offload llama index init logic (#8387) 2026-01-12 10:57:48 -08:00
Shubham Naik
6e64b59d8a chore: add scheduled message api to docs (#8348)
* chore: add scheudled message api o dogs

* chore: udpate api

* chore: clarification

* chore: clarification

* chore: clarification

* chore: next
2026-01-12 10:57:48 -08:00
jnjpng
4cb037f28e fix: async decrypt environment variable on create agent (#8367)
* base

* comment
2026-01-12 10:57:48 -08:00
jnjpng
d55fd69b7b chore: add comment and test for changing PBKDF2 iteration count (#8366)
base
2026-01-12 10:57:48 -08:00
jnjpng
b68e4e74f9 fix: replace cryptography with hashlib for encryption key derivation (#8364)
base
2026-01-12 10:57:48 -08:00
cthomas
cc975b5d15 fix: reuse db session when loading pending approval (#8363) 2026-01-12 10:57:48 -08:00
cthomas
9b359418d0 feat: add pending approval field on agent state (#8361)
* feat: add pending approval field on agent state

* test failures
2026-01-12 10:57:48 -08:00
Ari Webb
956e7783ad feat: add ids to archival memory search [LET-6642] (#8355)
* feat: add id to archival memory search tool

* stage api
2026-01-12 10:57:48 -08:00
jnjpng
4ee267a57c chore: add warning logs for sync model validate fallback for agent environment variables (#8362)
base
2026-01-12 10:57:48 -08:00
cthomas
f87c607115 fix: add encrypted placeholder constant (#8354) 2026-01-12 10:57:48 -08:00
Shubham Naik
a40bacd9c6 feat: add /v1/metadata/user [LET-6845] (#8349)
* feat: add /v1/metadata/user

* feat: add /v1/metadata/user

* chore: udpate style

* chore: udpate style

* chore: rebuild
2026-01-12 10:57:48 -08:00
cthomas
5857b97c7f fix: unbound local variable (#8346) 2026-01-12 10:57:48 -08:00
cthomas
3a5ace33b6 fix: nonetype not subscriptable (#8345) 2026-01-12 10:57:48 -08:00
cthomas
51a68d1250 feat: move more decrypt callsites outside db session (#8342) 2026-01-12 10:57:48 -08:00
jnjpng
ccfd3d1432 fix: asyncify encrypt on write (#8339)
* base

* update

* import
2026-01-12 10:57:48 -08:00
Shubham Naik
350436c0cc Shub/let 6820 add the migrator between legacy project to default project [LET-6820] (#8300)
* chore

* chore; udpate secrets

* chore: remove sleeptime templates

* chore: remove sleeptime templates

* Update apps/web/src/lib/client/components/ADEPage/ADEHeader/ADEHeader.tsx

Co-authored-by: datadog-official[bot] <214633350+datadog-official[bot]@users.noreply.github.com>

* Update apps/web/src/lib/client/components/ADEPage/ADEHeader/LegacyMigrationModal/LegacyMigrationModal.tsx

Co-authored-by: datadog-official[bot] <214633350+datadog-official[bot]@users.noreply.github.com>

---------

Co-authored-by: datadog-official[bot] <214633350+datadog-official[bot]@users.noreply.github.com>
2026-01-12 10:57:48 -08:00
cthomas
a54513c343 feat: move decryption outside db session (#8323)
* feat: move decryption outside db session

* fix pydantic error
2026-01-12 10:57:48 -08:00
cthomas
485fe9d1b2 fix: set task name earlier for logging (#8333) 2026-01-12 10:57:48 -08:00
Sarah Wooders
02700cdae2 fix: add byok handle testing (#8331)
* fix: patch byok agent creation

* match original logic

* fix: add testing for byok handle
2026-01-12 10:57:48 -08:00
Sarah Wooders
bca99c3bbf fix: patch byok agent creation (#8329)
* fix: patch byok agent creation

* match original logic
2026-01-12 10:57:48 -08:00
cthomas
8da7a08861 feat: add more granular logging for event loop (#8318) 2026-01-12 10:57:48 -08:00
jnjpng
febe6efaac fix: allow upserting empty secret object to delete agent secrets (#8316)
base
2026-01-12 10:57:48 -08:00
Sarah Wooders
4e1473c6dc fix: patch sleeptime agent (#8315) 2026-01-12 10:57:48 -08:00
Sarah Wooders
18a1a16bf4 Revert "feat: add message_types filter to list messages endpoint" (#8314)
Revert "feat: add message_types filter to list messages endpoint (#8280)"

This reverts commit e7ac5df721ec4b3e663dd30239f590ee16bb8630.
2026-01-12 10:57:48 -08:00
Ari Webb
02f3e3f3b9 fix: fix providers and models persistence (#8302) 2026-01-12 10:57:48 -08:00
jnjpng
e56c5c5b49 fix: global sandbox environment variables not injected on tool execution (#8310)
* base

* test
2026-01-12 10:57:48 -08:00
Charles Packer
e57adc0a6e chore: mark agent.messages.stream endpoint as deprecated (#8227) 2026-01-12 10:57:48 -08:00
Cameron
7c44375cce feat: add message_types filter to list messages endpoint (#8280)
* feat: add message_types filter to list messages endpoint

Add the ability to filter messages by type when listing message history
via GET /v1/agents/{agent_id}/messages. This brings parity with the
create message endpoint which already supports include_return_message_types.

Changes:
- Add message_types query parameter to list_messages endpoint in agents.py
- Add message_types parameter to get_agent_recall_async in server.py
- Filter messages by message_type after LettaMessage conversion
- Add test for message_types filtering

Closes #8277

Written by Cameron ◯ Letta Code

> "Simplicity is the ultimate sophistication." - Leonardo da Vinci

🐙 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* chore: regenerate OpenAPI spec and SDK for message_types filter

🐧 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

Written by Cameron ◯ Letta Code

"The only way to do great work is to love what you do." - Steve Jobs

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-12 10:57:48 -08:00
Sarah Wooders
87d920782f feat: add conversation and conversation_messages tables for concurrent messaging (#8182) 2026-01-12 10:57:48 -08:00
cthomas
c66b852978 feat: add more data to event loop logging (#8299) 2026-01-12 10:57:48 -08:00
cthomas
1b25154c39 fix: unbounded gather for agents listing (#8297)
* fix: unbounded gather for agents listing

* more callsites
2026-01-12 10:57:48 -08:00
cthomas
3aaab90b4c feat: use bounded concurrency for decryption (#8296) 2026-01-12 10:57:48 -08:00
cthomas
3b0b2cbee1 fix: unbounded file to pydantic conversion (#8292)
* fix: unbounded file to pydantic conversion

* remove var name
2026-01-12 10:57:48 -08:00
Shubham Naik
6e0bf69ed8 feat: pipelines backend (#8218)
* chore: next

* chore: next

* chore: next

* chore: next

* chore: next

* chore: next

* chore: next

* chore: next

* chore: next

* chore: next

* chore: next

* chore: next

* chore: next

* chore; udpate secrets
2026-01-12 10:57:48 -08:00
cthomas
cfde955313 feat: prevent unbounded file queries (#8285) 2026-01-12 10:57:48 -08:00
cthomas
c73a9579a4 feat: yield to event loop in file bulk operation (#8281) 2026-01-12 10:57:48 -08:00
Ari Webb
cc825b4f5c Revert "Revert "feat: enable provider models persistence" (#6590)" (#6595) 2026-01-12 10:57:48 -08:00
Charles Packer
64a1a8b14e feat: expose agent_id to the messages search api endpoint (#8252) 2026-01-12 10:57:48 -08:00
Sarah Wooders
2d84af11c3 fix: override with client-side tools is overlapping (#8232) 2026-01-12 10:57:48 -08:00
Charles Packer
3cdee2e78f fix: include client_tools in streaming requires_approval_tools (#8230)
When streaming, the LLM adapter needs to know which tools require
approval so it can emit ApprovalRequestMessage instead of ToolCallMessage.
Client-side tools were being passed to the agent but not included in
the requires_approval_tools list passed to the streaming interface.

This caused the streaming interface to emit tool_call_message for
client tools, but the stop_reason was still requires_approval,
resulting in empty approvals arrays on the client side.

🤖 Generated with [Letta Code](https://letta.com)

Co-authored-by: Letta <noreply@letta.com>
2026-01-12 10:57:48 -08:00
Sarah Wooders
3cf91d9dbc chore: enable client-defined tools integration test (#8223) 2026-01-12 10:57:48 -08:00
Sarah Wooders
7669896184 feat: allow client-side tools to be specified in request (#8220)
* feat: allow client-side tools to be specified in request

Add `client_tools` field to LettaRequest to allow passing tool schemas
at message creation time without requiring server-side registration.
When the agent calls a client-side tool, execution pauses with
stop_reason=requires_approval for the client to provide tool returns.

- Add ClientToolSchema class for request-level tool schemas
- Merge client tools with agent tools in _get_valid_tools()
- Treat client-side tool calls as requiring approval
- Add integration tests for client-side tools flow

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* test: add comprehensive end-to-end test for client-side tools

Update integration test to verify the complete flow:
- Agent calls client-side tool and pauses
- Client provides tool return with secret code
- Agent processes and responds
- User asks about the code, agent recalls it
- Validate full conversation history makes sense

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* update apis

* fix: client-side tools schema format and test assertions

- Use flat schema format for client tools (matching t.json_schema)
- Support both object and dict access for client tools
- Fix stop_reason assertions to access .stop_reason attribute

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* refactor: simplify client_tools access pattern

ClientToolSchema objects always have .name attribute

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* fix: add client_tools parameter to LettaAgentV2 for API compatibility

V2 agent doesn't use client_tools but needs the parameter
to match the base class signature.

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* revert: remove client_tools from LettaRequestConfig

Client-side tools don't work with background jobs since
there's no client present to provide tool returns.

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* fix: add client_tools parameter to SleeptimeMultiAgent classes

Add client_tools to step() and stream() methods in:
- SleeptimeMultiAgentV3
- SleeptimeMultiAgentV4

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* chore: regenerate API specs for client_tools support

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-12 10:57:48 -08:00
github-actions[bot]
76008c61f4 fix: handle httpx.RemoteProtocolError during LLM streaming (#8206) 2026-01-12 10:57:48 -08:00
github-actions[bot]
abb325f32d fix: prevent ForeignKeyViolationError on messages table (#8202)
Add validation in `create_many_messages_async` to check if run_ids exist
before attempting to insert messages. If a run has been deleted (e.g.,
during cancellation or cleanup) while messages are still being created,
the run_id is set to NULL instead of causing a ForeignKeyViolationError.

This handles the race condition where:
1. A run is created and workflow is started
2. The run is deleted before the workflow's message creation completes
3. The message insert fails with FK violation

Fixes #8201, #8119, #8091, #8025

🤖 Generated with [Letta Code](https://letta.com)

Co-authored-by: letta-code <248085862+letta-code@users.noreply.github.com>
Co-authored-by: Letta <noreply@letta.com>
2026-01-12 10:57:48 -08:00
cthomas
8f4074d2fc feat: dump traces on event loop saturation (#8185) 2026-01-12 10:57:48 -08:00
cthomas
9fbefb62a0 fix: json parse error in middleware (#8187) 2026-01-12 10:57:48 -08:00
cthomas
a6dd98d843 feat: add event loop saturation detection (#8177)
Co-authored-by: jnjpng <jin@letta.com>
2026-01-12 10:57:48 -08:00
cthomas
9c986c6e6f fix: remove duplicate seralization in block creation (#8173) 2026-01-12 10:57:48 -08:00
cthomas
449e23a265 fix: ssl connection requried db error [LET-6720] (#8172)
fix: ssl connection requried db error
2026-01-12 10:57:48 -08:00