Add Python SDK - #71
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude review the PR/. |
|
Claude finished @Atharva-Kanherkar's task in 1m 46s —— View job PR Review: Add Python SDKTasks:
SummaryThis is a clean, well-structured SDK addition. The IssuesBug / API Design1. def get(self, record_id: str, *, type: str) -> MemoryRecord | None:Using Performance2. semantic_count = len(self._runtime.semantic_store.get_all_records())
Tests3. def test_find_contradictions(self, mem: Memory):
id1 = mem.remember("the capital of France is Paris")
id2 = mem.remember("the capital of France is Paris and it is lovely")
candidates = mem.find_contradictions(id1)
assert isinstance(candidates, list) # ← just checks it's a listThis test doesn't assert that 4. assert Memory is not None
assert RankedResult is not None
# MemoryRuntime, ContradictionCandidate, ProceduralMatch, ForgettingReport,
# SemanticMemory, EpisodicMemory, ProceduralMemory, MemoryRecord — not checkedAdd assertions for all exported names. Fix this → 5. The Minor / Nits6. Repeated modality="text" if not media_ref else (media_type or "text"),This same expression appears in all three 7. Missing For a pip-installable package, it's conventional to expose 8. participants=participants or ["user", "agent"],Defaulting to Positives
Overall this is merge-ready with the |
|
@claude can you tell me, if I use kaggles benchmarking system, it's in python, can I use it there? it seems like it's. a python plugin anyways? |
|
Claude finished @Atharva-Kanherkar's task in 39s —— View job Can you use this SDK on Kaggle?Short answer: Yes, technically — but with a few caveats worth knowing upfront. What worksKaggle notebooks run Python 3.10+ and support # In a Kaggle notebook cell
!pip install git+https://github.com/agentclash/agentic-memory.git(It's not on PyPI yet, so you'd pull from GitHub or upload the files manually.) Once installed, the import just works: from agentic_memory import Memory
m = Memory()
m.remember("some fact")Caveats1. You'll need a Google API key The package depends on 2. ChromaDB persistence is ephemeral
3. It's not a Kaggle "plugin" — it's a standard Python package. It works anywhere Python runs, including Kaggle notebooks. There's nothing Kaggle-specific about it. 4. Minimum setup for a Kaggle notebookimport os
os.environ["GEMINI_API_KEY"] = "your-key-here" # or use Kaggle Secrets
!pip install -q git+https://github.com/agentclash/agentic-memory.git
from agentic_memory import Memory
m = Memory()This should be enough to get |
Summary
agentic_memory.py— a single-file SDK exposing aMemoryclass that wraps the runtime with a clean, minimal APIpip install agentic-memorythenfrom agentic_memory import Memoryjust worksremember(),remember_episode(),remember_procedure(),recall(),recall_episodes(),recall_procedures(),find_contradictions(),resolve_contradiction(),record_outcome(),forget(),get(),overview(),events()RankedResult,ProceduralMatch,ContradictionCandidate,ForgettingReport, model classes)m.runtimeescape hatch for power users who need direct accesstests/test_sdk.py, all passingUsage
Test plan
pip install .andfrom agentic_memory import Memoryworks in a clean venv