supermemory/packages/cartesia-sdk-python/requirements.txt
sreedharsreeram e672af6b3d Supermemory-Cartesia SDK (#744)
### 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.
2026-04-15 16:27:23 +00:00

5 lines
117 B
Text

# Core dependencies for supermemory-cartesia
supermemory>=3.16.0
pydantic>=2.10.0
loguru>=0.7.3
cartesia-line>=0.2.0