Skip to main content

drivemem

Python SDK for DriveMem — connect any AI agent to shared knowledge.

Install

pip install drivemem

Quick Start

from drivemem import DriveMem

mem = DriveMem(api_key="ak_your_key")

# Search knowledge
results = mem.search("product strategy")

# Ask a question (RAG)
answer = mem.ask("What decisions were made about pricing?")

# Store knowledge
mem.store("Decision: Free tier for first 100 users", title="Pricing decision")

# Compile briefing for a task
briefing = mem.compile("Write a go-to-market plan")
print(briefing["compiledContext"])

# Check connection
assert mem.ping()

Use with LangChain

from drivemem import DriveMem
from langchain.agents import AgentExecutor

mem = DriveMem(api_key=os.environ["DRIVEMEM_KEY"])

# On agent start — get context
context = mem.compile("current task description")
system_prompt = f"{base_prompt}\n\n{context['compiledContext']}"

# During work — search relevant knowledge
relevant = mem.search("current topic")

# On completion — store conclusions
mem.store(agent_output, title="Task result", tags="decision")

Use with CrewAI

from drivemem import DriveMem

mem = DriveMem(api_key=os.environ["DRIVEMEM_KEY"])

# Before crew runs
briefing = mem.compile(crew_task_description)

# After crew completes
mem.store(crew_output, title=f"CrewAI: {task_name}")

API

Method Description
search(query) Semantic search
ask(question) RAG Q&A with citations
store(content, title?, tags?) Save knowledge
compile(task, token_budget?, project?, tags?, recency?) Generate briefing
files(detail?) List files
ping() Verify connection

Metadata

Release files for drivemem 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for drivemem 0.1.0
File Size Uploaded
drivemem-0.1.0.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for drivemem 0.1.0
File Interpreter ABI Platform
drivemem-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.5 kB

Release files / drivemem-0.1.0.tar.gz

Download URL drivemem-0.1.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5925a3fd8fee79da986a395542e982d9d37e7521be7498027bd08a1806c80a6a
BLAKE2b-256 checksum
How to use checksums
bdaa22111aeb11eb0fa445025e90e915cde2ef8d5d39996096b1e2ae8a05eb23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / drivemem-0.1.0-py3-none-any.whl

Download URL drivemem-0.1.0-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8cb7572c6a22f9c5684c5a6913c65b676d63b52b3ec9c382df6580d0485977e4
BLAKE2b-256 checksum
How to use checksums
d4c0ab32804b7c0aa10ca4ad369361485376425171f6d6655df696b40d1b5f81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page