Skip to content

Commit de3ca2a

Browse files
Fix event content extraction and history handling in Cartesia agent
1 parent 236216a commit de3ca2a

File tree

5 files changed

+691
-0
lines changed

5 files changed

+691
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
MANIFEST
23+
24+
# Virtual environments
25+
venv/
26+
env/
27+
ENV/
28+
.venv
29+
30+
# IDE
31+
.vscode/
32+
.idea/
33+
*.swp
34+
*.swo
35+
*~
36+
37+
# Testing
38+
.pytest_cache/
39+
.coverage
40+
htmlcov/
41+
.tox/
42+
43+
# Type checking
44+
.mypy_cache/
45+
.dmypy.json
46+
dmypy.json
47+
48+
# Environment
49+
.env
50+
.env.local
51+
.env.*.local
52+
53+
# macOS
54+
.DS_Store
55+
56+
# Logs
57+
*.log
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
"""Supermemory Cartesia SDK - Memory-enhanced voice agents with Cartesia Line.
2+
3+
This package provides seamless integration between Supermemory and Cartesia Line,
4+
enabling persistent memory and context enhancement for voice AI applications.
5+
6+
Example:
7+
```python
8+
from supermemory_cartesia import SupermemoryCartesiaAgent, MemoryConfig
9+
from line.llm_agent import LlmAgent, LlmConfig
10+
11+
# Create base LLM agent
12+
base_agent = LlmAgent(
13+
model="gemini/gemini-2.5-flash-preview-09-2025",
14+
config=LlmConfig(
15+
system_prompt="You are a helpful assistant.",
16+
introduction="Hello!"
17+
)
18+
)
19+
20+
# Wrap with Supermemory
21+
memory_agent = SupermemoryCartesiaAgent(
22+
agent=base_agent,
23+
api_key=os.getenv("SUPERMEMORY_API_KEY"),
24+
user_id="user-123",
25+
)
26+
```
27+
"""
28+
29+
from .agent import SupermemoryCartesiaAgent
30+
from .exceptions import (
31+
APIError,
32+
ConfigurationError,
33+
MemoryRetrievalError,
34+
MemoryStorageError,
35+
NetworkError,
36+
SupermemoryCartesiaError,
37+
)
38+
from .utils import (
39+
deduplicate_memories,
40+
format_memories_to_text,
41+
format_relative_time,
42+
get_last_user_message,
43+
)
44+
45+
__version__ = "0.1.0"
46+
47+
__all__ = [
48+
# Main agent
49+
"SupermemoryCartesiaAgent",
50+
# Exceptions
51+
"SupermemoryCartesiaError",
52+
"ConfigurationError",
53+
"MemoryRetrievalError",
54+
"MemoryStorageError",
55+
"APIError",
56+
"NetworkError",
57+
# Utilities
58+
"get_last_user_message",
59+
"deduplicate_memories",
60+
"format_memories_to_text",
61+
"format_relative_time",
62+
]

0 commit comments

Comments
 (0)