Skip to main content

DriveMem SDK — connect any AI agent to shared knowledge

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drivemem-0.1.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drivemem-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file drivemem-0.1.0.tar.gz.

File metadata

  • Download URL: drivemem-0.1.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for drivemem-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5925a3fd8fee79da986a395542e982d9d37e7521be7498027bd08a1806c80a6a
MD5 fbbb4601a179a9f2b04d4c6825854046
BLAKE2b-256 bdaa22111aeb11eb0fa445025e90e915cde2ef8d5d39996096b1e2ae8a05eb23

See more details on using hashes here.

File details

Details for the file drivemem-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: drivemem-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for drivemem-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cb7572c6a22f9c5684c5a6913c65b676d63b52b3ec9c382df6580d0485977e4
MD5 b713c9cb3f44daafac5fbe9f45a46211
BLAKE2b-256 d4c0ab32804b7c0aa10ca4ad369361485376425171f6d6655df696b40d1b5f81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page