Commit Graph

1490 Commits

Author SHA1 Message Date
Ari Webb
6b5c3a7130 feat: list_agents_for_archive endpoint [LET-4407] (#5684)
* list_archives_for_agent

* use pattern from blocks instead

* use new parameter include

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-10-24 15:14:20 -07:00
cthomas
875908cb44 feat: add include param to all backend list agents helpers (#5699) 2025-10-24 15:14:20 -07:00
Christina Tong
140be293da feat: deprecate append copy suffix, add override name [LET-5779] (#5694)
* feat: deprecate append copy suffix, add override name [LET-5779]

* update open api json
2025-10-24 15:14:20 -07:00
cthomas
afdf0f80e3 feat: add backend support for agent relationship loads (#5693) 2025-10-24 15:14:09 -07:00
jnjpng
d4a75b1a2f chore: enable optimistic tool sync (#5612)
base

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-24 15:14:09 -07:00
Ari Webb
e54df7f3a4 feat: add attach and detach archive to agent [LET-4402] (#5679)
* add attach and detach

Co-authored-by: Ari Webb <ari@letta.com>
2025-10-24 15:13:47 -07:00
cthomas
026deb294c feat: update delete runs return type [LET-5777] (#5636)
feat: update delete runs return type
2025-10-24 15:13:47 -07:00
Kian Jones
45065297a0 feat: runtime validation for ids for internal managers calls (#5544)
* claude coded first pass

* fix test cases to expect errors instead

* fix this

* let's see how letta-code did

* claude

* fix tests, remove dangling comments, retrofit all managers functions with decorator

* revert to main for these since we are not erroring on invalid tool and block ids

* reorder decorators

* finish refactoring test cases

* reorder agent_manager decorators and fix test tool manager

* add decorator on missing managers

* fix id sources

* remove redundant check

* uses enum now

* move to enum
2025-10-24 15:13:47 -07:00
Christina Tong
12185c8601 feat: add tools used filtering to internal runs [LET-5415] (#5557)
* feat: add tool_used field to run_metrics [LET-5419]

* change to tool name

* use tool ids over names

* feat: add internal runs route with template_family filtering

* feat: add step count filtering to internal runs [LET-5417]

* remove import

* add auto generated

* feat: add tools used filtering to internal runs [LET-5415]

* add test

* add test

* fix snippets
2025-10-24 15:13:47 -07:00
Ari Webb
abbd1b5595 Revert "feat: revise mcp tool routes [LET-4321]" (#5652)
Revert "feat: revise mcp tool routes [LET-4321] (#5631)"

This reverts commit e15f120078652b2160d64a1e300317b95eccb163.
2025-10-24 15:13:47 -07:00
Ari Webb
747e7eae0e feat: revise mcp tool routes [LET-4321] (#5631)
* start adding tools mapping

* ready to start testing new table migration

* alembic generated code

* just stage api

* small update

* integration tests

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-10-24 15:13:47 -07:00
Christina Tong
77c797c752 feat: add step count filtering to internal runs [LET-5417] (#5547)
* feat: add tool_used field to run_metrics [LET-5419]

* change to tool name

* use tool ids over names

* feat: add internal runs route with template_family filtering

* feat: add step count filtering to internal runs [LET-5417]

* remove import

* add auto generated

* add test

* fix snippets
2025-10-24 15:13:47 -07:00
Christina Tong
44574ec264 feat: add internal runs route with template_family filtering [LET-5416] (#5543)
* feat: add tool_used field to run_metrics [LET-5419]

* change to tool name

* use tool ids over names

* feat: add internal runs route with template_family filtering

* remove import

* add auto generated

* restrict internal runs

* add test, address comments

* add docs and auto generated fields

* remove unused template mixins

* update openapi

* add generated
2025-10-24 15:13:15 -07:00
jnjpng
e3f794dac5 fix: handle async context task cleanup for mcp client [LET-5746] (#5619)
* base

* update

* update

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-24 15:13:15 -07:00
Kevin Lin
4bb54f471c feat: memory apply patch [LET-5548] (#5475) 2025-10-24 15:13:15 -07:00
Kevin Lin
35b5383724 feat: match line number rendering to Anthropic / OAI defaults (#5492) 2025-10-24 15:13:15 -07:00
Ari Webb
3b399f999f chore: silence error [LET-5761] (#5610)
silence error

Co-authored-by: Ari Webb <ari@letta.com>
2025-10-24 15:13:15 -07:00
Kian Jones
d7b0a38a92 fix: index out of bounds check in agent_manager (#5571)
* set cur_system_message = None if there's no message ids

* typo
2025-10-24 15:13:15 -07:00
jnjpng
dfcb7ee73d fix: poll for authorization url with timeout [LET-5740] (#5595)
base

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-24 15:13:15 -07:00
jnjpng
a880fb49ae fix: test disabling optimistic sync (#5576)
base

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-24 15:13:15 -07:00
Matthew Zhou
de7011e4de feat: Mark certain internal tools as safe to execute concurrently [LET-5614] (#5553)
* Change execution pattern depending on

* Increase efficiency

* Mark certain tools as parallel safe
2025-10-24 15:12:26 -07:00
Christina Tong
79f49c33d8 feat: add tool_used field to run_metrics [LET-5419] (#5540)
* feat: add tool_used field to run_metrics [LET-5419]

* change to tool name

* use tool ids over names

* add generated files

* chore: update OpenAPI schema to include tools_used field in RunMetrics

* update alembic file
2025-10-24 15:12:11 -07:00
jnjpng
264de822e5 fix: dispatch callback failing on probe [LET-5606] (#5541)
* probe

* cleanup

* hi

* log

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-24 15:12:11 -07:00
Sarah Wooders
305bb8c8f7 feat: inject letta_client and agent_id into local sandbox (#5192) 2025-10-24 15:12:11 -07:00
jnjpng
5913730992 fix: ensure messages are in chronological order when backfilling tool call id (#5520)
* base

* base

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-24 15:12:11 -07:00
Kian Jones
4bbd760204 feat: add validation to fastapi routes for agent IDs (#5454)
* change my PR to match Caren's

* add path parameter validation for agent id first

* remove old import

* remove old agent_id_pattern pattern

* add example and fix max/min calculation to include hyphen

* fix regex string interpolation

* example deprecated in favour of examples

* openapi autogen

* change template test to expect 422

* fix 422 swallow

* expect 422 or 400

* rewrite  error codes

* fix hallucinated uuid

* tweaked error message test

* print docker logs on failure
2025-10-24 15:12:11 -07:00
Ari Webb
f98f729218 create or update instead of create [LET-5566] (#5496)
* create or update instead of create

* silence error

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-10-24 15:12:11 -07:00
Matthew Zhou
2dae4d33c3 feat: Implement streaming chat completions endpoint [LET-5485] (#5446)
* wip

* Add chat completions router and fix streaming service

* Finish chat completions

* Finish chat completions

* Remove extra print statement

* Run just api

* Don't explicitly throw http exceptions but surface Letta errors

* Remap errors

* Trigger CI

* Add missing Optional import
2025-10-24 15:12:11 -07:00
Ari Webb
967cc3decf move exceptions out of folders and sources [LET-4631] (#5444) 2025-10-24 15:12:11 -07:00
jnjpng
dad7254b1b fix: record run duration to runs table and sync with run_metrics [LET-5525] (#5441)
* base

* helper

* comment

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-24 15:12:11 -07:00
Ari Webb
9e94c344b8 using uuid and datetime [LET-5508] (#5430)
* using uuid and datetime

* add run_id

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-10-24 15:12:11 -07:00
Ari Webb
6904199cae rely on user_manager and organization_manager for error throwing [LET-4637] (#5420)
rely on user_manager and organization_manager for error throwing

Co-authored-by: Ari Webb <ari@letta.com>
2025-10-24 15:12:11 -07:00
Matthew Zhou
11a36aaa6a feat: Create streaming service class [LET-5504] (#5418)
Create streaming service
2025-10-24 15:12:11 -07:00
Shubham Naik
a95a449b02 feat: ignore bad tools when creating agents for template [LET-4850] (#5390)
* feat: ignore bad tools when creating agents for template

* chore: use paramater

* chore: next

* chore: next

---------

Co-authored-by: Shubham Naik <shub@memgpt.ai>
2025-10-24 15:12:11 -07:00
Kian Jones
158546414d fix: better error message for llm on agent failure (#5402)
* better error message for llm on agent failure

* raise NoResultFoundError instead of value error and do it outside async db registry
2025-10-24 15:11:31 -07:00
Matthew Zhou
6cfdcc584c fix: Add backfill for message listing without tool call id [LET-5479] (#5400)
* Add warning comment

* Remove extra commit

* Remove extra helper unused
2025-10-24 15:11:31 -07:00
Sarah Wooders
7ab44e61fa feat: patch anthropic token counting + build-in tokenizers [LET-5377] (#5354) 2025-10-24 15:11:31 -07:00
jnjpng
5d153214c0 feat: allow invalid schema tools to be attached with warning (#5341)
* base

* allow attach

* display badge

* clean up

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-24 15:11:31 -07:00
Matthew Zhou
d826aceaf9 fix: Remove unuseful tool rules for v1 (#5345)
Remove unuseful tool rules for v1
2025-10-24 15:11:31 -07:00
Matthew Zhou
1c285f5170 fix: Fix system init messages and anthropic parsing [LET-5385] (#5339)
* Fix system init messages and anthropic parsing

* Add backwards compat tool call id adding
2025-10-24 15:11:31 -07:00
Kian Jones
c2e474e03a feat: refactor logs to parse as a single log line each and filter out 404s from sentry (#5242)
* add multiline log auto detect

* implement logger.exception()

* filter out 404

* remove potentially problematic changes
2025-10-24 15:11:31 -07:00
jnjpng
b3fef4b5a8 feat: double write to all encrypted columns and decrypt on read (#5265)
* base

* use secret field

* fix

* auth code

* stage publish

* decouple backfill

* revert uncomment

* providers and agent vars

* mcp

* mcp

* stage and publish

* fix oauth

* double encrypt

* sandbox

---------

Co-authored-by: Letta Bot <noreply@letta.com>
2025-10-24 15:11:31 -07:00
cthomas
9cb5156ac7 chore: sync 0.12.0 version (#3023)
Co-authored-by: Matthew Zhou <mattzh1314@gmail.com>
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2025-10-08 16:10:51 -07:00
Caren Thomas
a5354d7534 chore: bump version 0.11.8 2025-10-07 18:31:26 -07:00
cthomas
c31521c7ad feat: add conditional importing for lettuce client (#5212) 2025-10-07 17:50:50 -07:00
cthomas
2a998ac562 fix: import in lettuce client (#5211) 2025-10-07 17:50:50 -07:00
cthomas
5b7e2b3f86 feat: add new lettuce client (#5207)
* feat: add new lettuce client

* modest improvements

* fix comment
2025-10-07 17:50:50 -07:00
cthomas
757bbcac37 feat: add pagination to agent files endpoint (#5086)
* feat: add pagination to agent files endpoint
2025-10-07 17:50:49 -07:00
cthomas
416af626cc feat: add pagination to agent folders endpoint (#5085)
* feat: add pagination to agent folders endpoint

* chore: regenerate API client with pagination parameters

* feat: add pagination parameters to agent folders and sources endpoints

- Add pagination parameters (before, after, limit, order, order_by) to list_agent_folders endpoint
- Add pagination parameters to list_agent_sources endpoint
- Update list_attached_sources_async method to support pagination with cursor-based filtering
- Regenerate API client with new pagination parameters
2025-10-07 17:50:49 -07:00
Sarah Wooders
7aff9aa659 feat: error handling for rest api for agents + blocks [LET-4625] (#5142) 2025-10-07 17:50:49 -07:00