Repository Analysis

supermemoryai/supermemory

Memory engine and app that is extremely fast, scalable. The Memory API for the AI era.

4.7 Likely human-written View on GitHub
4.7
Adjusted Score
4.7
Raw Score
100%
Time Factor
2026-05-30
Last Push
22,818
Stars
TypeScript
Language
104,598
Lines of Code
543
Files
332
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 32MEDIUM 7LOW 293

Pattern Findings

332 matches across 12 categories. Click a row to expand file-level details.

Magic Placeholder Names30 hits · 158 pts
SeverityFileLineSnippet
HIGHpackages/tools/test/claude-memory-examples.ts249 -H "Authorization: Bearer YOUR_API_KEY" \\
HIGHpackages/tools/test/claude-memory-examples.ts265 -H "Authorization: Bearer YOUR_API_KEY" \\
HIGHpackages/tools/test/claude-memory-examples.ts276 -H "Authorization: Bearer YOUR_API_KEY" \\
HIGHpackages/tools/test/claude-memory-examples.ts287 -H "Authorization: Bearer YOUR_API_KEY" \\
HIGHpackages/tools/test/claude-memory-examples.ts301 -H "Authorization: Bearer YOUR_API_KEY"
HIGHpackages/agent-framework-python/README.md236 api_key="your-api-key",
HIGHpackages/agent-framework-python/README.md260 api_key="your-api-key", # Or set SUPERMEMORY_API_KEY env var
HIGHpackages/agent-framework-python/README.md282 api_key="your-api-key", # Or set SUPERMEMORY_API_KEY env var
HIGHpackages/docs-test/tests/integrations/ai-sdk.ts90 const tools = supermemoryTools("YOUR_API_KEY")
HIGHpackages/openai-sdk-python/README.md272search_tool = create_search_memories_tool("your-api-key")
HIGHpackages/openai-sdk-python/README.md273add_tool = create_add_memory_tool("your-api-key")
HIGHpackages/openai-sdk-python/README.md274fetch_tool = create_fetch_memory_tool("your-api-key")
HIGHpackages/ai-sdk/README.md187const tools = supermemoryTools('your-api-key', {
HIGHpackages/ai-sdk/README.md236const searchTool = searchMemoriesTool('your-api-key', {
HIGHskills/supermemory/references/api-reference.md16Authorization: Bearer YOUR_API_KEY
HIGHskills/supermemory/references/api-reference.md34Authorization: Bearer YOUR_API_KEY
HIGHskills/supermemory/references/api-reference.md52 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHskills/supermemory/references/api-reference.md114Authorization: Bearer YOUR_API_KEY
HIGHskills/supermemory/references/api-reference.md165 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHskills/supermemory/references/api-reference.md237Authorization: Bearer YOUR_API_KEY
HIGHskills/supermemory/references/api-reference.md255 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHskills/supermemory/references/api-reference.md392 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHskills/supermemory/references/api-reference.md474 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHskills/supermemory/references/api-reference.md481 -H "Authorization: Bearer YOUR_API_KEY"
HIGHskills/supermemory/references/api-reference.md504 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHskills/supermemory/references/api-reference.md520 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHskills/supermemory/references/api-reference.md537 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHskills/supermemory/references/api-reference.md564 -H "Authorization: Bearer YOUR_API_KEY" \
HIGHapps/web/components/connect-ai-modal.tsx666 manualApiKey || "your-api-key-here",
HIGHapps/web/components/mcp-modal/mcp-detail-view.tsx518 const snippet = buildMcpUrlRemoteJson("your-api-key-here")
Hyper-Verbose Identifiers131 hits · 138 pts
SeverityFileLineSnippet
LOWpackages/ui/components/chart.tsx308function getPayloadConfigFromPayload(
LOWpackages/tools/test/claude-memory-real-example.ts16export async function handleClaudeMemoryToolCall(
LOWpackages/tools/src/mastra/processor.ts351export function createSupermemoryProcessor(
LOWpackages/tools/src/mastra/processor.ts383export function createSupermemoryOutputProcessor(
LOWpackages/tools/src/mastra/processor.ts420export function createSupermemoryProcessors(
LOWpackages/tools/src/openai/tools.ts238export function createSearchMemoriesFunction(
LOWpackages/tools/src/openai/tools.ts353export function createDocumentListFunction(
LOWpackages/tools/src/openai/tools.ts397export function createDocumentDeleteFunction(
LOWpackages/tools/src/openai/tools.ts427export function createDocumentAddFunction(
LOWpackages/tools/src/openai/tools.ts469export function createMemoryForgetFunction(
LOWpackages/agent-framework-python/tests/test_utils.py29 def test_deduplication_priority(self) -> None:
LOWpackages/agent-framework-python/tests/test_utils.py47 def test_empty_strings_filtered(self) -> None:
LOW…ckages/agent-framework-python/tests/test_middleware.py93 def test_uses_connection_client(self) -> None:
LOW…ckages/agent-framework-python/tests/test_middleware.py98 def test_conversation_id_from_connection(self) -> None:
LOW…ckages/agent-framework-python/tests/test_middleware.py104 def test_auto_generated_conversation_id(self) -> None:
LOW…ckages/agent-framework-python/tests/test_middleware.py110 def test_entity_context_from_connection(self) -> None:
LOW…ckages/agent-framework-python/tests/test_connection.py18 def test_accepts_api_key_param(self) -> None:
LOW…ckages/agent-framework-python/tests/test_connection.py27 def test_default_container_tag(self) -> None:
LOW…ckages/agent-framework-python/tests/test_connection.py31 def test_custom_container_tag(self) -> None:
LOW…ckages/agent-framework-python/tests/test_connection.py35 def test_auto_generates_conversation_id(self) -> None:
LOW…ckages/agent-framework-python/tests/test_connection.py41 def test_custom_conversation_id(self) -> None:
LOW…ckages/agent-framework-python/tests/test_connection.py53 def test_entity_context_default_none(self) -> None:
LOW…ckages/agent-framework-python/tests/test_connection.py57 def test_shared_client_instance(self) -> None:
LOW…/agent-framework-python/tests/test_context_provider.py21 def test_uses_connection_client(self) -> None:
LOW…/agent-framework-python/tests/test_context_provider.py43 def test_store_conversations_default(self) -> None:
LOW…/agent-framework-python/tests/test_context_provider.py48 def test_conversation_id_from_connection(self) -> None:
LOW…/agent-framework-python/tests/test_context_provider.py54 def test_entity_context_from_connection(self) -> None:
LOWpackages/agent-framework-python/tests/test_tools.py15 def test_create_tools_instance(self) -> None:
LOWpackages/agent-framework-python/tests/test_tools.py20 def test_create_tools_with_custom_tag(self) -> None:
LOWpackages/agent-framework-python/tests/test_tools.py25 def test_get_tools_returns_list(self) -> None:
LOWpackages/agent-framework-python/tests/test_tools.py41 def test_uses_connection_client(self) -> None:
LOWpackages/agent-framework-python/tests/test_tools.py46 def test_shares_custom_id_with_connection(self) -> None:
LOW…on/src/supermemory_agent_framework/context_provider.py240 def _extract_query_from_context(self, context: Any) -> str:
LOW…on/src/supermemory_agent_framework/context_provider.py281 def _extract_conversation_from_context(self, context: Any) -> str:
LOW…mework-python/src/supermemory_agent_framework/utils.py136def convert_profile_to_markdown(data: dict[str, Any]) -> str:
LOW…k-python/src/supermemory_agent_framework/middleware.py72def _get_conversation_content(messages: Any) -> str:
LOW…k-python/src/supermemory_agent_framework/middleware.py359 async def wait_for_background_tasks(
LOWpackages/memory-graph/src/canvas/renderer.ts21function nodeMatchesDocumentHighlights(
LOW…/pipecat-sdk-python/src/supermemory_pipecat/service.py184 def _enhance_context_with_memories(
LOWpackages/docs-test/tests/python/user_profiles.py26def test_profile_with_memories():
LOWpackages/docs-test/tests/integrations/openai-sdk.py8def test_openai_with_supermemory():
LOW…/cartesia-sdk-python/src/supermemory_cartesia/agent.py288 def _extract_conversation_from_history(self, history: list) -> List[Dict[str, str]]:
LOW…/cartesia-sdk-python/src/supermemory_cartesia/agent.py337 async def _enrich_event_with_memories(self, event: Any) -> tuple[Any, Optional[str]]:
LOWpackages/openai-sdk-python/tests/test_middleware.py79def mock_supermemory_response():
LOWpackages/openai-sdk-python/tests/test_middleware.py103 def test_with_supermemory_basic(self, mock_openai_client):
LOWpackages/openai-sdk-python/tests/test_middleware.py118 def test_with_supermemory_with_options(self, mock_openai_client):
LOWpackages/openai-sdk-python/tests/test_middleware.py136 def test_missing_api_key_raises_error(self, mock_openai_client):
LOWpackages/openai-sdk-python/tests/test_middleware.py148 def test_wrapper_delegates_attributes(self, mock_openai_client):
LOWpackages/openai-sdk-python/tests/test_middleware.py167 async def test_memory_injection_profile_mode(
LOWpackages/openai-sdk-python/tests/test_middleware.py208 async def test_memory_injection_query_mode(
LOWpackages/openai-sdk-python/tests/test_middleware.py241 async def test_memory_injection_full_mode(
LOWpackages/openai-sdk-python/tests/test_middleware.py279 async def test_existing_system_prompt_enhancement(
LOWpackages/openai-sdk-python/tests/test_middleware.py322 async def test_empty_memories_do_not_modify_messages(
LOWpackages/openai-sdk-python/tests/test_middleware.py384 async def test_add_memory_always_mode(
LOWpackages/openai-sdk-python/tests/test_middleware.py418 async def test_add_memory_never_mode(
LOWpackages/openai-sdk-python/tests/test_middleware.py449 def test_sync_client_compatibility(self, mock_openai_client, mock_openai_response):
LOWpackages/openai-sdk-python/tests/test_middleware.py473 def test_sync_client_in_async_context(self, mock_openai_client, mock_openai_response):
LOWpackages/openai-sdk-python/tests/test_middleware.py504 def test_sync_client_memory_addition_error_handling(self, mock_openai_client, mock_openai_response):
LOWpackages/openai-sdk-python/tests/test_middleware.py538 async def test_supermemory_api_error_handling(
LOWpackages/openai-sdk-python/tests/test_middleware.py562 async def test_no_user_message_handling(
71 more matches not shown…
Unused Imports83 hits · 77 pts
SeverityFileLineSnippet
LOWpackages/agent-framework-python/tests/test_utils.py5
LOW…ckages/agent-framework-python/tests/test_middleware.py3
LOW…/agent-framework-python/tests/test_context_provider.py3
LOWpackages/agent-framework-python/tests/test_tools.py3
LOW…on/src/supermemory_agent_framework/context_provider.py10
LOW…ork-python/src/supermemory_agent_framework/__init__.py3
LOW…ork-python/src/supermemory_agent_framework/__init__.py7
LOW…ork-python/src/supermemory_agent_framework/__init__.py7
LOW…ork-python/src/supermemory_agent_framework/__init__.py7
LOW…ork-python/src/supermemory_agent_framework/__init__.py7
LOW…ork-python/src/supermemory_agent_framework/__init__.py14
LOW…ork-python/src/supermemory_agent_framework/__init__.py14
LOW…ork-python/src/supermemory_agent_framework/__init__.py19
LOW…ork-python/src/supermemory_agent_framework/__init__.py23
LOW…ork-python/src/supermemory_agent_framework/__init__.py23
LOW…ork-python/src/supermemory_agent_framework/__init__.py23
LOW…ork-python/src/supermemory_agent_framework/__init__.py23
LOW…ork-python/src/supermemory_agent_framework/__init__.py23
LOW…ork-python/src/supermemory_agent_framework/__init__.py31
LOW…ork-python/src/supermemory_agent_framework/__init__.py31
LOW…ork-python/src/supermemory_agent_framework/__init__.py31
LOW…ork-python/src/supermemory_agent_framework/__init__.py31
LOW…ork-python/src/supermemory_agent_framework/__init__.py31
LOW…ork-python/src/supermemory_agent_framework/__init__.py31
LOW…pipecat-sdk-python/src/supermemory_pipecat/__init__.py28
LOW…pipecat-sdk-python/src/supermemory_pipecat/__init__.py28
LOW…pipecat-sdk-python/src/supermemory_pipecat/__init__.py28
LOW…pipecat-sdk-python/src/supermemory_pipecat/__init__.py28
LOW…pipecat-sdk-python/src/supermemory_pipecat/__init__.py28
LOW…pipecat-sdk-python/src/supermemory_pipecat/__init__.py28
LOW…pipecat-sdk-python/src/supermemory_pipecat/__init__.py36
LOW…pipecat-sdk-python/src/supermemory_pipecat/__init__.py37
LOW…pipecat-sdk-python/src/supermemory_pipecat/__init__.py37
LOW…pipecat-sdk-python/src/supermemory_pipecat/__init__.py37
LOWpackages/docs-test/tests/python/sdk.py1
LOWpackages/docs-test/tests/python/user_profiles.py1
LOWpackages/docs-test/tests/python/search.py1
LOWpackages/docs-test/tests/python/quickstart.py1
LOW…rtesia-sdk-python/src/supermemory_cartesia/__init__.py34
LOW…rtesia-sdk-python/src/supermemory_cartesia/__init__.py34
LOW…rtesia-sdk-python/src/supermemory_cartesia/__init__.py34
LOW…rtesia-sdk-python/src/supermemory_cartesia/__init__.py34
LOW…rtesia-sdk-python/src/supermemory_cartesia/__init__.py34
LOW…rtesia-sdk-python/src/supermemory_cartesia/__init__.py34
LOW…rtesia-sdk-python/src/supermemory_cartesia/__init__.py42
LOW…rtesia-sdk-python/src/supermemory_cartesia/__init__.py42
LOW…rtesia-sdk-python/src/supermemory_cartesia/__init__.py42
LOW…rtesia-sdk-python/src/supermemory_cartesia/__init__.py42
LOWpackages/openai-sdk-python/tests/test_middleware.py6
LOWpackages/openai-sdk-python/tests/test_middleware.py7
LOWpackages/openai-sdk-python/tests/test_middleware.py7
LOW…ages/openai-sdk-python/src/supermemory_openai/tools.py19
LOW…ages/openai-sdk-python/src/supermemory_openai/tools.py19
LOW…ages/openai-sdk-python/src/supermemory_openai/tools.py19
LOW…s/openai-sdk-python/src/supermemory_openai/__init__.py3
LOW…s/openai-sdk-python/src/supermemory_openai/__init__.py3
LOW…s/openai-sdk-python/src/supermemory_openai/__init__.py3
LOW…s/openai-sdk-python/src/supermemory_openai/__init__.py3
LOW…s/openai-sdk-python/src/supermemory_openai/__init__.py3
LOW…s/openai-sdk-python/src/supermemory_openai/__init__.py3
23 more matches not shown…
Excessive Try-Catch Wrapping33 hits · 33 pts
SeverityFileLineSnippet
LOW…mework-python/src/supermemory_agent_framework/tools.py90 except Exception as error:
LOW…mework-python/src/supermemory_agent_framework/tools.py113 except Exception as error:
LOW…mework-python/src/supermemory_agent_framework/tools.py141 except Exception as error:
LOW…on/src/supermemory_agent_framework/context_provider.py121 except Exception as e:
LOW…on/src/supermemory_agent_framework/context_provider.py190 except Exception as e:
LOW…k-python/src/supermemory_agent_framework/middleware.py215 except Exception as error:
LOW…k-python/src/supermemory_agent_framework/middleware.py336 except Exception as e:
LOW…k-python/src/supermemory_agent_framework/middleware.py419 except Exception:
LOW…/pipecat-sdk-python/src/supermemory_pipecat/service.py115 except Exception as e:
LOW…/pipecat-sdk-python/src/supermemory_pipecat/service.py161 except Exception as e:
LOW…/pipecat-sdk-python/src/supermemory_pipecat/service.py181 except Exception as e:
LOW…/pipecat-sdk-python/src/supermemory_pipecat/service.py319 except Exception as e:
LOW…es/pipecat-sdk-python/src/supermemory_pipecat/utils.py48 except Exception:
LOW…/cartesia-sdk-python/src/supermemory_cartesia/utils.py48 except Exception:
LOW…/cartesia-sdk-python/src/supermemory_cartesia/agent.py141 except Exception as e:
LOW…/cartesia-sdk-python/src/supermemory_cartesia/agent.py190 except Exception as e:
LOW…/cartesia-sdk-python/src/supermemory_cartesia/agent.py227 except Exception as e:
LOW…/cartesia-sdk-python/src/supermemory_cartesia/agent.py370 except Exception as e:
LOW…/cartesia-sdk-python/src/supermemory_cartesia/agent.py437 except Exception as e:
LOWpackages/openai-sdk-python/README.md381except Exception as e:
LOWpackages/openai-sdk-python/test_integration.py68 except Exception as e:
LOWpackages/openai-sdk-python/test_integration.py118 except Exception as e:
LOWpackages/openai-sdk-python/test_integration.py137 except Exception as e:
LOWpackages/openai-sdk-python/test_integration.py171 except Exception as e:
LOW…ages/openai-sdk-python/src/supermemory_openai/tools.py208 except Exception as error:
LOW…ages/openai-sdk-python/src/supermemory_openai/tools.py244 except Exception as error:
LOW…openai-sdk-python/src/supermemory_openai/middleware.py256 except Exception as error:
LOW…openai-sdk-python/src/supermemory_openai/middleware.py291 except Exception as e:
LOW…openai-sdk-python/src/supermemory_openai/middleware.py472 except Exception as e:
LOWapps/docs/migration/mem0-migration-script.py110 except Exception as e:
LOWapps/docs/migration/mem0-migration-script.py221 except Exception as e:
LOWapps/docs/migration/mem0-migration-script.py259 except Exception as e:
LOWapps/docs/migration/mem0-migration-script.py330 except Exception as e:
Verbosity Indicators12 hits · 21 pts
SeverityFileLineSnippet
LOWpackages/tools/test/claude-memory-real-example.ts81 // Step 1: Make initial request to Claude
LOWpackages/tools/test/claude-memory-real-example.ts118 // Step 2: Handle any tool calls
LOWpackages/tools/test/claude-memory-real-example.ts149 // Step 3: Send tool results back to Claude if there were any
LOWpackages/tools/test/with-supermemory/unit.test.ts195 // Step 1: New turn (user message last)
LOWpackages/tools/test/with-supermemory/unit.test.ts207 // Step 2: Continuation (assistant/tool after user)
LOWapps/docs/migration/mem0-migration-script.py74 # Step 1: Create export job
LOWapps/docs/migration/mem0-migration-script.py83 # Step 2: Wait for export to complete
LOWapps/docs/migration/mem0-migration-script.py87 # Step 3: Retrieve the exported data using the correct method
LOWapps/docs/migration/mem0-migration-script.py91 # Step 4: Save backup
LOWapps/docs/migration/mem0-migration-script.py286 # Step 1: Export from Mem0
LOWapps/docs/migration/mem0-migration-script.py301 # Step 2: Import to Supermemory
LOWapps/docs/migration/mem0-migration-script.py307 # Step 3: Verify migration
Deep Nesting21 hits · 20 pts
SeverityFileLineSnippet
LOW…on/src/supermemory_agent_framework/context_provider.py240
LOW…on/src/supermemory_agent_framework/context_provider.py281
LOW…k-python/src/supermemory_agent_framework/middleware.py37
LOW…k-python/src/supermemory_agent_framework/middleware.py72
LOW…k-python/src/supermemory_agent_framework/middleware.py389
LOW…k-python/src/supermemory_agent_framework/middleware.py269
LOW…/pipecat-sdk-python/src/supermemory_pipecat/service.py270
LOW…es/pipecat-sdk-python/src/supermemory_pipecat/utils.py15
LOW…es/pipecat-sdk-python/src/supermemory_pipecat/utils.py90
LOW…/cartesia-sdk-python/src/supermemory_cartesia/utils.py15
LOW…/cartesia-sdk-python/src/supermemory_cartesia/utils.py90
LOW…/cartesia-sdk-python/src/supermemory_cartesia/agent.py194
LOW…/cartesia-sdk-python/src/supermemory_cartesia/agent.py264
LOW…/cartesia-sdk-python/src/supermemory_cartesia/agent.py288
LOW…/cartesia-sdk-python/src/supermemory_cartesia/agent.py374
LOWpackages/openai-sdk-python/tests/test_middleware.py735
LOWpackages/openai-sdk-python/tests/test_middleware.py773
LOW…ages/openai-sdk-python/src/supermemory_openai/utils.py80
LOW…ages/openai-sdk-python/src/supermemory_openai/utils.py125
LOW…openai-sdk-python/src/supermemory_openai/middleware.py330
LOW…openai-sdk-python/src/supermemory_openai/middleware.py422
Decorative Section Separators6 hits · 18 pts
SeverityFileLineSnippet
MEDIUMapps/web/components/timeline-view.tsx16// ─── Time period helpers ─────────────────────────────────────────────────────
MEDIUMapps/web/components/timeline-view.tsx37// ─── Document type helpers ────────────────────────────────────────────────────
MEDIUMapps/web/components/timeline-view.tsx137// ─── Grouped data structures ─────────────────────────────────────────────────
MEDIUMapps/web/components/timeline-view.tsx189// ─── Individual timeline card ─────────────────────────────────────────────────
MEDIUMapps/web/components/timeline-view.tsx301// ─── Collapsed group card ─────────────────────────────────────────────────────
MEDIUMapps/web/components/timeline-view.tsx484// ─── Main TimelineView ────────────────────────────────────────────────────────
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippet
HIGH…/pipecat-sdk-python/src/supermemory_pipecat/service.py123Retrieve relevant memories from Supermemory. Args: query: The search query for memory retrieval.
HIGH…openai-sdk-python/src/supermemory_openai/middleware.py626 Wraps an OpenAI client with SuperMemory middleware to automatically inject relevant memories into the system pr
Over-Commented Block10 hits · 10 pts
SeverityFileLineSnippet
LOWpackages/openai-sdk-python/tests/test_tools.py281 # self,
LOWpackages/openai-sdk-python/tests/test_tools.py301
LOWpackages/openai-sdk-python/tests/test_tools.py321
LOWskills/supermemory/references/sdk-guide.md141// dynamic: string[] // Array of dynamic memories (recent context)
LOWskills/supermemory/references/sdk-guide.md161 threshold=float # Optional: relevance threshold (0-1, default 0.5)
LOWskills/supermemory/references/sdk-guide.md221// results: Array<{
LOWapps/web/README.md1# supermemory Consumer
LOWapps/browser-extension/README.md1## supermemory Browser Extension
LOWapps/docs/README.md1# supermemory Docs
LOWapps/memory-graph-playground/next-env.d.ts1/// <reference types="next" />
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippet
LOWpackages/tools/test/claude-memory-examples.ts235// Example usage:
LOWpackages/tools/src/claude-memory-simple-example.ts60// Example usage
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMpackages/openai-sdk-python/test_integration.py150 # Create a fake OpenAI client for testing
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWapps/docs/migration/mem0-migration-script.py136 # Check if content exists