Commit Graph

29 Commits

Author SHA1 Message Date
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
Kian Jones
25d54dd896 chore: enable F821, F401, W293 (#9503)
* auto fixes

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

* manual fixes (ignored or letta-code fixed)

* fix circular import
2026-02-24 10:55:08 -08:00
Sarah Wooders
50a60c1393 feat: git smart HTTP for agent memory repos (#9257)
* feat(core): add git-backed memory repos and block manager

Introduce a GCS-backed git repository per agent as the source of truth for core
memory blocks. Add a GitEnabledBlockManager that writes block updates to git and
syncs values back into Postgres as a cache.

Default newly-created memory repos to the `main` branch.

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

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

* feat(core): serve memory repos over git smart HTTP

Run dulwich's WSGI HTTPGitApplication on a local sidecar port and proxy
/v1/git/* through FastAPI to support git clone/fetch/push directly against
GCS-backed memory repos.

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

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

* fix(core): create memory repos on demand and stabilize git HTTP

- Ensure MemoryRepoManager creates the git repo on first write (instead of 500ing)
  and avoids rewriting history by only auto-creating on FileNotFoundError.
- Simplify dulwich-thread async execution and auto-create empty repos on first
  git clone.

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

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

* fix(core): make dulwich optional for CI installs

Guard dulwich imports in the git smart HTTP router so the core server can boot
(and CI tests can run) without installing the memory-repo extra.

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

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

* fix(core): guard git HTTP WSGI init when dulwich missing

Avoid instantiating dulwich's HTTPGitApplication at import time when dulwich
isn't installed (common in CI installs).

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

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

* fix(core): avoid masking send_message errors in finally

Initialize `result` before the agent loop so error paths (e.g. approval
validation) don't raise UnboundLocalError in the run-tracking finally block.

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

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

* fix(core): stop event loop watchdog on FastAPI shutdown

Ensure the EventLoopWatchdog thread is stopped during FastAPI lifespan
shutdown to avoid daemon threads logging during interpreter teardown (seen in CI
unit tests).

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

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

* chore(core): remove send_*_message_to_agent from SyncServer

Drop send_message_to_agent and send_group_message_to_agent from SyncServer and
route internal fire-and-forget messaging through send_messages helpers instead.

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

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

* fix(core): backfill git memory repo when tag added

When an agent is updated to include the git-memory-enabled tag, ensure the
git-backed memory repo is created and initialized from the agent's current
blocks. Also support configuring the memory repo object store via
LETTA_OBJECT_STORE_URI.

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

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

* fix(core): preserve block tags on git-enabled updates

When updating a block for a git-memory-enabled agent, keep block tags in sync
with PostgreSQL (tags are not currently stored in the git repo).

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

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

* chore(core): remove git-state legacy shims

- Rename optional dependency extra from memory-repo to git-state
- Drop legacy object-store env aliases and unused region config
- Simplify memory repo metadata to a single canonical format
- Remove unused repo-cache invalidation helper

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

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

* fix(core): keep PR scope for git-backed blocks

- Revert unrelated change in fire-and-forget multi-agent send helper
- Route agent block updates-by-label through injected block manager only when needed

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

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

---------

Co-authored-by: Letta <noreply@letta.com>
2026-02-24 10:52:06 -08:00
Ari Webb
6d859174c2 feat: make conversations throw http busy to stop race condition [LET-6842] (#8411)
* feat: make conversations throw http busy to stop race condition

* use redis lock instead

* move acquire lock into redis client, integration tests, move lock release into run manager

* fix tests, bug

* conditional import

* remove else

* better release

* run ci

* final reordering lock

* update tests

* wrong naming of lock holder token
2026-01-12 10:57:49 -08:00
cthomas
399b633899 feat: add redis stream support (#4144) 2025-08-24 17:15:34 -07:00
Sarah Wooders
20a857b900 chore: remove legacy embeddings (#3846) 2025-08-12 15:11:09 -07:00
cthomas
f1c936a59d chore: move settings import (#3698) 2025-07-31 23:21:14 -07:00
Andy Li
971fc37cdb fix: redis plugin testing (#2938) 2025-06-20 13:35:35 -07:00
Matthew Zhou
8ef81aefc9 fix: Fix redis client starting even with LETTA_REDIS_PORT and LETTA_REDIS_HOST are unset (#2833) 2025-06-15 20:48:33 -07:00
Andy Li
336896dc5c feat: redis user caching (#2774) 2025-06-12 17:32:07 -07:00
cthomas
c300e58db9 chore: create file manager (#2693) 2025-06-07 16:14:41 -07:00
Andy Li
fe317068f6 feat: plugin system and backend runtime flags (#2543) 2025-06-05 18:12:44 -07:00
Andy Li
831b7d5862 chore: cleanup (#2480) 2025-05-29 10:40:41 -07:00
Sarah Wooders
729414e7a9 feat: concurrently make embedding request and use async client for OpenAI (#2482)
Co-authored-by: Matthew Zhou <mattzh1314@gmail.com>
2025-05-28 11:35:22 -07:00
cthomas
4dff6b648a feat(asyncify): migrate upload and attach source (#2432) 2025-05-25 23:09:14 -07:00
Sarah Wooders
1d2f8d86e9 feat(asyncify): migrate sources to async (#2332) 2025-05-22 19:39:44 -07:00
Sarah Wooders
626e5f62ca chore: add sleeptime example + better error handling + upgrade client SDK (#1809) 2025-04-21 00:09:50 -07:00
Matthew Zhou
2a9a96a7ba chore: Various updates and improvements (#1247)
Co-authored-by: Charles Packer <packercharles@gmail.com>
Co-authored-by: cthomas <caren@letta.com>
Co-authored-by: Shubham Naik <shubham.naik10@gmail.com>
Co-authored-by: Shubham Naik <shub@memgpt.ai>
Co-authored-by: mlong93 <35275280+mlong93@users.noreply.github.com>
Co-authored-by: Mindy Long <mindy@letta.com>
Co-authored-by: Kevin Lin <klin5061@gmail.com>
Co-authored-by: Stephan Fitzpatrick <stephan@knowsuchagency.com>
Co-authored-by: dboyliao <qmalliao@gmail.com>
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
Co-authored-by: Jyotirmaya Mahanta <jyotirmaya.mahanta@gmail.com>
Co-authored-by: Nicholas <102550462+ndisalvio3@users.noreply.github.com>
Co-authored-by: tarunkumark <tkksctwo@gmail.com>
Co-authored-by: Miao <one.lemorage@gmail.com>
Co-authored-by: Krishnakumar R (KK) <65895020+kk-src@users.noreply.github.com>
Co-authored-by: Shubham Naik <shub@letta.com>
Co-authored-by: Will Sargent <will.sargent@gmail.com>
2025-03-11 14:46:45 -07:00
cthomas
98c5702ef9 chore: rename metadata_ field to metadata in pydantic (#732) 2025-01-22 19:05:41 -08:00
Caren Thomas
7144fd2867 run black, add isort config to pyproject.toml 2024-12-26 19:43:11 -08:00
Caren Thomas
905906d416 run isort on apps/core 2024-12-26 19:27:09 -08:00
Shubham Naik
4cf354c033 fix: add tests to cypress 2024-12-23 14:44:08 -08:00
mlong93
be274749fc feat: archival memory file upload (#2228)
Co-authored-by: Mindy Long <mindy@letta.com>
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2024-12-12 11:36:26 -08:00
mlong93
2307739ff3 chore: removed agent_store, storage connectors (#2229)
Co-authored-by: Mindy Long <mindy@letta.com>
2024-12-11 15:14:26 -08:00
mlong93
9deacbd89e feat: orm passage migration (#2180)
Co-authored-by: Mindy Long <mindy@letta.com>
2024-12-10 18:09:35 -08:00
Matthew Zhou
d23c0c8cf4 chore: Migrate FileMetadata to ORM (#2028) 2024-11-13 10:59:46 -08:00
Matthew Zhou
e40e60945a feat: Move Source to ORM model (#1979) 2024-11-12 09:57:40 -08:00
Matthew Zhou
93aacc087e feat: Enable adding files (#1864)
Co-authored-by: Matt Zhou <mattzhou@Matts-MacBook-Pro.local>
2024-10-14 10:22:45 -07:00
Sarah Wooders
8ae1e64987 chore: migrate package name to letta (#1775)
Co-authored-by: Charles Packer <packercharles@gmail.com>
Co-authored-by: Shubham Naik <shubham.naik10@gmail.com>
Co-authored-by: Shubham Naik <shub@memgpt.ai>
2024-09-23 09:15:18 -07:00