Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| 🔵 In progress View logs |
supermemory-mcp | b5add5a | Feb 17 2026, 03:12 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | e672af6 | Apr 15 2026, 04:31 PM |
How to use the Graphite Merge QueueAdd the label Main to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
de3ca2a to
22aeaaf
Compare
d2d0d8d to
6bcf26f
Compare
6bcf26f to
58622d3
Compare
|
@sreedharsreeram Waiting for the demo! |
58622d3 to
ec07caf
Compare
ec07caf to
fb08ea5
Compare
|
Claude finished @sreedharsreeram's task in 1m 23s —— View job Review Complete
Summary: All previously flagged issues have been resolved. The code is solid with proper error handling, background task management, and graceful degradation. No new bugs or security concerns found. Score: 10/10 — Ready to ship. |
There was a problem hiding this comment.
Overview: Adds a Python SDK for integrating Supermemory with Cartesia Line voice agents, enabling persistent memory retrieval and storage during voice conversations.
Issues found: None blocking.
The Sentry-flagged bug regarding _messages_sent_count not being incremented for first messages has been fixed (see agent.py:417). The untracked background task concern is a valid note but acceptable for fire-and-forget storage operations in this context.
Code quality observations:
- Clean separation of concerns (agent wrapper, utilities, exceptions)
- Proper error handling with graceful degradation (memory failures don't break the voice flow)
- Good defensive programming with
hasattrchecks for Cartesia event compatibility - Appropriate timeout (10s) on memory retrieval to prevent blocking voice interactions
Score: 9/10
The implementation is solid and ready to ship. The only reason it's not 10/10 is the untracked asyncio.create_task() calls—while acceptable for analytics, adding task references with done callbacks would be the ideal pattern for production robustness.
fb08ea5 to
e501b0d
Compare
There was a problem hiding this comment.
Overview: Adds a Python SDK for integrating Supermemory with Cartesia Line voice agents, enabling persistent memory retrieval and storage during voice conversations.
Issues found: None — this looks good to ship.
All previously flagged issues have been resolved:
- ✅
_messages_sent_countis now properly incremented when storing the first message (agent.py:429) - ✅ Documentation correctly uses
custom_idparameter throughout (notsession_id) - ✅
custom_idis properly marked as required in the parameter table
Code quality highlights:
- Clean separation of concerns (agent wrapper, utilities, exceptions)
- Proper error handling with graceful degradation — memory failures don't break the voice flow
- Background tasks are properly tracked (
_background_tasksset with done callbacks) to prevent GC issues - Appropriate 10s timeout on memory retrieval for voice responsiveness
- System prompt injection uses proper regex escaping and cleanup
Score: 10/10
The implementation is solid and ready to ship.
Merge activity
|
### TL;DR
Added Python SDK for integrating Supermemory with Cartesia Line voice agents, enabling persistent memory capabilities.
### What changed?
Created a new Python SDK package (`supermemory_cartesia`) that provides:
- `SupermemoryCartesiaAgent` wrapper class that enhances Cartesia Line agents with memory capabilities
- Memory retrieval and storage functionality that integrates with the Supermemory API
- Utility functions for memory formatting, deduplication, and time formatting
- Custom exception classes for error handling
- Comprehensive documentation and type hints
The implementation includes:
- Memory enrichment for user queries
- Automatic storage of conversation history
- Configurable memory retrieval modes (profile, query, full)
- Background processing to avoid blocking the main conversation flow
### How to test?
```python
from supermemory_cartesia import SupermemoryCartesiaAgent
from line.llm_agent import LlmAgent, LlmConfig
import os
# Create base LLM agent
base_agent = LlmAgent(
model="gemini/gemini-2.5-flash-preview-09-2025",
config=LlmConfig(
system_prompt="You are a helpful assistant.",
introduction="Hello!"
)
)
# Wrap with Supermemory
memory_agent = SupermemoryCartesiaAgent(
agent=base_agent,
api_key=os.getenv("SUPERMEMORY_API_KEY"),
user_id="user-123",
)
# Use memory_agent in your Cartesia Line application
```
### Why make this change?
This SDK enables Cartesia Line voice agents to maintain persistent memory across conversations, enhancing user experience by:
1. Providing contextual awareness of past interactions
2. Remembering user preferences and important information
3. Reducing repetition in conversations
4. Creating more personalized and natural voice interactions
The integration is designed to be lightweight and non-blocking, ensuring that memory operations don't impact the responsiveness of voice interactions.
304684f to
e672af6
Compare
| except Exception as e: | ||
| logger.error(f"[Supermemory] Error in process: {e}") | ||
| async for output in self.agent.process(env, event): | ||
| yield output |
There was a problem hiding this comment.
Bug: A generic exception handler in process() retries the async generator, causing duplicate outputs if an error occurs mid-stream.
Severity: HIGH
Suggested Fix
Remove the retry logic from the generic except block. The handler should log the error and potentially yield a specific error event or stop processing, but it should not re-invoke self.agent.process(env, event) to avoid duplicating outputs that were already successfully yielded.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: packages/cartesia-sdk-python/src/supermemory_cartesia/agent.py#L437-L440
Potential issue: The `process` method wraps the agent's async generator in a
`try...except Exception` block. If an exception occurs after the generator has already
yielded some output events, the `except` block catches it and retries the entire
`self.agent.process(env, event)` call from the beginning. This re-execution of the
non-idempotent generator causes the initial set of outputs to be yielded a second time,
leading to duplicate downstream events. For a voice agent, this would manifest as
repeated audio responses and inflated API call costs.
| else: | ||
| # No history yet, store just the current user message |
There was a problem hiding this comment.
Bug: The message history counter _messages_sent_count is reset to a hardcoded 1 instead of being incremented, risking duplicate message storage if history is missing for multiple turns.
Severity: LOW
Suggested Fix
The state tracking should be more robust. Instead of hardcoding the counter to 1, ensure it is only initialized once per conversation. A better approach might be to track the history state more explicitly (e.g., using a boolean flag like self._is_initialized) to prevent the initialization logic from running more than once.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: packages/cartesia-sdk-python/src/supermemory_cartesia/agent.py#L421-L422
Potential issue: In the `process` method, when `event.history` is falsy, the code enters
an `else` block that stores the current user message and hardcodes
`self._messages_sent_count` to `1`. This logic assumes the `else` block is only ever
executed on the first turn of a conversation. However, if an external condition causes
`event.history` to be falsy for multiple consecutive turns within the same conversation,
the counter will be repeatedly reset to `1`. When history is eventually populated, this
incorrect counter value will cause previously stored messages to be stored again.

TL;DR
Added Python SDK for integrating Supermemory with Cartesia Line voice agents, enabling persistent memory capabilities.
What changed?
Created a new Python SDK package (
supermemory_cartesia) that provides:SupermemoryCartesiaAgentwrapper class that enhances Cartesia Line agents with memory capabilitiesThe implementation includes:
How to test?
Why make this change?
This SDK enables Cartesia Line voice agents to maintain persistent memory across conversations, enhancing user experience by:
The integration is designed to be lightweight and non-blocking, ensuring that memory operations don't impact the responsiveness of voice interactions.