Repository Analysis

letta-ai/letta

Letta is the platform for building stateful agents: AI with advanced memory that can learn and self-improve over time.

36.6 Strong AI signal View on GitHub
36.6
Adjusted Score
36.6
Raw Score
100%
Time Factor
2026-05-14
Last Push
23,045
Stars
Python
Language
263,171
Lines of Code
1091
Files
6450
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 4HIGH 377MEDIUM 1007LOW 5062

Pattern Findings

6450 matches across 19 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers2976 hits · 2505 pts
SeverityFileLineSnippet
LOWtests/test_modal_sandbox_v2.py18 def test_execute_tool_dynamic_success(self):
LOWtests/test_modal_sandbox_v2.py42 def test_execute_tool_dynamic_with_error(self):
LOWtests/test_modal_sandbox_v2.py92 def test_execute_with_stdout_capture(self):
LOWtests/test_modal_sandbox_v2.py124 async def test_register_and_get_deployment(self):
LOWtests/test_modal_sandbox_v2.py374 def test_version_hash_calculation(self, mock_tool, mock_user, mock_sandbox_config):
LOWtests/test_modal_sandbox_v2.py450 async def test_run_with_mocked_modal(self, mock_tool, mock_user, mock_sandbox_config):
LOWtests/test_modal_sandbox_v2.py537 def test_detect_async_function(self, mock_user):
LOWtests/test_context_window_calculator.py16 def test_returns_none_for_missing_tag(self):
LOWtests/test_context_window_calculator.py21 def test_returns_none_for_missing_opening_tag(self):
LOWtests/test_context_window_calculator.py26 def test_returns_none_for_unclosed_tag(self):
LOWtests/test_context_window_calculator.py31 def test_handles_multiline_content(self):
LOWtests/test_context_window_calculator.py36 def test_handles_nested_content(self):
LOWtests/test_context_window_calculator.py41 def test_handles_empty_content(self):
LOWtests/test_context_window_calculator.py46 def test_extracts_first_occurrence_with_duplicate_tags(self):
LOWtests/test_context_window_calculator.py56 def test_extracts_standard_agent_sections(self):
LOWtests/test_context_window_calculator.py106 def test_extracts_tool_usage_rules(self):
LOWtests/test_context_window_calculator.py181 def test_returns_correct_dict_keys(self):
LOWtests/test_context_window_calculator.py194 def test_no_base_instructions_tag_extracts_preamble(self):
LOWtests/test_context_window_calculator.py216 def test_nested_memory_filesystem_not_extracted_as_top_level(self):
LOWtests/test_context_window_calculator.py244 def test_top_level_memory_filesystem_outside_memory_blocks(self):
LOWtests/test_context_window_calculator.py266 def test_letta_code_agent_real_format(self):
LOWtests/test_context_window_calculator.py320 def test_git_enabled_agent_bare_file_blocks_captured_as_core_memory(self):
LOWtests/test_context_window_calculator.py354 def test_git_enabled_agent_no_bare_blocks(self):
LOWtests/test_context_window_calculator.py367 def test_extract_top_level_tag_dual_occurrence_nested_first(self):
LOWtests/test_context_window_calculator.py380 def test_extract_system_prompt_pure_text_no_tags(self):
LOWtests/test_context_window_calculator.py388 def test_git_backed_memory_without_memory_blocks_wrapper(self):
LOWtests/test_context_window_calculator.py478 async def test_calculate_context_window_standard_agent(self):
LOWtests/test_context_window_calculator.py519 async def test_calculate_context_window_skips_empty_sections(self):
LOWtests/test_context_window_calculator.py546 async def test_calculate_context_window_all_sections(self):
LOWtests/test_context_window_calculator.py598 async def test_calculate_context_window_git_enabled_agent(self):
LOWtests/test_context_window_calculator.py88 def test_extracts_git_enabled_agent_sections(self):
LOWtests/test_context_window_calculator.py121 def test_extracts_directories(self):
LOWtests/test_context_window_calculator.py141 def test_handles_react_agent_no_memory_blocks(self):
LOWtests/test_context_window_calculator.py157 def test_handles_all_sections_present(self):
LOWtests/test_context_window_calculator.py176 def test_handles_empty_string(self):
LOWtests/test_context_window_calculator.py423 def test_legacy_memory_blocks_wrapper(self):
LOWtests/test_openai_ws_session.py56 async def test_iteration_without_context_manager(self):
LOWtests/test_openai_ws_session.py77 async def test_aclose_is_idempotent(self):
LOWtests/test_openai_ws_session.py84 async def test_stream_after_close_raises(self):
LOWtests/test_openai_ws_session.py100 async def test_stream_responses_yields_events_and_stops_on_terminal(self):
LOWtests/test_openai_ws_session.py162 def test_letta_llm_stream_adapter_stores_flag(self):
LOWtests/test_openai_ws_session.py178 def test_default_flag_is_false(self):
LOWtests/test_openai_ws_session.py193 async def test_aclose_default_is_noop(self):
LOWtests/integration_test_turbopuffer.py163def test_should_use_tpuf_with_settings():
LOWtests/integration_test_turbopuffer.py356async def test_native_only_operations(server, default_user, sarah_agent, disable_turbopuffer):
LOWtests/integration_test_turbopuffer.py1899async def test_archive_namespace_tracking(server, default_user, enable_turbopuffer):
LOWtests/integration_test_turbopuffer.py190async def test_archive_creation_with_tpuf_enabled(server, default_user, enable_turbopuffer):
LOWtests/integration_test_turbopuffer.py200async def test_archive_creation_with_tpuf_disabled(server, default_user, disable_turbopuffer):
LOWtests/integration_test_turbopuffer.py211async def test_dual_write_and_query_with_real_tpuf(server, default_user, sarah_agent, enable_turbopuffer):
LOWtests/integration_test_turbopuffer.py287async def test_turbopuffer_metadata_attributes(default_user, enable_turbopuffer):
LOWtests/integration_test_turbopuffer.py390async def test_hybrid_search_with_real_tpuf(default_user, enable_turbopuffer):
LOWtests/integration_test_turbopuffer.py496async def test_tag_filtering_with_real_tpuf(default_user, enable_turbopuffer):
LOWtests/integration_test_turbopuffer.py623async def test_temporal_filtering_with_real_tpuf(default_user, enable_turbopuffer):
LOWtests/integration_test_turbopuffer.py761def test_should_use_tpuf_for_messages_settings():
LOWtests/integration_test_turbopuffer.py803def test_message_text_extraction(server, default_user):
LOWtests/integration_test_turbopuffer.py946async def test_message_embedding_without_config(server, default_user, sarah_agent, enable_message_embedding):
LOWtests/integration_test_turbopuffer.py984async def test_generic_reciprocal_rank_fusion():
LOWtests/integration_test_turbopuffer.py1085async def test_message_dual_write_with_real_tpuf(enable_message_embedding, default_user):
LOWtests/integration_test_turbopuffer.py1147async def test_message_vector_search_with_real_tpuf(enable_message_embedding, default_user):
LOWtests/integration_test_turbopuffer.py1208async def test_message_hybrid_search_with_real_tpuf(enable_message_embedding, default_user):
2916 more matches not shown…
Decorative Section Separators504 hits · 1745 pts
SeverityFileLineSnippet
MEDIUMconf.yaml56 # =============================================================================
MEDIUMconf.yaml58 # =============================================================================
MEDIUMconf.yaml63 # =============================================================================
MEDIUMconf.yaml65 # =============================================================================
MEDIUMconf.yaml71 # =============================================================================
MEDIUMconf.yaml73 # =============================================================================
MEDIUMconf.yaml106 # =============================================================================
MEDIUMconf.yaml108 # =============================================================================
MEDIUMconf.yaml112 # =============================================================================
MEDIUMconf.yaml114 # =============================================================================
MEDIUMconf.yaml117 # =============================================================================
MEDIUMconf.yaml119 # =============================================================================
MEDIUMconf.yaml126 # =============================================================================
MEDIUMconf.yaml128 # =============================================================================
MEDIUMconf.yaml133 # =============================================================================
MEDIUMconf.yaml135 # =============================================================================
MEDIUMconf.yaml143 # =============================================================================
MEDIUMconf.yaml145 # =============================================================================
MEDIUMconf.yaml153 # =============================================================================
MEDIUMconf.yaml155 # =============================================================================
MEDIUMconf.yaml160 # =============================================================================
MEDIUMconf.yaml162 # =============================================================================
MEDIUMconf.yaml166 # =============================================================================
MEDIUMconf.yaml168 # =============================================================================
MEDIUMconf.yaml172 # =============================================================================
MEDIUMconf.yaml174 # =============================================================================
MEDIUMconf.yaml178 # =============================================================================
MEDIUMconf.yaml180 # =============================================================================
MEDIUMconf.yaml183 # =============================================================================
MEDIUMconf.yaml185 # =============================================================================
MEDIUMconf.yaml200 # =============================================================================
MEDIUMconf.yaml202 # =============================================================================
MEDIUMconf.yaml209 # =============================================================================
MEDIUMconf.yaml211 # =============================================================================
MEDIUMconf.yaml12 # =============================================================================
MEDIUMconf.yaml14 # =============================================================================
MEDIUMconf.yaml27 # =============================================================================
MEDIUMconf.yaml29 # =============================================================================
MEDIUMconf.yaml92 # =============================================================================
MEDIUMconf.yaml94 # =============================================================================
MEDIUMconf.yaml231# =============================================================================
MEDIUMconf.yaml233# =============================================================================
MEDIUMconf.yaml334# =============================================================================
MEDIUMconf.yaml336# =============================================================================
MEDIUMconf.yaml370# =============================================================================
MEDIUMconf.yaml372# =============================================================================
MEDIUMtests/integration_test_client_side_tools.py16# ------------------------------
MEDIUMtests/integration_test_client_side_tools.py18# ------------------------------
MEDIUMtests/integration_test_client_side_tools.py47# ------------------------------
MEDIUMtests/integration_test_client_side_tools.py49# ------------------------------
MEDIUMtests/integration_test_client_side_tools.py58# ------------------------------
MEDIUMtests/integration_test_client_side_tools.py60# ------------------------------
MEDIUMtests/test_utils.py70# -----------------------------------------------------------------------
MEDIUMtests/test_utils.py77# -----------------------------------------------------------------------
MEDIUMtests/integration_test_send_message.py1089# ------------------------------
MEDIUMtests/integration_test_send_message.py1091# ------------------------------
MEDIUMtests/integration_test_send_message.py2579# ============================
MEDIUMtests/integration_test_send_message.py2581# ============================
MEDIUMtests/integration_test_send_message.py37# ------------------------------
MEDIUMtests/integration_test_send_message.py39# ------------------------------
444 more matches not shown…
Cross-File Repetition273 hits · 1365 pts
SeverityFileLineSnippet
HIGHtests/test_multi_agent.py0fixture to create and return the default organization.
HIGHtests/conftest.py0fixture to create and return the default organization.
HIGHtests/integration_test_tool_execution_sandbox.py0fixture to create and return the default organization.
HIGHtests/integration_test_async_tool_sandbox.py0fixture to create and return the default organization.
HIGH…/integration_test_typescript_tool_execution_sandbox.py0fixture to create and return the default organization.
HIGHtests/test_embeddings.py0fixture to create and return the default organization.
HIGHtests/test_agent_serialization_v2.py0fixture to create and return the default organization.
HIGHtests/test_letta_agent_batch.py0fixture to create and return the default organization.
HIGHtests/integration_test_token_counters.py0fixture to create and return the default organization.
HIGHtests/integration_test_modal.py0fixture to create and return the default organization.
HIGHtests/test_managers.py0fixture to create and return the default organization.
HIGHtests/test_managers.py0fixture to create and return the default organization.
HIGHtests/test_agent_serialization.py0fixture to create and return the default organization.
HIGHtests/test_agent_serialization.py0fixture to create and return the default organization.
HIGHtests/test_server_providers.py0fixture to create and return the default organization.
HIGHtests/managers/test_provider_manager.py0fixture to create and return the default organization.
HIGH.github/scripts/model-sweep/conftest.py0fixture to create and return the default organization.
HIGHtests/test_multi_agent.py0fixture to create and return the default user within the default organization.
HIGHtests/conftest.py0fixture to create and return the default user within the default organization.
HIGHtests/integration_test_tool_execution_sandbox.py0fixture to create and return the default user within the default organization.
HIGHtests/integration_test_async_tool_sandbox.py0fixture to create and return the default user within the default organization.
HIGH…/integration_test_typescript_tool_execution_sandbox.py0fixture to create and return the default user within the default organization.
HIGHtests/test_embeddings.py0fixture to create and return the default user within the default organization.
HIGHtests/test_agent_serialization_v2.py0fixture to create and return the default user within the default organization.
HIGHtests/test_letta_agent_batch.py0fixture to create and return the default user within the default organization.
HIGHtests/integration_test_token_counters.py0fixture to create and return the default user within the default organization.
HIGHtests/integration_test_modal.py0fixture to create and return the default user within the default organization.
HIGHtests/test_managers.py0fixture to create and return the default user within the default organization.
HIGHtests/test_managers.py0fixture to create and return the default user within the default organization.
HIGHtests/test_managers.py0fixture to create and return the default user within the default organization.
HIGHtests/test_agent_serialization.py0fixture to create and return the default user within the default organization.
HIGHtests/test_agent_serialization.py0fixture to create and return the default user within the default organization.
HIGHtests/test_server_providers.py0fixture to create and return the default user within the default organization.
HIGHtests/managers/test_provider_manager.py0fixture to create and return the default user within the default organization.
HIGH.github/scripts/model-sweep/conftest.py0fixture to create and return the default user within the default organization.
HIGHtests/conftest.py0provides the url for the letta server. if letta_server_url is not set, starts the server in a background thread and poll
HIGHtests/integration_test_cancellation.py0provides the url for the letta server. if letta_server_url is not set, starts the server in a background thread and poll
HIGHtests/integration_test_async_tool_sandbox.py0provides the url for the letta server. if letta_server_url is not set, starts the server in a background thread and poll
HIGHtests/integration_test_send_message.py0provides the url for the letta server. if letta_server_url is not set, starts the server in a background thread and poll
HIGHtests/integration_test_override_model.py0provides the url for the letta server. if letta_server_url is not set, starts the server in a background thread and poll
HIGHtests/integration_test_multi_agent.py0provides the url for the letta server. if letta_server_url is not set, starts the server in a background thread and poll
HIGHtests/test_long_running_agents.py0provides the url for the letta server. if letta_server_url is not set, starts the server in a background thread and poll
HIGHtests/integration_test_sleeptime_agent.py0provides the url for the letta server. if letta_server_url is not set, starts the server in a background thread and poll
HIGHtests/integration_test_send_message_v2.py0provides the url for the letta server. if letta_server_url is not set, starts the server in a background thread and poll
HIGHtests/integration_test_mcp.py0provides the url for the letta server. if letta_server_url is not set, starts the server in a background thread and poll
HIGHtests/sdk/conftest.py0provides the url for the letta server. if letta_server_url is not set, starts the server in a background thread and poll
HIGHtests/sdk/mcp_servers_test.py0provides the url for the letta server. if letta_server_url is not set, starts the server in a background thread and poll
HIGHtests/conftest.py0creates and returns a synchronous letta rest client for testing.
HIGHtests/integration_test_async_tool_sandbox.py0creates and returns a synchronous letta rest client for testing.
HIGHtests/integration_test_send_message.py0creates and returns a synchronous letta rest client for testing.
HIGHtests/integration_test_override_model.py0creates and returns a synchronous letta rest client for testing.
HIGHtests/integration_test_system_prompt_prefix_caching.py0creates and returns a synchronous letta rest client for testing.
HIGHtests/integration_test_multi_agent.py0creates and returns a synchronous letta rest client for testing.
HIGHtests/test_long_running_agents.py0creates and returns a synchronous letta rest client for testing.
HIGHtests/integration_test_sleeptime_agent.py0creates and returns a synchronous letta rest client for testing.
HIGHtests/integration_test_builtin_tools.py0creates and returns a synchronous letta rest client for testing.
HIGHtests/integration_test_mcp.py0creates and returns a synchronous letta rest client for testing.
HIGHtests/sdk/conftest.py0creates and returns a synchronous letta rest client for testing.
HIGHtests/sdk/mcp_servers_test.py0creates and returns a synchronous letta rest client for testing.
HIGH.github/scripts/model-sweep/conftest.py0creates and returns a synchronous letta rest client for testing.
213 more matches not shown…
Self-Referential Comments436 hits · 1209 pts
SeverityFileLineSnippet
MEDIUMtests/locust_test.py21 # Create a user and get the token
MEDIUMtests/test_modal_sandbox_v2.py140 # Create a mock actor
MEDIUMtests/test_modal_sandbox_v2.py182 # Create a mock actor
MEDIUMtests/test_modal_sandbox_v2.py242 # Create a mock actor
MEDIUMtests/test_modal_sandbox_v2.py287 # Create a mock actor
MEDIUMtests/test_modal_sandbox_v2.py463 # Create a mock that has a remote attribute
MEDIUMtests/test_openai_ws_session.py200 # Create a concrete subclass just for testing
MEDIUMtests/integration_test_turbopuffer.py1901 # Create an archive
MEDIUMtests/integration_test_turbopuffer.py214 # Create a TPUF-enabled archive
MEDIUMtests/integration_test_turbopuffer.py634 # Create a unique archive ID for this test
MEDIUMtests/integration_test_turbopuffer.py2172 # Create a conversation
MEDIUMtests/integration_test_client_side_tools.py222 # Create the server-side tool
MEDIUMtests/test_utils.py708 # Create a dict that when serialized will exceed limit
MEDIUMtests/test_secret.py198 # Create a Secret from encrypted value
MEDIUMtests/integration_test_tool_execution_sandbox.py251 # Create the SandboxConfigManager
MEDIUMtests/integration_test_tool_execution_sandbox.py261 # Create the sandbox configuration
MEDIUMtests/integration_test_tool_execution_sandbox.py409 # Create a tool that uses the injected client and agent_id to actually clear a memory block
MEDIUMtests/integration_test_tool_execution_sandbox.py456 # Create the tool
MEDIUMtests/integration_test_tool_execution_sandbox.py479 # Create the tool in the system
MEDIUMtests/integration_test_tool_execution_sandbox.py482 # Create an agent with a memory block
MEDIUMtests/integration_test_tool_execution_sandbox.py500 # Create the sandbox for the tool
MEDIUMtests/integration_test_async_tool_sandbox.py321 # Create the SandboxConfigManager
MEDIUMtests/integration_test_async_tool_sandbox.py331 # Create the sandbox configuration
MEDIUMtests/integration_test_async_tool_sandbox.py1246 # Create the tool with proper schema
MEDIUMtests/integration_test_async_tool_sandbox.py1282 # Create the sandbox and verify client injection is detected
MEDIUMtests/integration_test_async_tool_sandbox.py1343 # Create the sandbox and verify client injection is detected
MEDIUMtests/integration_test_send_message.py2385# # Create a streaming request
MEDIUMtests/integration_test_override_model.py373 # Create a conversation
MEDIUMtests/integration_test_summarizer.py111 # Create a realistic-looking tool return with repeated data
MEDIUMtests/integration_test_summarizer.py1451# # Create an input message to trigger the agent
MEDIUMtests/integration_test_summarizer.py1457# # Create a proper run record in the database
MEDIUMtests/integration_test_summarizer.py1466# # Create the agent loop using LettaAgentV3
MEDIUMtests/integration_test_summarizer.py1485# # Create a mock response with the required structure
MEDIUMtests/integration_test_summarizer.py1634# # Create an input message to trigger the agent
MEDIUMtests/integration_test_summarizer.py1640# # Create a proper run record in the database
MEDIUMtests/integration_test_summarizer.py1649# # Create the agent loop using LettaAgentV3
MEDIUMtests/integration_test_summarizer.py1666# # Create a mock response with the required structure
MEDIUMtests/integration_test_summarizer.py333 # Create a small conversation with ~5 messages
MEDIUMtests/integration_test_summarizer.py396 # Create a large tool return
MEDIUMtests/integration_test_summarizer.py589# # Create an extremely large tool return (100k chars)
MEDIUMtests/integration_test_summarizer.py694 # Create a conversation with enough messages to trigger summarization
MEDIUMtests/integration_test_summarizer.py792 # Create a conversation with enough messages to summarize
MEDIUMtests/integration_test_summarizer.py868 # Create a conversation with enough messages to summarize
MEDIUMtests/integration_test_summarizer.py1048 # Create the V3 agent loop
MEDIUMtests/integration_test_summarizer.py1127 # Create a real summarizer config using the default factory
MEDIUMtests/integration_test_summarizer.py1229 # Create a real summarizer config using the default factory
MEDIUMtests/integration_test_summarizer.py1343# # Create a run for the agent using RunManager
MEDIUMtests/integration_test_summarizer.py1347# # Create the agent loop using LettaAgentV3
MEDIUMtests/integration_test_summarizer.py1387# # Create a new run for the repaired agent
MEDIUMtests/integration_test_summarizer.py1391# # Create a new agent loop with the repaired agent state
MEDIUMtests/integration_test_summarizer.py1789 # Create a summarizer config with "all" mode
MEDIUMtests/integration_test_summarizer.py1862 # Create a summarizer config with "self" mode
MEDIUMtests/integration_test_summarizer.py2232 # Create a conversation with enough messages to summarize
MEDIUMtests/test_sonnet_nonnative_reasoning_buffering.py153 # Create the stream
MEDIUM…/integration_test_typescript_tool_execution_sandbox.py292 # Create a TypeScript tool that has 'agent_state' in its parameters
MEDIUM…/integration_test_typescript_tool_execution_sandbox.py435 # Create a tool that checks if the client variable exists
MEDIUM…/integration_test_typescript_tool_execution_sandbox.py480 # Create a tool that uses the 'lodash' npm package
MEDIUMtests/test_agent_serialization_v2.py337 # Create a mock MCP tool
MEDIUMtests/test_internal_agents_count.py46 # Create a simple AgentState-like object for tracking
MEDIUMtests/test_letta_agent_batch.py432 # Create the mock for results
376 more matches not shown…
Excessive Try-Catch Wrapping805 hits · 824 pts
SeverityFileLineSnippet
LOWtest_watchdog_hang.py88 except Exception as e:
LOWtests/integration_test_turbopuffer.py154 except Exception:
LOWtests/integration_test_turbopuffer.py346 except Exception as e:
LOWtests/integration_test_turbopuffer.py350 except Exception:
LOWtests/integration_test_turbopuffer.py1894 except Exception:
LOWtests/integration_test_turbopuffer.py48 except Exception:
LOWtests/integration_test_turbopuffer.py490 except Exception:
LOWtests/integration_test_turbopuffer.py618 except Exception:
LOWtests/integration_test_turbopuffer.py757 except Exception:
LOWtests/integration_test_turbopuffer.py1141 except Exception:
LOWtests/integration_test_turbopuffer.py1202 except Exception:
LOWtests/integration_test_turbopuffer.py1265 except Exception:
LOWtests/integration_test_turbopuffer.py1337 except Exception:
LOWtests/integration_test_turbopuffer.py2398 except Exception:
LOWtests/integration_test_turbopuffer.py2480 except Exception:
LOWtests/integration_test_turbopuffer.py2536 except Exception:
LOWtests/test_crypto_utils.py92 except Exception as e:
LOWtests/conftest.py79 except Exception:
LOWtests/conftest.py85 except Exception:
LOWtests/integration_test_tool_execution_sandbox.py452 except Exception as e:
LOWtests/integration_test_cancellation.py124 except Exception:
LOWtests/integration_test_async_tool_sandbox.py360 except Exception as e:
LOWtests/integration_test_async_tool_sandbox.py1242 except Exception as e:
LOWtests/integration_test_send_message.py373 except Exception:
LOWtests/integration_test_send_message.py511 except Exception:
LOWtests/integration_test_send_message.py667 except Exception:
LOWtests/integration_test_send_message.py703 except Exception:
LOWtests/integration_test_send_message.py859 except Exception:
LOWtests/integration_test_send_message.py1200 except Exception as e:
LOWtests/integration_test_send_message.py2026 except Exception as e:
LOWtests/integration_test_send_message.py2202 except Exception as e:
LOWtests/mcp_test.py216 except Exception as e:
LOWtests/mcp_test.py257 except Exception as e:
LOWtests/mcp_test.py277 except Exception as e:
LOWtests/integration_test_override_model.py117 except Exception as e:
LOWtests/integration_test_override_model.py141 except Exception as e:
LOWtests/test_sonnet_nonnative_reasoning_buffering.py87 except Exception:
LOWtests/test_sonnet_nonnative_reasoning_buffering.py213 except Exception as e:
LOWtests/integration_test_system_prompt_prefix_caching.py33 except Exception:
LOWtests/test_provider_trace_agents.py94 except Exception:
LOWtests/test_provider_trace_agents.py160 except Exception:
LOWtests/test_internal_agents_count.py59 except Exception:
LOWtests/integration_test_usage_tracking.py126 except Exception as e:
LOWtests/integration_test_human_in_the_loop.py381 except Exception:
LOWtests/integration_test_human_in_the_loop.py368 except Exception:
LOWtests/integration_test_human_in_the_loop.py508 except Exception as e:
LOWtests/integration_test_human_in_the_loop.py770 except Exception as e:
LOWtests/integration_test_human_in_the_loop.py1035 except Exception as e:
LOWtests/test_temporal_metrics_local.py115 except Exception:
LOWtests/integration_test_send_message_v2.py138 except Exception:
LOWtests/integration_test_send_message_v2.py209 except Exception:
LOWtests/integration_test_send_message_v2.py262 except Exception:
LOWtests/integration_test_chat_completions.py183 except Exception as e:
LOWtests/integration_test_modal.py428 except Exception as e:
LOWtests/test_managers.py11220 except Exception:
LOWtests/test_sources.py1599 except Exception as e:
LOWtests/test_tool_schema_parsing.py121 except Exception as e:
LOWtests/test_tool_schema_parsing.py194 except Exception as e:
LOWtests/test_tool_schema_parsing.py315 except Exception as e:
LOWtests/test_tool_schema_parsing.py676 except Exception as e:
745 more matches not shown…
Docstring Block Structure82 hits · 410 pts
SeverityFileLineSnippet
HIGHtests/conftest.py242 Fetches the current weather for a given location. Args: location (str): The location to ge
HIGHtests/test_letta_agent_batch.py56 Fetches the current weather for a given location. Args: location: The location to get the
HIGHtests/integration_test_chat_completions.py71 Fetches the current weather for a given location. Args: location (str): The location to ge
HIGHtests/performance_tests/test_agent_mass_update.py97 Fetches the current weather for a given location. Parameters: location (str): The location
HIGH.github/scripts/model-sweep/conftest.py68 Fetches the current weather for a given location. Parameters: location (str): The location
HIGHletta/local_llm/grammars/gbnf_grammar_generator.py518 Generate GBNF Grammar from Pydantic Models. This method takes a list of Pydantic models and uses them to gener
HIGHletta/server/rest_api/streaming_response.py161 Wraps a stream generator to provide real-time run cancellation checking. This wrapper periodically checks for
HIGHletta/schemas/message.py943Parse tool response JSON and extract message and status. Args: response_text: Raw JSON response tex
HIGHletta/schemas/providers/chatgpt_oauth.py197Perform OAuth token refresh with OpenAI's token endpoint. Args: creds: Current credentials containi
HIGHletta/functions/functions.py328 Dynamically imports a function from a specified module. Args: module_name (str): The name of the modul
HIGHletta/functions/functions.py354 Dynamically loads a specific function from a module and generates its JSON schema. Args: module_name (
HIGHletta/functions/typescript_parser.py10Derives the OpenAI JSON schema for a given TypeScript function source code. This parser extracts the function signa
HIGHletta/functions/async_composio_toolset.py44 Execute an action asynchronously using the Composio API Args: action (str): The name of th
HIGHletta/functions/schema_generator.py527Extracts the 'Examples:' section from a Google-style docstring. Args: docstring (Optional[str]): The full d
HIGHletta/functions/ast_parsers.py56 Resolve a type annotation string into a Python type. Previously, primitive support for int, float, str, dict, l
HIGHletta/functions/ast_parsers.py91 Parse the source code to extract annotations for a given function name. Args: source_code (str): The P
HIGHletta/functions/function_sets/files.py11Open one or more files and load their contents into files section in core memory. Maximum of 5 files can be opened simul
HIGHletta/functions/function_sets/builtin.py43 Search the web using Exa's AI-powered search engine and retrieve relevant content. Examples: web_search("T
HIGHletta/functions/function_sets/base.py23 Memory management tool with various sub-commands for memory block operations. Args: command (str): The
HIGHletta/functions/function_sets/base.py95 Search prior conversation history using hybrid search (text + semantic similarity). Args: query (Optio
HIGHletta/functions/function_sets/base.py165 Add information to long-term archival memory for later retrieval. Use this tool to store facts, knowledge, or
HIGHletta/functions/function_sets/base.py203 Search archival memory using semantic similarity to find relevant information. This tool searches your long-te
HIGHletta/functions/function_sets/base.py312 The memory_replace command allows you to replace a specific string in a memory block with a new string. This is use
HIGHletta/functions/function_sets/base.py392 The memory_insert command allows you to insert text at a specific location in a memory block. Args: la
HIGHletta/orm/sqlite_functions.py75 Validates and transforms embeddings to ensure correct dimensionality. Args: embedding: Input embedding
HIGHletta/orm/sqlalchemy_base.py441The primary accessor for an ORM record. Async version of read method. Args: db_session: the database
HIGHletta/orm/sqlalchemy_base.py844 Get the count of rows that match the provided filters. Args: db_session: SQLAlchemy session
HIGHletta/llm_api/llm_client.py19 Create an LLM client based on the model endpoint type. Args: provider: The model endpoint
HIGHletta/llm_api/chatgpt_oauth_client.py106Get the ChatGPT OAuth provider and credentials with automatic refresh if needed. Args: llm_config:
HIGHletta/llm_api/anthropic_client.py382 Sends a batch request to the Anthropic API using the provided agent messages and tools mappings. Args:
HIGHletta/helpers/tpuf_client.py803Generic query execution for Turbopuffer. Args: namespace_name: Turbopuffer namespace to query
HIGHletta/helpers/message_helper.py16 Async helper to fetch image from URL without blocking the event loop. Retries once on timeout to handle transie
HIGHletta/helpers/crypto_utils.py105 Encrypt a string using AES-256-GCM (synchronous version). WARNING: This performs CPU-intensive PBKDF2
HIGHletta/helpers/crypto_utils.py154 Encrypt a string using AES-256-GCM (async version). Runs the CPU-intensive PBKDF2 key derivation in a
HIGHletta/helpers/crypto_utils.py203 Decrypt a string that was encrypted using AES-256-GCM (synchronous version). WARNING: This performs CP
HIGHletta/helpers/crypto_utils.py254 Decrypt a string that was encrypted using AES-256-GCM (async version). Runs the CPU-intensive PBKDF2 k
HIGHletta/services/provider_manager.py970Get an LLMConfig from a model handle. Args: handle: The model handle to look up actor:
HIGHletta/services/provider_manager.py1097Get an EmbeddingConfig from a model handle. Args: handle: The model handle to look up a
HIGHletta/services/agent_generate_completion_manager.py77 Generate a completion directly from the LLM provider using the agent's configuration. This method make
HIGHletta/services/tool_manager.py472 Bulk create or update multiple tools in a single database transaction. Uses optimized PostgreSQL bulk
HIGHletta/services/tool_manager.py1397 Search tools using Turbopuffer semantic search. Args: actor: User performing the search
HIGHletta/services/block_manager.py800 Bulk-update the `value` field for multiple blocks in one transaction. Args: updates: mappi
HIGHletta/services/archive_manager.py293Create a passage in an archive. Args: archive_id: ID of the archive to add the passage to
HIGHletta/services/archive_manager.py383Create multiple passages in an archive. Args: archive_id: ID of the archive to add the passages to
HIGHletta/services/job_manager.py329 Get messages associated with a job using cursor-based pagination. This is a wrapper around get_job_mess
HIGHletta/services/job_manager.py387 Get steps associated with a job using cursor-based pagination. This is a wrapper around get_job_message
HIGHletta/services/job_manager.py434 Verify that a job exists and the user has the required access. Args: session: The database
HIGHletta/services/job_manager.py553 Get all steps associated with a job. Args: job_id: The ID of the job to get steps for
HIGHletta/services/agent_serialization_manager.py383 Export agents and their related entities to AgentFileSchema format. Args: agent_ids: List
HIGHletta/services/agent_serialization_manager.py509 Import AgentFileSchema into the database. Args: schema: The agent file schema to import
HIGHletta/services/agent_manager.py1975 Lists all sources attached to an agent with pagination. Args: agent_id: ID of the agent to
HIGHletta/services/agent_manager.py2758 Attaches a tool to an agent. Args: agent_id: ID of the agent to attach the tool to.
HIGHletta/services/agent_manager.py2901 Attaches missing core file tools to an agent. Args: agent_state: The current agent state w
HIGHletta/services/agent_manager.py2962 Detach all core file tools from an agent. Args: agent_state: The current agent state with
HIGHletta/services/message_manager.py910 Most performant query to list messages by directly querying the Message table. This function filters b
HIGHletta/services/message_manager.py1276 Search messages across entire organization using Turbopuffer. Args: actor: User performing
HIGHletta/services/step_manager.py286Update the transaction ID for a step. Args: actor: The user making the request step_id:
HIGHletta/services/step_manager.py340Update the stop reason for a step. Args: actor: The user making the request step_id: Th
HIGHletta/services/step_manager.py378Update a step with error information. Args: actor: The user making the request step_id:
HIGHletta/services/step_manager.py426Update a step with success status and final usage statistics. Args: actor: The user making the requ
22 more matches not shown…
Deep Nesting449 hits · 365 pts
SeverityFileLineSnippet
LOWtests/test_modal_sandbox_v2.py450
LOWtests/conftest.py24
LOWtests/conftest.py70
LOWtests/integration_test_cancellation.py91
LOWtests/integration_test_async_tool_sandbox.py68
LOWtests/integration_test_send_message.py215
LOWtests/integration_test_send_message.py786
LOWtests/integration_test_send_message.py895
LOWtests/integration_test_send_message.py983
LOWtests/integration_test_send_message.py1009
LOWtests/integration_test_send_message.py984
LOWtests/mcp_test.py240
LOWtests/mcp_test.py260
LOWtests/mcp_test.py280
LOWtests/integration_test_override_model.py43
LOWtests/test_sonnet_nonnative_reasoning_buffering.py134
LOWtests/integration_test_agent_tool_graph.py501
LOWtests/test_letta_agent_batch.py362
LOWtests/test_letta_agent_batch.py448
LOWtests/test_letta_agent_batch.py615
LOWtests/test_letta_agent_batch.py781
LOWtests/integration_test_multi_agent.py18
LOWtests/integration_test_multi_agent.py135
LOWtests/integration_test_multi_agent.py210
LOWtests/integration_test_multi_agent.py325
LOWtests/test_sdk_client.py1069
LOWtests/test_sdk_client.py1154
LOWtests/test_sdk_client.py1899
LOWtests/test_sdk_client.py2164
LOWtests/test_long_running_agents.py18
LOWtests/integration_test_human_in_the_loop.py1175
LOWtests/test_file_processor.py226
LOWtests/integration_test_sleeptime_agent.py16
LOWtests/integration_test_send_message_v2.py283
LOWtests/integration_test_send_message_v2.py528
LOWtests/test_managers.py5081
LOWtests/test_tool_schema_parsing.py202
LOWtests/test_agent_serialization.py39
LOWtests/test_agent_serialization.py268
LOWtests/test_agent_serialization.py486
LOWtests/integration_test_modal_sandbox_v2.py632
LOWtests/integration_test_builtin_tools.py24
LOWtests/integration_test_builtin_tools.py161
LOWtests/integration_test_clickhouse_llm_traces.py180
LOWtests/integration_test_mcp.py27
LOWtests/test_prompt_caching.py605
LOWtests/test_prompt_caching.py697
LOWtests/test_prompt_caching.py974
LOWtests/performance_tests/test_agent_mass_creation.py253
LOWtests/managers/test_cancellation.py1143
LOWtests/managers/test_agent_manager.py1876
LOWtests/managers/test_agent_manager.py1990
LOWtests/managers/test_mcp_manager.py238
LOWtests/managers/test_tool_manager.py1207
LOWtests/sdk/conftest.py13
LOWtests/sdk/conftest.py64
LOWtests/sdk/conftest.py111
LOWtests/sdk/conftest.py151
LOWtests/sdk/mcp_servers_test.py31
LOWtests/sdk/search_test.py294
389 more matches not shown…
Redundant / Tautological Comments205 hits · 310 pts
SeverityFileLineSnippet
LOWtests/integration_test_turbopuffer.py150 # Check if our message ID is in the results
LOWtests/integration_test_turbopuffer.py64 # Set environment to DEV for testing
LOWtests/conftest.py187 # Set environment to DEV for testing
LOWtests/integration_test_send_message.py378 # Check if next message is LettaStopReason to detect this case
LOWtests/integration_test_send_message.py831 # Check if there are tool calls in the response
LOWtests/integration_test_send_message.py905 # Check if chunks are raw SSE strings (from background streaming)
LOWtests/integration_test_summarizer.py1567# # Check if content has system_alert type with the summary message (object form)
LOWtests/integration_test_summarizer.py1745# # Check if content has system_alert type with the summary message (object form)
LOWtests/test_sonnet_nonnative_reasoning_buffering.py200 # Check if this is inner thoughts
LOWtests/test_sonnet_nonnative_reasoning_buffering.py251 # Check if we detected large bursts
LOWtests/test_sdk_client.py631 # Check if modify method exists
LOWtests/test_temporal_metrics_local.py109 # Check if DogStatsD is listening
LOWtests/integration_test_send_message_v2.py752 # Check if tool calls are grouped in a single message (parallel) or separate messages (sequential)
LOWtests/integration_test_send_message_v2.py777 # Check if we have true parallel tool calling
LOWtests/integration_test_send_message_v2.py780 # Check if the single message contains multiple tool calls
LOWtests/test_tool_schema_parsing.py150 # Check if we expect the conversion to fail
LOWtests/integration_test_multi_modal_tool_returns.py398 # Check if this is a tool return message that might contain our image
LOWtests/test_server_providers.py2383 # Check if provider already exists
LOWtests/test_server_providers.py2633 # Set last_synced to indicate models are already synced
LOWtests/test_prompt_caching.py827 # Check if ANY of the follow-up messages had a cache hit
LOWtests/test_prompt_caching.py961 # Check if ANY of the follow-up messages had a cache hit
LOWtests/managers/test_cancellation.py1280 # Check if message has tool_returns (new format) or tool_return (old format)
LOWtests/managers/test_agent_manager.py2008 # Check if expected type is in the union
LOWotel/start-otel-collector.sh92# Check if update is needed
LOWsandbox/node_server.py66 # Check if there was an error
LOW.github/scripts/model-sweep/conftest.py166 # Check if already running
LOW…d06594144ef3_add_and_migrate_encrypted_columns_for_.py37 # Check if encryption key is available
LOW…rsions/8149a781ac1b_backfill_encrypted_columns_for_.py27 # Check if encryption key is available
LOW…c/versions/74e860718e0d_add_archival_memory_sharing.py57 # Check if archives table already exists
LOW…/versions/eff256d296cb_mcp_encrypted_data_migration.py30 # Check if encryption key is available
LOWletta/streaming_utils.py287 # Check if this same chunk also contains the terminating quote (and optional delimiter)
LOWletta/utils.py1167 # Check if coro is an async generator instead of a coroutine
LOWletta/agent.py553 # Check if inner thoughts is in the function call arguments (possible apparently if you are using Azure)
LOWletta/agent.py1217 # Check if there's a summary message in the message queue
LOWletta/agent.py1350 # Check if there's a summary message in the message queue
LOWletta/agent.py1488 # Check if there's a summary message in the message queue
LOWletta/local_llm/function_parser.py46 # Check if it's a user message or system message
LOWletta/local_llm/utils.py50 # Check if the file exists
LOWletta/local_llm/settings/settings.py29 # Check if settings_dir folder exists (if not, create it)
LOWletta/local_llm/grammars/gbnf_grammar_generator.py473 # Check if the field is optional (not required)
LOWletta/local_llm/grammars/gbnf_grammar_generator.py85 if not parts: # Check if the list is empty
LOWletta/agents/letta_agent_v3.py289 # Check if we should use SGLang native adapter for multi-turn RL training.
LOWletta/agents/letta_agent_v3.py358 # Check if step was cancelled - break out of the step loop
LOWletta/agents/letta_agent_v3.py424 # Set context_tokens to expose actual context window usage (vs accumulated prompt_tokens)
LOWletta/agents/letta_agent_v3.py502 # Check if we should use SGLang native adapter for multi-turn RL training
LOWletta/agents/letta_agent_v3.py615 # Check if step was cancelled - break out of the step loop
LOWletta/agents/letta_agent_v3.py696 # Set context_tokens to expose actual context window usage (vs accumulated prompt_tokens)
LOWletta/agents/letta_agent_v3.py1184 # Check if there's a fallback route for the current model
LOWletta/agents/letta_agent_v3.py1625 # Check if there are required-before-exit tools that haven't been called
LOWletta/agents/letta_agent_v3.py1999 # Check if the LLM hit max_tokens (finish_reason == "length")
LOWletta/server/server.py1812 # Check if the server name is already in the config
LOWletta/server/server.py1883 # Check if the server name is already in the config
LOWletta/server/startup.sh23# Check if we're configured for external Redis
LOWletta/server/startup.sh38# Check if we're configured for external Postgres
LOWletta/server/ws_api/server.py110 # Check if a port argument is provided
LOWletta/server/ws_api/interface.py37 if self.clients: # Check if there are any clients connected
LOWletta/server/rest_api/streaming_response.py132 # Check if there's anything left
LOWletta/server/rest_api/proxy_helpers.py319 # Set max_tokens to budget_tokens + reasonable buffer for response
LOWletta/server/rest_api/proxy_helpers.py28 # Check if entire message is a policy spec (starts with tag)
LOWletta/server/rest_api/proxy_helpers.py33 # Check if policy spec is appended (with prefix)
145 more matches not shown…
Unused Imports320 hits · 292 pts
SeverityFileLineSnippet
LOWtests/test_openai_ws_session.py5
LOWtests/integration_test_tool_execution_sandbox.py13
LOWtests/integration_test_async_tool_sandbox.py18
LOWtests/integration_test_async_tool_sandbox.py383
LOWtests/integration_test_send_message.py32
LOWtests/integration_test_modal.py14
LOW…sions/b888f21b151f_add_vector_db_provider_to_source.py26
LOW…sions/b888f21b151f_add_vector_db_provider_to_source.py26
LOWletta/__init__.py25
LOWletta/__init__.py26
LOWletta/__init__.py27
LOWletta/__init__.py28
LOWletta/__init__.py29
LOWletta/__init__.py30
LOWletta/__init__.py31
LOWletta/__init__.py31
LOWletta/__init__.py31
LOWletta/__init__.py32
LOWletta/__init__.py33
LOWletta/__init__.py34
LOWletta/__init__.py34
LOWletta/__init__.py34
LOWletta/__init__.py34
LOWletta/__init__.py34
LOWletta/__init__.py41
LOWletta/__init__.py42
LOWletta/__init__.py43
LOWletta/__init__.py44
LOWletta/__init__.py45
LOWletta/__init__.py46
LOWletta/__init__.py47
LOWletta/__init__.py19
LOWletta/errors.py7
LOWletta/errors.py8
LOWletta/serialize_schemas/__init__.py1
LOWletta/agents/base_agent.py18
LOWletta/agents/agent_loop.py12
LOWletta/agents/letta_agent.py9
LOWletta/agents/letta_agent.py51
LOWletta/agents/base_agent_v2.py14
LOWletta/agents/base_agent_v2.py14
LOWletta/agents/base_agent_v2.py15
LOWletta/agents/voice_sleeptime_agent.py4
LOWletta/agents/letta_agent_v3.py73
LOWletta/server/rest_api/dependencies.py13
LOWletta/server/rest_api/routers/v1/tags.py8
LOWletta/server/rest_api/routers/v1/internal_agents.py5
LOWletta/server/rest_api/routers/v1/users.py11
LOWletta/server/rest_api/routers/v1/git_http.py20
LOWletta/server/rest_api/routers/v1/internal_runs.py10
LOWletta/server/rest_api/routers/v1/archives.py12
LOWletta/server/rest_api/routers/v1/identities.py20
LOWletta/server/rest_api/routers/v1/agents.py52
LOWletta/server/rest_api/routers/v1/voice.py9
LOWletta/server/rest_api/routers/v1/jobs.py9
LOWletta/server/rest_api/routers/v1/providers.py12
LOWletta/server/rest_api/routers/v1/organizations.py9
LOWletta/server/rest_api/routers/v1/llms.py10
LOWletta/server/rest_api/routers/v1/internal_templates.py10
LOWletta/server/rest_api/routers/v1/runs.py24
260 more matches not shown…
Verbosity Indicators128 hits · 188 pts
SeverityFileLineSnippet
LOWtests/integration_test_client_side_tools.py92 # Step 1: User asks for the secret code - agent should call the tool
LOWtests/integration_test_client_side_tools.py109 # Step 2: Provide the tool return (simulating client-side execution)
LOWtests/integration_test_client_side_tools.py152 # Step 3: Ask the agent what the secret code was (testing memory/context)
LOWtests/integration_test_client_side_tools.py173 # Step 4: Validate the full conversation history makes sense
LOWtests/integration_test_client_side_tools.py242 # Step 1: Call the tool WITH client_tools specified - should pause for approval
LOWtests/integration_test_client_side_tools.py261 # Step 2: Provide client-side tool return
LOWtests/integration_test_client_side_tools.py286 # Step 3: Verify the client value was used, not the server value
LOWtests/integration_test_client_side_tools.py306 # Step 4: Test that WITHOUT client_tools, server tool executes directly
LOWtests/integration_test_client_side_tools.py354 # Step 1: Trigger the client-side tool call
LOWtests/integration_test_client_side_tools.py366 # Step 2: Provide an error response
LOWtests/test_mcp_encryption.py251 # Step 1: Create OAuth session (without tokens initially)
LOWtests/test_mcp_encryption.py264 # Step 2: Update session with tokens (simulating OAuth callback)
LOWtests/integration_test_system_prompt_prefix_caching.py156 # Step 1: Get initial context window
LOWtests/integration_test_system_prompt_prefix_caching.py161 # Step 2: Get the human block
LOWtests/integration_test_system_prompt_prefix_caching.py170 # Step 3: Update block via agent-specific endpoint (triggers recompilation)
LOWtests/integration_test_system_prompt_prefix_caching.py179 # Step 4: Verify the block was updated
LOWtests/integration_test_system_prompt_prefix_caching.py183 # Step 5: Get context window and verify core memory was recompiled
LOWtests/integration_test_system_prompt_prefix_caching.py192 # Step 6: System prompt template should NOT change (only memory content changes)
LOWtests/integration_test_system_prompt_prefix_caching.py205 # Step 1: Get initial system prompt
LOWtests/integration_test_system_prompt_prefix_caching.py209 # Step 2: Manually update a block via the API
LOWtests/integration_test_system_prompt_prefix_caching.py58 # Step 1: Get initial context window, system prompt, and human block value
LOWtests/integration_test_system_prompt_prefix_caching.py72 # Step 2: Tell the agent to update its memory using the memory tool
LOWtests/integration_test_system_prompt_prefix_caching.py84 # Step 3: Verify block was modified but system prompt hasn't changed
LOWtests/integration_test_system_prompt_prefix_caching.py97 # Step 4: Send another message to the agent
LOWtests/integration_test_system_prompt_prefix_caching.py109 # Step 5: Verify system prompt still hasn't changed
LOWtests/integration_test_system_prompt_prefix_caching.py114 # Step 6: Manually update a block via the API
LOWtests/integration_test_system_prompt_prefix_caching.py129 # Step 7: Send another message and verify system prompt still hasn't changed
LOWtests/integration_test_system_prompt_prefix_caching.py224 # Step 3: Reset messages (this should trigger system prompt rebuild)
LOWtests/integration_test_system_prompt_prefix_caching.py227 # Step 4: Verify system prompt HAS changed and includes the new memory
LOWtests/test_sdk_client.py380 # Step 1: Add multiple tags to the agent
LOWtests/test_sdk_client.py386 # Step 2: Retrieve tags for the agent and verify they match the added tags
LOWtests/test_sdk_client.py392 # Step 3: Retrieve agents by each tag to ensure the agent is associated correctly
LOWtests/test_sdk_client.py397 # Step 4: Delete a specific tag from the agent and verify its removal
LOWtests/test_sdk_client.py406 # Step 5: Delete all remaining tags from the agent
LOWtests/test_sdk_client.py367 # Step 0: create an agent with no tags
LOWtests/integration_test_human_in_the_loop.py1395 # Step 4: Accumulate remaining chunks (already collected above)
LOWtests/integration_test_human_in_the_loop.py1397 # Step 5: Verify we got chunks AND a cancelled stop reason
LOWtests/integration_test_human_in_the_loop.py1405 # Step 6: Verify run status is cancelled
LOWtests/integration_test_human_in_the_loop.py1412 # Step 7: Verify that approval response message is persisted
LOWtests/integration_test_human_in_the_loop.py1418 # Step 8: Attempt retry with same response
LOWtests/integration_test_human_in_the_loop.py1438 # Step 9: Accumulate chunks
LOWtests/integration_test_human_in_the_loop.py1441 # Step 10: Verify we got chunks AND an end_turn stop reason
LOWtests/integration_test_human_in_the_loop.py1449 # Step 11: Verify keep-alive message was sent
LOWtests/integration_test_human_in_the_loop.py1515 # Step 4: Verify we got cancelled
LOWtests/integration_test_human_in_the_loop.py1520 # Step 6: Verify tool return message is persisted
LOWtests/integration_test_human_in_the_loop.py1525 # Step 7: Call compact with mode='all' to evict all messages from context
LOWtests/integration_test_human_in_the_loop.py1531 # Step 8: Verify only system and summary messages remain in context (should be 2)
LOWtests/integration_test_human_in_the_loop.py1538 # Step 9: Retry the original approval response - should succeed via idempotency check
LOWtests/integration_test_human_in_the_loop.py1351 # Step 1: Send message that triggers approval request
LOWtests/integration_test_human_in_the_loop.py1358 # Step 2: Start approval stream and wait for first chunk (sentinel approach)
LOWtests/integration_test_human_in_the_loop.py1379 # Step 3: Wait for first chunk before triggering cancellation
LOWtests/integration_test_human_in_the_loop.py1471 # Step 1: Send message that triggers approval request
LOWtests/integration_test_human_in_the_loop.py1478 # Step 2: Start approval stream and wait for first chunk (sentinel approach)
LOWtests/integration_test_human_in_the_loop.py1499 # Step 3: Wait for first chunk before triggering cancellation
LOWtests/integration_test_human_in_the_loop.py1558 # Step 10: Accumulate chunks
LOWtests/integration_test_human_in_the_loop.py1561 # Step 11: Verify we got chunks AND an end_turn stop reason (not an error)
LOWtests/test_managers.py6569 # Step 1: Create block
LOWtests/test_managers.py6575 # Step 2: Update to v2, checkpoint => seq=2
LOWtests/test_managers.py6581 # Step 3: Update to v3, checkpoint => seq=3
LOWtests/test_managers.py6732 # Step 1: create initial block => seq=1
68 more matches not shown…
Over-Commented Block161 hits · 108 pts
SeverityFileLineSnippet
LOWconf.yaml1# Letta Configuration File
LOWconf.yaml161 # Letta Client (LETTA_DEFAULT_*)
LOWconf.yaml281 # api_key: ""
LOWconf.yaml301
LOWconf.yaml321 # sglang:
LOWconf.yaml341 # sandbox_template_id: ""
LOWconf.yaml361
LOWconf.yaml381# health_metrics_enabled: false
LOWconf.yaml401#
LOWalembic.ini1# A generic, single database configuration.
LOWalembic.ini21# Any required deps can installed by adding `alembic[tz]` to the pip requirements
LOWalembic.ini41# The path separator used here should be the separator specified by "version_path_separator" below.
LOWalembic.ini61# output_encoding = utf-8
LOWtests/locust_test.py81 # response = requests.post(f"{self.base_url}/api/agents/{agent_id}/messages", json=request.model_dump(), head
LOWtests/locust_test.py101 # try:
LOWtests/test_crypto_utils.py421 This simulates the real-world scenario of existing encrypted values
LOWtests/integration_test_async_tool_sandbox.py41
LOWtests/integration_test_send_message.py1901 assert_greeting_with_assistant_message_response(messages_from_db, model_handle, model_settings, from_db=True)
LOWtests/integration_test_send_message.py1921 # client.agents.update(agent_id=agent_state.id, model=model_handle, model_settings=model_settings)
LOWtests/integration_test_send_message.py2281# # ids=[c.model for c in TESTED_LLM_CONFIGS],
LOWtests/integration_test_send_message.py2301# # Verify the job was created
LOWtests/integration_test_send_message.py2321# def test_job_cancellation_endpoint_validation(
LOWtests/integration_test_send_message.py2341# disable_e2b_api_key: Any,
LOWtests/integration_test_send_message.py2361# # Try to cancel the completed job - should fail
LOWtests/integration_test_send_message.py2381# This verifies that jobs continue even if the client "disconnects" (simulated by not consuming the stream).
LOWtests/integration_test_send_message.py2401# )
LOWtests/integration_test_send_message.py2561
LOWtests/integration_test_summarizer.py41
LOWtests/integration_test_summarizer.py581# TESTED_LLM_CONFIGS,
LOWtests/integration_test_summarizer.py601# content=[
LOWtests/integration_test_summarizer.py621# ],
LOWtests/integration_test_summarizer.py641# # Find tool return messages in the result and verify truncation occurred
LOWtests/integration_test_summarizer.py1301 )
LOWtests/integration_test_summarizer.py1321# """
LOWtests/integration_test_summarizer.py1341# agent_state = await server.agent_manager.create_agent_async(agent_create, actor=actor)
LOWtests/integration_test_summarizer.py1361# )
LOWtests/integration_test_summarizer.py1381# # Reload agent state after repairs
LOWtests/integration_test_summarizer.py1401# # Verify we got a valid response after repair
LOWtests/integration_test_summarizer.py1421# from unittest.mock import patch
LOWtests/integration_test_summarizer.py1441# messages.append(
LOWtests/integration_test_summarizer.py1461# id=test_run_id,
LOWtests/integration_test_summarizer.py1481# from unittest.mock import MagicMock
LOWtests/integration_test_summarizer.py1501# response=mock_response,
LOWtests/integration_test_summarizer.py1521# stream_tokens=True,
LOWtests/integration_test_summarizer.py1541# # Verify a summary message exists with the correct format
LOWtests/integration_test_summarizer.py1561# if "prior messages" in text_to_check and "hidden" in text_to_check and "summary of the previous" in
LOWtests/integration_test_summarizer.py1581# # Verify we attempted multiple invocations (the failing one + retry after summarization)
LOWtests/integration_test_summarizer.py1601# Note: This test only runs with OpenAI since it uses OpenAI-specific error handling.
LOWtests/integration_test_summarizer.py1621# content=[TextContent(type="text", text=f"User message {i}: This is test message number {i}.")],
LOWtests/integration_test_summarizer.py1641# run_manager = RunManager()
LOWtests/integration_test_summarizer.py1661# if call_count == 1:
LOWtests/integration_test_summarizer.py1681# message="This model's maximum context length is 8000 tokens. However, your messages resulted in 12000 t
LOWtests/integration_test_summarizer.py1701# run_id=test_run_id,
LOWtests/integration_test_summarizer.py1721# # "prior messages ... have been hidden" and "summary of the previous"
LOWtests/integration_test_summarizer.py1741# summary_message_text = parsed.get("message")
LOWtests/test_providers.py261 assert len(embedding_models) == 0 # embedding models currently not supported by SGLang
LOWtests/integration_test_agent_tool_graph.py861 # Check order
LOWtests/integration_test_agent_tool_graph.py881# -- flip_coin
LOWtests/integration_test_agent_tool_graph.py901# child_output_mapping={
LOWtests/integration_test_agent_tool_graph.py921# found_secret_word = False
101 more matches not shown…
AI Slop Vocabulary48 hits · 108 pts
SeverityFileLineSnippet
MEDIUMtests/integration_test_summarizer.py1307### in order to leverage caching (for self compaction)
MEDIUMtests/test_agent_serialization_v2.py772 """Test file export functionality with comprehensive validation"""
MEDIUMtests/integration_test_usage_tracking.py449 # Use Anthropic Sonnet 4.5 for this test as it has the most comprehensive caching
MEDIUMtests/test_managers.py1279 # Create an agent using the comprehensive fixture.
MEDIUMtests/test_managers.py1297 # Create an agent using the comprehensive fixture.
MEDIUMtests/test_managers.py3612 """Test comprehensive tag functionality for passages."""
MEDIUMtests/managers/conftest.py364 """Create a comprehensive test agent with all features."""
MEDIUMtests/managers/test_passage_manager.py815 """Test comprehensive tag functionality for passages."""
MEDIUMtests/managers/test_agent_manager.py1210 # Create an agent using the comprehensive fixture.
MEDIUMtests/managers/test_agent_manager.py1228 # Create an agent using the comprehensive fixture.
MEDIUM…empty_archival/agent_state/2024-01-11_12_44_32_PM.json1{"model": "gpt-4", "system": "You are Letta, the latest version of Limnal Corporation's digital companion, developed in
MEDIUM…empty_archival/agent_state/2024-01-11_12_44_33_PM.json1{"model": "gpt-4", "system": "You are Letta, the latest version of Limnal Corporation's digital companion, developed in
MEDIUM…nt_test_attach/agent_state/2024-01-11_12_42_19_PM.json1{"model": "gpt-4", "system": "You are Letta, the latest version of Limnal Corporation's digital companion, developed in
MEDIUM…nt_test_attach/agent_state/2024-01-11_12_42_17_PM.json1{"model": "gpt-4", "system": "You are Letta, the latest version of Limnal Corporation's digital companion, developed in
MEDIUM…nts/agent_test/agent_state/2024-01-11_12_43_59_PM.json1{"model": "gpt-4", "system": "You are Letta, the latest version of Limnal Corporation's digital companion, developed in
MEDIUM…nts/agent_test/agent_state/2024-01-11_12_43_57_PM.json1{"model": "gpt-4", "system": "You are Letta, the latest version of Limnal Corporation's digital companion, developed in
MEDIUMletta/streaming_utils.py268 # Not in message yet: accumulate until we see '<json_key>': (robust to split fragments)
MEDIUMletta/agent.py1740 # If it exists in the input message, elevate it to the 'message' level
LOWletta/agent.py950 # Fallback if for some reason context_window is missing, just set to the default
LOWletta/agent.py1134 # Fallback if for some reason context_window is missing, just set to the default
MEDIUMletta/agent.py314 """Get response from LLM API with robust retry mechanism."""
LOWletta/serialize_schemas/marshmallow_agent.py117 # no user messages, just return system message
LOWletta/serialize_schemas/marshmallow_agent.py152 # no user messages, just return system message
MEDIUMletta/agents/letta_agent_v3.py1238 # NOTE: we no longer refresh the system prompt before compaction so we can leverage cach
MEDIUMletta/agents/letta_agent_v3.py1461 # NOTE: we no longer refresh the system prompt before compaction so we can leverage cache for self m
MEDIUMletta/server/rest_api/interface.py307 # To make streamed arguments robust, we add a JSON-aware incremental
LOWletta/server/rest_api/interface.py1120 # Example where we just pass through the raw stream from the underlying OpenAI SSE stream
LOWletta/server/rest_api/auth_token.py15 # user is admin so we just return the default uuid
LOWletta/server/rest_api/routers/v1/tools.py557 # TODO: don't do this in the future (just return MCPServer)
LOWletta/server/rest_api/routers/v1/tools.py612 # TODO: don't do this in the future (just return MCPServer)
LOWletta/schemas/sandbox_config.py45 # If `data` is not a dict (e.g., it's another Pydantic model), just return it
LOWletta/schemas/sandbox_config.py73 # If `data` is not a dict (e.g., it's another Pydantic model), just return it
LOWletta/schemas/message.py641 # TODO remove the cast and just return the native type
LOWletta/schemas/message.py728 # If assistant mode is off, just create one ToolCallMessage with all tool calls
LOWletta/schemas/providers/anthropic.py138 # just use a cheap model to count some tokens - as of 5/7/2025 this is faster than fetching the list of mode
LOWletta/schemas/providers/base.py96 # Simplified asyncio handling - just use asyncio.run()
LOWletta/schemas/providers/base.py120 # Simplified asyncio handling - just use asyncio.run()
LOWletta/functions/typescript_parser.py180 # Handle union types (simplified - just use string)
LOWletta/functions/mcp_client/types.py94 # If the result still contains unreplaced templates, just return original value
MEDIUMletta/orm/sqlalchemy_base.py278 # TODO (cliandy): can make this more robust down the line
MEDIUMletta/llm_api/openai_client.py574 # don't raise error since this isn't robust against edge cases
LOWletta/llm_api/openai_client.py646 # For text or json_object, just pass the type
MEDIUMletta/services/mcp_manager.py1130 # TODO: @jnjpng make this check more robust and remove direct os.getenv
MEDIUMletta/services/mcp_server_manager.py1326 # TODO: @jnjpng make this check more robust and remove direct os.getenv
MEDIUMletta/services/tool_sandbox/modal_sandbox_v2.py418 # Start with a more robust base image with development tools
LOWletta/interfaces/anthropic_streaming_interface.py150 # This interface doesn't track cache tokens, so we just use the raw values
LOWletta/interfaces/anthropic_streaming_interface.py702 # This interface doesn't track cache tokens, so we just use the raw values
MEDIUMletta/interfaces/openai_streaming_interface.py476 # Minimal, robust extraction: only emit the value of "message".
Cross-Language Confusion18 hits · 105 pts
SeverityFileLineSnippet
HIGH…/integration_test_typescript_tool_execution_sandbox.py595 assert "let client: any = null;" in script
HIGH…/integration_test_typescript_tool_execution_sandbox.py615 result, agent_state = parse_typescript_result('{"results": 42, "agent_state": null}')
HIGHtests/managers/test_message_manager.py1087 arguments='{"message": {"status": "success", "data": {"count": 42, "items": ["a", "b"]}, "meta": null}}'
HIGHletta/streaming_utils.py106 # numbers, null, or a nested object/array) streamed in next, the stream
HIGHletta/local_llm/json_parser.py63 - if (function call is not send_message && prev message['role'] == user): insert heartbeat
HIGHletta/server/rest_api/routers/v1/groups.py168 include_return_message_types: Optional[List[MessageType]] = Query(None, description="Message types to include in res
HIGHletta/server/rest_api/routers/v1/agents.py1601 include_return_message_types: Optional[List[MessageType]] = Query(None, description="Message types to include in res
HIGHletta/server/rest_api/routers/v1/messages.py46 None, description="Message types to include in response. When null, all message types are returned."
HIGHletta/server/rest_api/routers/v1/conversations.py214 include_return_message_types: Optional[List[MessageType]] = Query(None, description="Message types to include in res
HIGHletta/schemas/providers.py283 # "param": null,
HIGHletta/schemas/providers/openai.py184 # "param": null,
HIGHletta/functions/schema_validator.py173 # They represent union types (e.g., string | null)
HIGHletta/functions/helpers.py288 # If we have exactly one type and null, make it Optional
HIGHletta/llm_api/helpers.py39 # If it's simple primitives only (string, null, integer, boolean, etc), flatten to type array
HIGHletta/services/mcp_server_manager.py9from sqlalchemy import delete, desc, null, select
HIGHletta/services/tool_sandbox/typescript_generator.py140 "let client: any = null;",
HIGHletta/services/tool_sandbox/typescript_generator.py209 lines.append("const _output = { results: _result, agent_state: null };")
HIGHletta/services/provider_trace_backends/clickhouse.py96 # OpenAI Responses API returns {"error": null} on success
Hallucination Indicators4 hits · 40 pts
SeverityFileLineSnippet
CRITICALletta/orm/sqlalchemy_base.py270 query = query.join(cls.identities).filter(cls.identities.property.mapper.class_.identifier_key.in_(identifie
CRITICALletta/jobs/llm_batch_job_polling.py55 response = await server.anthropic_async_client.beta.messages.batches.retrieve(batch_id_str)
CRITICALletta/jobs/llm_batch_job_polling.py80 results = await server.anthropic_async_client.beta.messages.batches.results(batch_resp_id)
CRITICALletta/services/block_manager.py404 BlockModel.identities.property.mapper.class_.identifier_key.in_(identifier_keys)
Synthetic Comment Markers4 hits · 25 pts
SeverityFileLineSnippet
HIGHletta/services/tool_sandbox/local_sandbox.py149 print(f"Auto-generated code for debugging:\n\n{code}")
HIGHletta/services/tool_executor/tool_execution_sandbox.py49 # This is the variable name in the auto-generated code that contains the function results
HIGHletta/services/tool_executor/tool_execution_sandbox.py167 logger.error(f"Logging out tool {self.tool_name} auto-generated code for debugging: \n\n{code}")
HIGHletta/services/tool_executor/tool_execution_sandbox.py233 logger.debug(f"Tool {self.tool_name} auto-generated code for debugging: \n\n{code}")
Overly Generic Function Names20 hits · 12 pts
SeverityFileLineSnippet
LOWtests/test_modal_sandbox_v2.py338def test_function(x: int, y: int) -> int:
LOWtests/test_modal_sandbox_v2.py395 mock_tool.source_code = "def test_function(x, y): return x * y"
LOWtests/test_modal_sandbox_v2.py408 mock_tool.source_code = "def test_function(x, y): return x + y" # Reset
LOWtests/test_utils.py92def my_function(a: int, b: float, c: str, d: list, e: dict, f: CustomClass = None):
LOWtests/conftest.py111 def test_function(e2b_sandbox_mode, ...):
LOWtests/conftest.py177 def test_function(turbopuffer_mode, ...):
LOWtests/test_sdk_client.py1722# def main_function(x: int, y: int) -> int:
LOWtests/test_sdk_client.py1752# def process_data(data: str, count: int) -> str:
LOWtests/test_sdk_client.py1639 def main_function(x: int, y: int) -> int:
LOWtests/managers/test_tool_manager.py1805def test_function(arg1: str) -> str:
LOWtests/managers/test_tool_manager.py1834def test_function(arg1: str, arg2: int) -> str:
LOWtests/managers/test_tool_manager.py1870def test_function(arg1: str, arg2: int = 5) -> str:
LOWtests/managers/test_tool_manager.py1903def test_function(old_arg: str) -> str:
LOWtests/managers/test_tool_manager.py1938def test_function():
LOWtests/managers/test_tool_manager.py1957def test_function(arg1: str) -> str:
LOWtests/managers/test_tool_manager.py1986def test_function() -> str:
LOWtests/managers/test_tool_manager.py2019def test_function() -> str:
LOWtests/managers/test_tool_manager.py2034def test_function(new_arg: str) -> str:
LOWtests/managers/test_tool_manager.py2067 source_code="def test_function(): pass",
LOWletta/validators.py136 def my_function(agent_id: str, folder_id: str):
Dead Code5 hits · 10 pts
SeverityFileLineSnippet
MEDIUMtests/managers/test_cancellation.py1504
MEDIUMtests/managers/test_cancellation.py1576
MEDIUMtests/managers/test_cancellation.py1629
MEDIUMtests/managers/test_cancellation.py1681
MEDIUMtests/managers/test_cancellation.py1733
Slop Phrases5 hits · 9 pts
SeverityFileLineSnippet
LOWletta/local_llm/llm_chat_completion_wrappers/chatml.py24# Don't forget to use send_message, otherwise the user won't see your message"""
LOWletta/local_llm/llm_chat_completion_wrappers/llama3.py23# Don't forget to use send_message, otherwise the user won't see your message"""
LOWletta/server/server.py1847 # Write out the file, and make sure to in include the top-level mcpConfig (wrapped to avoid blocking event loop)
LOWletta/server/server.py1891 # Write out the file, and make sure to in include the top-level mcpConfig (wrapped to avoid blocking event loop)
LOWletta/llm_api/anthropic_client.py973 # make sure to check for overflow errors, regardless of error type
Fake / Example Data7 hits · 6 pts
SeverityFileLineSnippet
LOW…/integration_test_typescript_tool_execution_sandbox.py425 assert result.func_return == "John Doe"
LOWtests/sdk/mcp_servers_test.py1072 "content": 'Use the create_person tool to create a person named "John Doe", age 30, '
LOWtests/sdk/mcp_servers_test.py1073 'email "john@example.com", with address at "123 Main St", city "New York", zip "10001".',
LOWtests/sdk/mcp_servers_test.py1089 assert "John Doe" in person_return.tool_return, "Expected person name in response"
LOWtests/data/api_server.go360 userService.CreateUser("John Doe", "john@example.com")
LOWtests/data/test.md781. Lorem ipsum dolor sit amet
LOWtests/data/test.md781. Lorem ipsum dolor sit amet