Commit Graph

99 Commits

Author SHA1 Message Date
Christina Tong
c8ae02a1fb feat(core): sort agents by updated_at [LET-7771] (#9730)
feat(core): sort agents by last_updated_at
2026-03-03 18:34:02 -08:00
Kian Jones
f5c4ab50f4 chore: add ty + pre-commit hook and repeal even more ruff rules (#9504)
* auto fixes

* auto fix pt2 and transitive deps and undefined var checking locals()

* manual fixes (ignored or letta-code fixed)

* fix circular import

* remove all ignores, add FastAPI rules and Ruff rules

* add ty and precommit

* ruff stuff

* ty check fixes

* ty check fixes pt 2

* error on invalid
2026-02-24 10:55:11 -08:00
Sarah Wooders
21e880907f feat(core): structure memory directory and block labels [LET-7336] (#9309) 2026-02-24 10:52:06 -08:00
Ari Webb
5c6ca705f1 Revert "feat: bring back use message packing for timezone [LET-6846]" (#9302)
Revert "feat: bring back use message packing for timezone [LET-6846] (#9256)"

This reverts commit c5017cccdef95b84fc585b26a0ddc5b7e44eb7c9.
2026-02-24 10:52:06 -08:00
Ari Webb
426f6a8ca4 feat: bring back use message packing for timezone [LET-6846] (#9256)
* feat: bring back use message packing for timezone

* add tests
2026-02-24 10:52:06 -08:00
Ari Webb
5c06918042 fix: don't need embedding model for self hosted [LET-7009] (#8935)
* fix: don't need embedding model for self hosted

* stage publish api

* passes tests

* add test

* remove unnecessary upgrades

* update revision order db migrations

* add timeout for ci
2026-01-29 12:44:04 -08:00
cthomas
e964307f6a feat: add lazy=raise for passage-org relationship (#8482) 2026-01-12 10:57:49 -08:00
Kian Jones
fbd89c9360 fix: replace all 'PRODUCTION' references with 'prod' for consistency (#6627)
* fix: replace all 'PRODUCTION' references with 'prod' for consistency

Problem: Codebase had 11 references to 'PRODUCTION' (uppercase) that should
use 'prod' (lowercase) for consistency with the deployment workflows and
environment normalization.

Changes across 8 files:

1. Source files (using settings.environment):
   - letta/functions/function_sets/multi_agent.py
   - letta/services/tool_manager.py
   - letta/services/tool_executor/multi_agent_tool_executor.py
   - letta/services/helpers/agent_manager_helper.py
   All checks changed from: settings.environment == "PRODUCTION"
   To: settings.environment == "prod"

2. OTEL resource configuration:
   - letta/otel/resource.py
     - Updated _normalize_environment_tag() to handle 'prod' directly
     - Removed 'PRODUCTION' -> 'prod' mapping (no longer needed)
     - Updated device.id check from _env != "PRODUCTION" to _env != "prod"

3. Test files:
   - tests/managers/conftest.py
     - Fixture parameter changed from "PRODUCTION" to "prod"
   - tests/managers/test_agent_manager.py (3 occurrences)
   - tests/managers/test_tool_manager.py (2 occurrences)
   All test checks changed to use "prod"

Result: Complete consistency across the codebase:
- All environment checks use "prod" instead of "PRODUCTION"
- Normalization function simplified (no special case for PRODUCTION)
- Tests use correct "prod" value
- Matches deployment workflow configuration from PR #6626

This completes the environment naming standardization effort.

* fix: update settings.py environment description to use 'prod' instead of 'PRODUCTION'

The field description still referenced PRODUCTION as an example value.
Updated to use lowercase 'prod' for consistency with actual usage.

Before: "Application environment (PRODUCTION, DEV, CANARY, etc. - normalized to lowercase for OTEL tags)"
After: "Application environment (prod, dev, canary, etc. - lowercase values used for OTEL tags)"
2025-12-15 12:02:34 -08:00
cthomas
39ff03c78c fix: file blocks loading in 1.0 sdk (#6378) 2025-11-26 14:39:39 -08:00
Ari Webb
f9b405372d feat: add search routes [LET-6236] (#6280)
* claude code first pass

* rename routes

* search_messages and list_messages

* revert agents messagesearch

* generate api

* fix backend for list all messages

* request for message search

* return list of letta message

* add tests

* error in archive endpoint

* archive delete return type wrong

* optional params for archive creation

* add passage to tpuf on create

* fix archive manager

* support global passage search

* search by agent

* just do basic org wide search for now

* change message test to be about fresh data, cleanup after

---------

Co-authored-by: Ari Webb <ari@letta.com>
2025-11-24 19:10:27 -08:00
cthomas
34f5b5e33c feat: no user init messages for letta v1 agent (#6174) 2025-11-24 19:09:32 -08:00
Christina Tong
881831501a feat: filter list agents by stop reason [LET-5928] (#5779)
* feat: add last_stop_reason to AgentState [LET-5911]

* feat: filter list agents by stop reason [LET-5928]

* undo agent loop changes, use update_run_by_id_async

* add run manager test

* add integration tests

* remove comment

* fix duplicate

* fix docs
2025-11-13 15:36:55 -08:00
Christina Tong
5fddf94ac3 fix: pagination broken in runs table [LET-5790] (#5759)
* fix: pagination broken in runs table [LET-5790]

* update pagination test

* fix test
2025-11-13 15:35:34 -08:00
Kian Jones
704d3b2d79 chore: refactor not to use warnings.warn (#5730)
* refactor not to use warnings.warn

* temp circular import fix maybe unecessary/bnad

* fix Deprecation warning

* fix deprecation warning and mcp thing?

* revert changes to mcp server test

* fix deprecation warning
2025-10-24 15:14:31 -07:00
cthomas
afdf0f80e3 feat: add backend support for agent relationship loads (#5693) 2025-10-24 15:14:09 -07:00
Kevin Lin
35b5383724 feat: match line number rendering to Anthropic / OAI defaults (#5492) 2025-10-24 15:13:15 -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
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
cthomas
7565fc4a00 feat: remove boot messages for new agent loop (#5048) 2025-10-07 17:50:47 -07:00
Sarah Wooders
354205f581 feat: create new runs table [LET-4467] (#4841) 2025-10-07 17:50:47 -07:00
Charles Packer
a4041879a4 feat: add new agent loop (squash rebase of OSS PR) (#4815)
* feat: squash rebase of OSS PR

* fix: revert changes that weren't on manual rebase

* fix: caught another one

* fix: disable force

* chore: drop print

* fix: just stage-api && just publish-api

* fix: make agent_type consistently an arg in the client

* fix: patch multi-modal support

* chore: put in todo stub

* fix: disable hardcoding for tests

* fix: patch validate agent sync (#4882)

patch validate agent sync

* fix: strip bad merge diff

* fix: revert unrelated diff

* fix: react_v2 naming -> letta_v1 naming

* fix: strip bad merge

---------

Co-authored-by: Kevin Lin <klin5061@gmail.com>
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
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
13d8eae9ef chore: Move environment to settings [LET-4080] (#4265)
Move environment to settings
2025-08-27 14:52:35 -07:00
Andy Li
ff718d8c40 feat: uv migration (#3493)
* uv migration

smaller runners, freeze test runs, remove dev, ruff,hatchling, previw,
poetry, generates wheel, installs wheel, docker

* fix tests and dependency groups

* test fixes

* test fixing and main

* resolve merge conflict

* dev + test dependency group

* Test

* trigger CI

* trigger CI

* add debugging info

* trigger CI

* uv for reusable and sdk preview

* resolve mc and reformat black

* staged-api

* mypy

* fix fern

* prod Dockerfile

* model sweep, and project.toml and uvlock

* --group test -> --extra dev

* remove redundant --extra dev and rename tests to dev

* sdk backwards compat install sqlite

* install sqlite group for sdk-backwards-compat

* install uv on gh runner for cloud-api-integration-tests

* stage+publish

* pytest asyncio

* bug causing pytest package to get removed

* try to fix async event loop issues

* migrate to --with google-cloud-secret-manager

---------

Co-authored-by: Kian Jones <kian@letta.com>
2025-08-26 18:11:09 -07:00
Charles Packer
bb57f9cca4 fix: allow for send_message to be unterminated if the user requests it (#4169) 2025-08-25 21:11:14 -07:00
cthomas
578c30c448 feat: add prompt generator for on the fly system prompt generation (#4060) 2025-08-20 15:49:40 -07:00
Andy Li
49f7216a14 docs: update for manager funcs 2025-08-15 13:55:10 -07:00
Sarah Wooders
f4740b1388 chore: remove legacy embeddings (#3846) 2025-08-12 15:11:09 -07:00
cthomas
9a2caeb0bc feat: offload jinja to threadpool LET-3615 (#3787) 2025-08-06 16:34:28 -07:00
cthomas
8faa8711bc feat: remove redundant memory compilation in agent step (#3785) 2025-08-06 15:46:18 -07:00
Matthew Zhou
10f6f1d247 feat: Implement archival sharing (#3689) 2025-08-01 23:34:49 -07:00
cthomas
fac11bec2c fix: voice endpoint null check (#3690) 2025-07-31 16:11:23 -07:00
cthomas
fb7615be0c feat: convert compile system prompt to async (#3685) 2025-07-31 15:49:59 -07:00
jnjpng
9d8a122da0 fix: lmstudio support for qwen and llama
Co-authored-by: Jin Peng <jinjpeng@Jins-MacBook-Pro.local>
Co-authored-by: Charles Packer <packercharles@gmail.com>
2025-07-29 15:57:20 -07:00
Kevin Lin
99c479cd78 feat: add max files and file open window to system prompt (#3515) 2025-07-23 17:05:53 -07:00
Matthew Zhou
e62ddf8355 feat: Add per-agent file management controls with context-aware defaults (#3467) 2025-07-22 10:43:37 -07:00
Charles Packer
252dff6cd7 fix: don't include archival memory metadata summary unless something is in it (#3179) 2025-07-21 15:50:51 -07:00
cthomas
b530527a91 feat: only load specified relationships for agents (#3438) 2025-07-20 22:11:46 -07:00
cthomas
810628acd9 feat: remove organization from pydantic message model (#3411) 2025-07-19 09:28:54 -07:00
Andy Li
1ccaae8960 chore: cleanup database detection 2025-07-18 17:12:56 -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
ec1b2c823a feat: Integrate performant validate_agent_exists_async (#3350) 2025-07-15 17:15:33 -07:00
Matthew Zhou
be1448e729 fix: Add comprehensive testing for tool creation paths (#3255) 2025-07-09 15:51:50 -07:00
Kevin Lin
f2f25d3bac feat: replace file descriptions with per data source description (#3067)
Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
2025-07-01 11:51:52 -07:00
Matthew Zhou
0bf797fab6 feat: Add back multi agent tools and protections for cloud (#3100) 2025-06-29 22:45:39 -07:00
Matthew Zhou
9cf2f2d86b feat: Exclude archival tools on new agent creation (#3072) 2025-06-27 14:10:17 -07:00
Charles Packer
23ba9ddbd5 feat: add workflow and react agent types (#3006)
Co-authored-by: Matthew Zhou <mattzh1314@gmail.com>
2025-06-26 16:12:31 -07:00