Commit Graph

6484 Commits

Author SHA1 Message Date
cthomas
1be2f61f05 feat: add new letta error message stream response type (#6192) 2025-11-24 19:10:11 -08:00
cthomas
1d71468ab2 feat: don't yield tool return message back in hitl [LET-6012] (#6219)
feat: don't yield tool return message back in hitl
2025-11-24 19:10:11 -08:00
cthomas
6dd3f6fecd feat: add back ref for mcp server on org (#6269) 2025-11-24 19:10:11 -08:00
cthomas
d0d47021e5 feat: expunge orm objects for garbage collection (#6270) 2025-11-24 19:10:11 -08:00
cthomas
369274a219 fix: greenlet spawn errors in deletion path (#6267) 2025-11-24 19:10:11 -08:00
cthomas
6f810d95d8 feat: add semaphore to limit embeddings creation (#6261) 2025-11-24 19:10:11 -08:00
Kian Jones
ccafc6bef4 feat: out of band diagnostics on local health check (#6264)
* move to not ready immedietly if there's a failure.

* another script in container
2025-11-24 19:10:11 -08:00
jnjpng
3de712fce0 fix: compact and import export file naming in migration guide (#6265)
compact and import export file

Co-authored-by: Letta Bot <noreply@letta.com>
2025-11-24 19:09:54 -08:00
Sarah Wooders
ce3add4f55 feat: migrate integration tests to use model_settings (#6125)
* migration integration tests to use model_settings

* updated configs

* update v2 tests

* revert files

* add some configs and fix tests

* fix conversation_search

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-11-24 19:09:33 -08:00
Sarah Wooders
f9b3978460 chore: remove old examples (#6255) 2025-11-24 19:09:33 -08:00
Kian Jones
ea845d379d feat: improved watchdog thread (#6252)
log even when event loop is not blocked to clarify whether event loop is blocked during 'freeze' and attempt to estimate main event loop load
2025-11-24 19:09:33 -08:00
jnjpng
0459088ff3 feat: add ld flag for temporal v1 agent (#6251)
* base

* generate

* remove

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-11-24 19:09:33 -08:00
Ari Webb
14843b2600 feat: enable folder_ids on agent create [LET-6147] (#6247)
enable folder_ids

Co-authored-by: Ari Webb <ari@letta.com>
2025-11-24 19:09:33 -08:00
Ari Webb
9bff8413a0 fix: fix gemini models reasoning [LET-6228] (#6245)
* fixed locally

* fix tests

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-11-24 19:09:33 -08:00
jnjpng
52c9abf39b fix: v1 agent message content for anthropic and usage stats tracking [LET-6199] (#6249)
base

Co-authored-by: Letta Bot <noreply@letta.com>
2025-11-24 19:09:33 -08:00
Christina Tong
04611b981c feat: filter messages search endpoint by agent id [LET-6229] (#6246)
* feat: filter messages search endpoint by agent id [LET-6229]

* add autogenerated schema/types
2025-11-24 19:09:33 -08:00
cthomas
85d48657fb feat: log source header to otel (#6248) 2025-11-24 19:09:33 -08:00
Ari Webb
7380eaec13 feat: enable gpt5.1 models [LET-6178] (#6175)
* hack at gpt51

* revert package lock

* first hack

* default context window

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-11-24 19:09:33 -08:00
Shelley Pham
7ce33c4f22 feat: add attach detach memory block functionality [LET-5860] (#6207) 2025-11-24 19:09:33 -08:00
Ari Webb
c79859f0b0 fix: fix send_message_v2 ci tests (#6240)
* fix send_message_v2

* revert send_message

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-11-24 19:09:33 -08:00
Sarah Wooders
963e40e6db fix: patch gemini-3 (#6237) 2025-11-24 19:09:33 -08:00
jnjpng
9ffbfa6d67 feat: base letta v1 agent on temporal (#6208)
* base

* another

* parallel

* update

* rename

* naming

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-11-24 19:09:33 -08:00
cthomas
bb38da7f95 feat: add initial anthropic proxy prototype (#6233)
* feat: add initial anthropic proxy prototype

* prevent api sync
2025-11-24 19:09:33 -08:00
Ari Webb
699820cecd fix: managers test (#6232)
fix managers test

Co-authored-by: Ari Webb <ari@letta.com>
2025-11-24 19:09:33 -08:00
Sarah Wooders
b0779f7969 feat: remove override for letta_v1_agent (#6231) 2025-11-24 19:09:33 -08:00
Kian Jones
ddb6f3836e Fix: prevent empty embedding batches from causing memory spikes (#6230)
Root cause: When splitting failed embedding batches, mid=0 for single
items created empty chunks. These empty chunks were then processed,
creating hundreds of no-op tasks that consumed memory.

Crash pattern from logs:
- 600+ 'batch_size=0' embedding tasks created
- Memory spiked 531 MB → 4.9 GB
- Pod crashed

Fixes:
1. Skip empty chunks before creating tasks
2. Guard chunk splits to prevent empty slices (mid = max(1, len//2))
3. Break early if all chunks are empty

This prevents the asyncio.gather() from creating thousands of empty
coroutines that exhaust memory.
2025-11-24 19:09:33 -08:00
Sarah Wooders
a6b19bf3aa Revert "feat: support anthropic structured outputs [LET-6190]" (#6229)
Revert "feat: support anthropic structured outputs [LET-6190] (#6200)"

This reverts commit 46f6422e68b0d35df1690118dd971c20a4ba7a81.
2025-11-24 19:09:33 -08:00
Ari Webb
0884272d1c feat: make config for mcp_servers nested [LET-6098] (#6155) 2025-11-24 19:09:33 -08:00
Ari Webb
65a733d5dd fix: make attach/detach routes return None if sdk verion 1.0 (#6203)
* Revert "Revert "feat: make attach/detach routes return None if version is 1.0 [LET-5844]" (#6201)"

This reverts commit bb0d10725f5889306de61e1758f061d6c1041c52.

* fix type checking

* revert

* return state for blocks and sources

* func signatures

* create memgpt_agent for cloud-e2e-tests

* Revert "create memgpt_agent for cloud-e2e-tests"

This reverts commit f279e5897b0942b1006a5f8527713dd801064c63.

* fix

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-11-24 19:09:33 -08:00
Ari Webb
b0f9986209 feat: make letta_v1_agent default [LET-6153] (#6115)
* agent change

* fix tests

* fix more tests

* memgpt_v2_agent for cloud-api tests

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-11-24 19:09:33 -08:00
Ari Webb
474f8c1f89 fix: in cloud don't give default actor [LET-6184] (#6218)
* fix: in cloud don't give default actor

* set in justfile

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-11-24 19:09:33 -08:00
Kian Jones
abb13ef352 fix: Remove nltk blocking download and make azure model listing non-blocking (#6214)
* Fix event loop blocking in NLTK downloads and Azure model listing

Found via watchdog detecting 61.6s hang during file upload.

**Root causes:**
1. NLTK punkt_tab downloads blocking during file processing
2. Azure model listing using sync requests.get() in async context

**Fixes:**
1. Pre-download NLTK data at Docker build time
2. Async fallback download at startup if build failed
3. Move Azure model fetch to thread pool with asyncio.to_thread()

**Impact:**
- Eliminates 60+ second event loop hangs
- Startup: instant if data baked in, ~60s async if needs download
- Requests: never block, all I/O offloaded to threads

* Fix Docker build: ensure /root/nltk_data exists even if download fails

- Create directory before download attempt
- Add verification step to confirm download success
- Directory always exists so COPY won't fail in runtime stage

* Fix: use venv python for NLTK download in Docker build

The builder stage installs NLTK in /app/.venv but we were using
system python which doesn't have NLTK. Now using venv python so
download actually works.

* Use uv run for NLTK download (more idiomatic)

uv run automatically uses the synced venv, cleaner than hardcoding
the venv path.
2025-11-24 19:09:33 -08:00
Sarah Wooders
e7e2105ab6 feat: rename .af parameters [LET-6154] (#6204)
* feat: rename .af parameters

* update apis
2025-11-24 19:09:33 -08:00
Ari Webb
ec953d27c0 fix: double escape leads to exponential growth in backslash character [LET-6016] (#6087) 2025-11-24 19:09:33 -08:00
Kian Jones
19210c01b0 feat: add stacktrace dumping on event loop block (#6211)
Add stack trace dumping to watchdog

When a hang is detected, now logs:
- Full stack trace of all threads
- Exact file:line of blocking code
- Function names in the call chain

This shows you WHY the event loop is blocked, not just that it's blocked.
2025-11-24 19:09:33 -08:00
Kian Jones
71bce718f7 Add lightweight event loop watchdog monitoring (#6209)
* Add lightweight event loop watchdog monitoring

- Thread-based watchdog detects event loop hangs >15s
- Runs independently, won't interfere with normal operation
- Disabled in test environments
- Minimal overhead, just heartbeat checks every 5s

* actually test it

* Add test script to validate watchdog detects hangs

Run with: uv run python test_watchdog_hang.py

Tests:
- Normal operation (no false positives)
- Short blocks under threshold (no alerts)
- Long blocks over threshold (correctly alerts)
2025-11-24 19:09:33 -08:00
Sarah Wooders
c18af2bc81 feat: support anthropic structured outputs [LET-6190] (#6200) 2025-11-24 19:09:33 -08:00
Copilot
2addd4eb0d Fix llm_model_configs committed to wrong directory (#6206)
* Initial plan

* Move llm_model_configs to correct location

Co-authored-by: kianjones9 <11655409+kianjones9@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kianjones9 <11655409+kianjones9@users.noreply.github.com>
2025-11-24 19:09:32 -08:00
Sarah Wooders
a466e65e6b feat: move sources to folders [LET-6189] (#6199) 2025-11-24 19:09:32 -08:00
Sarah Wooders
cce0f41095 Revert "feat: make attach/detach routes return None if version is 1.0 [LET-5844]" (#6201)
Revert "feat: make attach/detach routes return None if version is 1.0 [LET-58…"

This reverts commit 328c481da6e4e0f7f30a82dcc287c90835f431cc.
2025-11-24 19:09:32 -08:00
Ari Webb
e20feaa3e4 feat: make attach/detach routes return None if version is 1.0 [LET-5844] (#6141)
---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-11-24 19:09:32 -08:00
jnjpng
099da97e7b fix: remove modal image creation logging and fix base imports (#6197)
base

Co-authored-by: Letta Bot <noreply@letta.com>
2025-11-24 19:09:32 -08:00
Kian Jones
a5e435c56f fix: register memory monitor at startup (#6195)
register monitor at startup
2025-11-24 19:09:32 -08:00
Cameron
1e5d6e39c4 Update docs custom domain to docs-legacy.letta.com (#6191)
Change the Fern docs custom domain from docs.letta.com to docs-legacy.letta.com.

Next steps:
- Contact Fern to receive new CNAME and TXT records
- Update DNS records for docs-legacy subdomain
- Wait for SSL provisioning

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

Co-authored-by: Letta <noreply@letta.com>
2025-11-24 19:09:32 -08:00
cthomas
41392cdb8a test: make hitl testing pass (#6188) 2025-11-24 19:09:32 -08:00
Kian Jones
848aa962b6 feat: add memory tracking to core (#6179)
* add memory tracking to core

* move to asyncio from threading.Thread

* remove threading.thread all the way

* delay decorator monitoring initialization until after event loop is registered

* context manager to decorator

* add psutil
2025-11-24 19:09:32 -08:00
jnjpng
3b030d1bb0 fix: set default python version for modal (#6180)
update

Co-authored-by: Letta Bot <noreply@letta.com>
2025-11-24 19:09:32 -08:00
Shubham Naik
acbbccd28a feat: have core ask cloud for any relavent api credentials to allow a… [LET-6179] (#6172)
feat: have core ask cloud for any relavent api credentials to allow an agent to perform letta tasks

Co-authored-by: Shubham Naik <shub@memgpt.ai>
2025-11-24 19:09:32 -08:00
cthomas
34f5b5e33c feat: no user init messages for letta v1 agent (#6174) 2025-11-24 19:09:32 -08:00
cthomas
15a8992f03 Revert "feat: remove init messages for v1 agent" (#6173)
Revert "feat: remove init messages for v1 agent (#6112)"

This reverts commit 8f2e053c623e28dfc7d64a8d4b0c1bfab8942068.
2025-11-24 19:09:32 -08:00