Commit Graph

95 Commits

Author SHA1 Message Date
Sarah Wooders
0dde155e9a feat: Prefix cache optimization system prompt (#9381) 2026-02-24 10:52:07 -08:00
Cameron
89a7a12b38 fix(core): remove send_message tool requirement from A2A messages (#9383)
The A2A messaging tools were instructing receiving agents to use the
send_message tool to reply, but that tool is often not attached to
agents anymore. This caused agents confusion when they couldn't find
the required tool.

For synchronous functions (send_message_to_agent_and_wait_for_reply,
send_message_to_agents_matching_tags, send_message_to_all_agents_in_group),
the system already captures AssistantMessage automatically, so agents
just need to respond normally.

For the async/fire-and-forget function (send_message_to_agent_async),
updated to indicate it's a one-way notification and hint that messaging
tools exist without requiring a specific one.

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

Co-authored-by: Letta <noreply@letta.com>
2026-02-24 10:52:07 -08:00
Sarah Wooders
526da4c49b Revert "perf: optimize prefix caching by skipping system prompt rebuild on every step" (#9380)
Revert "perf: optimize prefix caching by skipping system prompt rebuild on ev…"

This reverts commit eafa4144c2577a45b7007a177b701863b98d1dfa.
2026-02-24 10:52:07 -08:00
Sarah Wooders
9dbe28e8f1 perf: optimize prefix caching by skipping system prompt rebuild on every step (#9080) 2026-02-24 10:52:07 -08:00
Charles Packer
f58c4a43fa fix(core): remove "edit again if necessary" from memory tool return message (#9367)
Models (especially Opus) take this instruction literally and re-call
the memory edit tool in a loop — one user saw 96 consecutive rethink
calls. Dropping the sentence stops the feedback loop while still
asking the agent to review the result.

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

Co-authored-by: Letta <noreply@letta.com>
2026-02-24 10:52:07 -08:00
Sarah Wooders
3fdf2b6c79 chore: deprecate old agent messaging (#9120) 2026-02-24 10:52:06 -08:00
Kevin Lin
b5519f02fb feat: make tool return messages more explicit [LET-7145] (#8986)
prompt
2026-01-29 12:43:53 -08:00
Ari Webb
7a104a74fe fix: allow conversation_search time only queries [LET-7094] (#8939)
fix: allow conversation_search time only queries
2026-01-19 15:54:44 -08:00
Kevin Lin
8872c2b5d3 feat: extend memory_apply_patch for memory block create and delete (#8832)
* update memory_apply_patch for memory block create and delete

* update docstring

* update docstring

* fix label

* working
2026-01-19 15:54:42 -08:00
Kevin Lin
758b74b9c4 feat: rename memory tool arguments for consistency with edit tool [LET-6972] (#8631)
* update names

* stage

* chore: retrigger linear workflow
2026-01-19 15:54:41 -08:00
cthomas
9b5067bed9 fix: remove unused sync code (#8613)
* chore: remove unused sync code

* chore: remove deprecated sync Google AI functions

Removes unused sync functions that used httpx.Client (blocking):
- google_ai_get_model_details()
- google_ai_get_model_context_window()
- GoogleGeminiProvider.get_model_context_window()

All code now uses async versions with httpx.AsyncClient.

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

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

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-19 15:54:37 -08:00
Ari Webb
956e7783ad feat: add ids to archival memory search [LET-6642] (#8355)
* feat: add id to archival memory search tool

* stage api
2026-01-12 10:57:48 -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
Cameron
a56c6571d2 fix: update fetch_webpage docstring to reflect actual implementation (#6503)
The docstring incorrectly stated that fetch_webpage uses Jina AI reader.
Updated to accurately describe the actual implementation which uses:
1. Exa API (if EXA_API_KEY is available)
2. Trafilatura (fallback)
3. Readability + html2text (final fallback)

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

Co-authored-by: Letta <noreply@letta.com>
2025-12-15 12:02:34 -08:00
Sarah Wooders
ceadacd30e feat: support programmatic tool execution (cloud only) (#6441) 2025-12-15 12:02:19 -08:00
Cameron
bd5f684346 Update archival memory docstrings for clarity (#6098)
* Update archival memory docstrings for clarity

Improved docstrings for archival_memory_insert and archival_memory_search to:
- Better explain when and how to use these tools
- Provide clearer best practices
- Include more realistic examples (meeting notes, project updates)
- Emphasize semantic search vs keyword matching
- Clarify tag filtering behavior

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

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

* examples

---------

Co-authored-by: Letta <noreply@letta.com>
Co-authored-by: Kevin Lin <kl2806@columbia.edu>
2025-11-13 15:36:56 -08:00
Kevin Lin
f65eaa10c1 feat: Remove view from anthropic tool (#5832)
remove view from anthropic tool
2025-11-13 15:36:14 -08: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
Sarah Wooders
6016ac0f33 chore: undo fetch_webpage rename (#5132) 2025-10-07 17:50:49 -07:00
Charles Packer
09b173668a feat(core): rename fetch_webpage to web_fetch (#5110) 2025-10-07 17:50:48 -07:00
Kevin Lin
09d9c3ffd4 feat: anthropic tools for claude sonnet 4.5 (#4988)
* add anthropic memory tools

* memory view working

* update memory examples

* tools

* feat: some changes (#5003)

* feat: added the ability to modify and add descriptions on creation

* fix: kill dead code & write into core_tool_executor instead

* fix: use block_manager not agent_manager where possible, also turn the return string errors into raising exceptions

* fix: cleanup, get rid of more return string errors replaced with valueerror, also drop deadcode

---------

Co-authored-by: Charles Packer <packercharles@gmail.com>
2025-10-07 17:50:47 -07:00
Sarah Wooders
4df0a27eb0 chore: remove sync db (#4873) 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
Charles Packer
388dd46ffc feat: various performance patches for gpt-5 [LET-4157] (#4381)
* feat: increase the verbosity of the heartbeat kwarg

* chore: strip docstrings out from the file in which they are not parsed (duplicates inside base.py

* feat: add examples to the docstrings for memory_replace and memory_insert

* feat: add more examples
2025-09-06 11:23:13 -07:00
Matthew Zhou
415ae5a928 chore: Add more prompting around archival datetime (#4432)
Add more prompting around archival datetime
2025-09-04 15:31:49 -07:00
Matthew Zhou
dda4459245 feat: Make end date inclusive on conversation search (#4431)
Make end date inclusive
2025-09-04 15:26:49 -07:00
Matthew Zhou
d924cc005b fix: change to pure rank-based RRF for relevance ordering (#4411)
* Fix RRF

* Fix turbopuffer tests
2025-09-03 17:33:19 -07:00
Matthew Zhou
2af6049d6f feat: Change web search to exa [LET-4190] (#4401)
* Change web search to exa

* Fix tf/justfile

* add exa api key for integration test

* Mock exa

---------

Co-authored-by: Kian Jones <kian@letta.com>
2025-09-03 15:52:10 -07:00
Matthew Zhou
129dd97902 feat: Add fetch webpage tool [LET-4188] (#4395)
* Add fetch webpage tool

* Use trafilatura for web extraction
2025-09-03 13:34:35 -07:00
Matthew Zhou
8f425aa024 feat: Modify conversation search tool to be hybrid (#4362)
* Modify conversation search functionality

* Gate the roles
2025-09-02 13:45:53 -07:00
Matthew Zhou
0854ba0d01 feat: Support timestamp filtering for archival memories [LET-3469] (#4330)
Finish temporal filtering
2025-08-30 19:31:07 -07:00
Matthew Zhou
b1f2e8b2bc feat: Allow agent archival tools to insert/search with tags [LET-4072] (#4300)
* Finish modifying archival memory tools

* Add tags

* Add disabled test
2025-08-29 11:55:06 -07:00
Matthew Zhou
d797296032 feat: Support basic upload/querying on tpuf [LET-3465] (#4255)
* wip implementing turbopuffer

* Move imports up

* Add type of archive

* Integrate turbopuffer functionality

* Debug turbopuffer tests failing

* Fix turbopuffer

* Run fern

* Fix multiple heads
2025-08-28 10:39:16 -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
Matthew Zhou
c3eefbc3d6 fix: Fix 0 indexing for offset (#4086) 2025-08-21 14:29:51 -07:00
Sarah Wooders
f4740b1388 chore: remove legacy embeddings (#3846) 2025-08-12 15:11:09 -07:00
Kevin Lin
18b036fa07 feat: add line number warning to memory_insert (#3829) 2025-08-08 13:47:13 -07:00
Sarah Wooders
bde4714294 chore: merge oss (#3712) 2025-08-07 22:20:26 -07:00
Matthew Zhou
6a713f9ae7 feat: Change grep to be paginated (#3815) 2025-08-07 16:50:05 -07:00
Sarah Wooders
f6f3abdeda fix: patch non-optional memory replace (#3803) 2025-08-07 13:51:12 -07:00
Matthew Zhou
10f6f1d247 feat: Implement archival sharing (#3689) 2025-08-01 23:34:49 -07:00
Matthew Zhou
eacaa2b02a feat: Change defaults on web search tool (#3646) 2025-07-29 22:23:37 -07:00
Andy Li
04e9f43220 chore: strings lint cleanup (#3374) 2025-07-18 09:20:45 -07:00
Kevin Lin
0ea6686510 feat: update system prompt with file and search instructions (#3298) 2025-07-14 11:20:55 -07:00
Kevin Lin
98b691a553 feat: remove persona/human from tool descriptions (#3250)
Co-authored-by: Charles Packer <packercharles@gmail.com>
2025-07-10 21:45:00 -07:00
Matthew Zhou
954675396f feat: Add pinecone for cloud embedding (#3160) 2025-07-03 22:37:55 -07:00
Matthew Zhou
243d3d040b feat: Add close all files functionality (#3139) 2025-07-02 14:27:38 -07:00
Matthew Zhou
e495fb2ef2 feat: Various file fixes and improvements (#3125) 2025-07-01 15:21:52 -07:00