Commit Graph

56 Commits

Author SHA1 Message Date
cthomas
9a95a8f976 fix: duplicate session commit in step logging (#7512)
* fix: duplicate session commit in step logging

* update all callsites
2026-01-12 10:57:19 -08:00
jnjpng
591420876a fix: correct decorator order for trace_method and raise_on_invalid_id (#7226)
Swap the order of @trace_method and @raise_on_invalid_id decorators
across all service managers so that @trace_method is always the first
wrapper applied to the function (positioned directly above the method).

This ensures the ID validation happens before tracing begins, which is
the intended execution order.

Files modified:
- agent_manager.py (23 occurrences)
- archive_manager.py (11 occurrences)
- block_manager.py (7 occurrences)
- file_manager.py (6 occurrences)
- group_manager.py (9 occurrences)
- identity_manager.py (10 occurrences)
- job_manager.py (7 occurrences)
- message_manager.py (2 occurrences)
- provider_manager.py (3 occurrences)
- sandbox_config_manager.py (7 occurrences)
- source_manager.py (5 occurrences)
- step_manager.py (13 occurrences)
2025-12-17 17:31:02 -08: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
Sarah Wooders
354205f581 feat: create new runs table [LET-4467] (#4841) 2025-10-07 17:50:47 -07:00
Sarah Wooders
4df0a27eb0 chore: remove sync db (#4873) 2025-10-07 17:50:45 -07:00
Matthew Zhou
16d666a434 fix: Fix create_job_async (#4868)
Fix
2025-10-07 17:50:45 -07:00
cthomas
491506f383 fix: stray await (#4840) 2025-10-07 17:50:45 -07:00
Sarah Wooders
3593e7cda6 feat: throw 404 for missing agent_id (#4804)
* map to 404 for missing agent

* cleanup errors

* cleanup errors

* validate
2025-10-07 17:50:45 -07:00
Sarah Wooders
c85bfefa52 feat: add agents_runs table (#4768) 2025-10-07 17:50:44 -07:00
Kian Jones
b8e9a80d93 merge this (#4759)
* wait I forgot to comit locally

* cp the entire core directory and then rm the .git subdir
2025-09-17 15:47:40 -07:00
Kian Jones
22f70ca07c chore: officially migrate to submodule (#4502)
* remove apps/core and apps/fern

* fix precommit

* add submodule updates in workflows

* submodule

* remove core tests

* update core revision

* Add submodules: true to all GitHub workflows

- Ensure all workflows can access git submodules
- Add submodules support to deployment, test, and CI workflows
- Fix YAML syntax issues in workflow files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* remove core-lint

* upgrade core with latest main of oss

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-09 12:45:53 -07:00
Kian Jones
fecf6decfb chore: migrate to ruff (#4305)
* base requirements

* autofix

* Configure ruff for Python linting and formatting

- Set up minimal ruff configuration with basic checks (E, W, F, I)
- Add temporary ignores for common issues during migration
- Configure pre-commit hooks to use ruff with pass_filenames
- This enables gradual migration from black to ruff

* Delete sdj

* autofixed only

* migrate lint action

* more autofixed

* more fixes

* change precommit

* try changing the hook

* try this stuff
2025-08-29 11:11:19 -07:00
Matthew Zhou
1ca8c310b8 fix: Fix a bunch of failing tests [LET-4065] (#4249)
* Finish fixing async loop for test_agent_serialization_v2

* Fix tests

* Remove rounding for sqlite

---------

Co-authored-by: Shubham Naik <shub@letta.com>
2025-08-27 12:48:03 -07:00
Andy Li
ca6f474c4e feat: track metrics for runs in db 2025-08-06 15:46:50 -07:00
Sarah Wooders
a0d6bd4520 test: run tests with gemini 2.5 instead (#3548)
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
Co-authored-by: Kian Jones <kian@letta.com>
Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
2025-07-29 14:50:28 -07:00
cthomas
a95ff6f5c5 feat: use no refresh flag in job creation (#3434) 2025-07-20 14:29:19 -07:00
cthomas
dd69379b47 feat: use no refresh in job update (#3421) 2025-07-19 21:33:08 -07:00
Andy Li
1ccaae8960 chore: cleanup database detection 2025-07-18 17:12:56 -07:00
cthomas
6b17923d78 fix: reduce number of db connections for job status update (#3398) 2025-07-18 14:20:36 -07:00
Kian Jones
0cd8c830c9 feat(sqlite): CI Tests for Alembic and SQLite (#3358)
Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
2025-07-17 18:04:13 -07:00
Matthew Zhou
0f69d503aa fix: Move callback execution out of the async session (#3360) 2025-07-16 15:43:32 -07:00
cthomas
710c7046a1 feat: make dispatch callback maintain own db connection (#3279) 2025-07-10 15:43:39 -07:00
cthomas
83d8088d54 fix: sync import in dispatch callback (#3275) 2025-07-10 15:03:01 -07:00
Matthew Zhou
954675396f feat: Add pinecone for cloud embedding (#3160) 2025-07-03 22:37:55 -07:00
Andy Li
33c1f26ab6 feat: support for agent loop job cancelation (#2837) 2025-07-02 14:31:16 -07:00
Matthew Zhou
3845592f50 fix: Tweak output length on web search (#3113) 2025-06-30 16:05:46 -07:00
Matthew Zhou
3aee153040 feat: Add logging/tracing for callback dispatching (#3109) 2025-06-30 14:25:02 -07:00
cthomas
064f87e722 chore: consolidate enum definitions (#2919) 2025-06-19 16:04:12 -07:00
cthomas
99e112e486 feat: make create_async route consistent with other message routes (#2877) 2025-06-19 13:51:51 -07:00
Matthew Zhou
d41b4ab242 feat: Add callback_error and fix callback logic (#2842) 2025-06-16 13:23:03 -07:00
Matthew Zhou
24149710fe feat: Asyncify message async routes and also add callback url (#2838) 2025-06-16 11:23:46 -07:00
Andy Li
d2252f2953 feat: otel metrics and expanded collecting (#2647)
(passed tests in last run)
2025-06-05 17:20:14 -07:00
Andy Li
83b897e91d feat: job listing takes source id (#2473) 2025-05-27 15:34:27 -07:00
cthomas
62a22e0d17 feat(asyncify): migrate jobs (#2420) 2025-05-25 18:58:06 -07:00
cthomas
6c1b189080 feat: add db tracing to otel (#2337) 2025-05-22 13:47:49 -07:00
cthomas
73c45f154c feat(asyncify): migrate get active jobs (#2227) 2025-05-16 15:18:06 -07:00
cthomas
3644a17426 fix: unset timezone for async db (#2220) 2025-05-16 13:11:15 -07:00
cthomas
2cd4ebd348 feat: convert more methods to async (#2200) 2025-05-15 13:44:58 -07:00
cthomas
7f90746152 feat: convert many methods to async (#2193) 2025-05-15 12:09:40 -07:00
Andy Li
600ccb35e7 feat: async db client (#2076) 2025-05-12 17:15:14 -07:00
Matthew Zhou
cab282b664 feat: Add callback for jobs (#1776)
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2025-04-18 10:48:04 -07:00
Sarah Wooders
da62cc6898 feat: add batch job tracking and generate batch APIs (#1727)
Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
2025-04-17 17:02:07 -07:00
cthomas
cfdc2ad417 feat: add route to get steps for job (#1174) 2025-03-02 17:43:18 -08:00
Matthew Zhou
b5e09536ae feat: Serialize agent state simple fields and messages (#1012) 2025-02-18 11:01:10 -08:00
Matthew Zhou
9ee53a0eaa feat: Composio tools execute on-the-fly (#999) 2025-02-13 16:13:29 -08:00
cthomas
98266b90f3 chore: remove nested config in send requests (#813) 2025-01-28 14:58:53 -08:00
cthomas
70ce1902ad fix: drop tool_return_message when using assistant_message (#784) 2025-01-28 14:31:51 -08:00
cthomas
3e0f9b995f feat: add support for use_assistant_message in list_messages (#804) 2025-01-28 13:39:53 -08:00
mlong93
d6be7809d0 fix: deprecate cursor param and replace with before, after (#736)
Co-authored-by: Mindy Long <mindy@letta.com>
2025-01-23 14:17:25 -08:00
cthomas
36c30a5471 fix: remove manual step logging (#738) 2025-01-22 21:07:23 -08:00