Skip to main content

/ ml (slashml-memory) Python SDK

Official thin HTTP Python SDK for / ml (https://api.slashml.ai) — sub-millisecond stateful agent & code memory. Zero native binary or local model dependencies (urllib.request standard library).

Installation

pip install slashml-memory
export SLASHML_API_KEY="sml_live_..."

Quickstart

1. Native / ml Memory Client (SlashMLMemory / MemoryClient)

from slashml import SlashMLMemory

client = SlashMLMemory(api_key="sml_live_...")

# Ingest text or source code
client.ingest(
    documents=[
        {"id": "doc_1", "text": "Production PostgreSQL runs on port 5432 with pgBouncer on 6432."}
    ],
    user_id="alice",
)

# Query stored memories
hits = client.query("Which port does pgBouncer listen on?", user_id="alice", top_k=3)
print(hits["results"][0])

# Delete documents by ID
client.forget(["doc_1"], user_id="alice")

2. 1-Line Mem0 Drop-In Replacement (Memory & MemoryClient)

Replace from mem0 import MemoryClient or from mem0 import Memory with from slashml import MemoryClient, Memory:

# Before: from mem0 import MemoryClient
from slashml import MemoryClient

client = MemoryClient(api_key="sml_live_...")

client.add(
    [{"role": "user", "content": "Always use uv and pytest -q for Python checks."}],
    user_id="developer_1",
)

results = client.search("How should I run Python tests?", user_id="developer_1")

# 3. Evaluate an agent turn or tool action
decision = client.intervene(
    "pip install pytest",
    hook_event_name="PreToolUse",
    tool_name="Bash",
    user_id="developer_1",
)

3. CLI & Ambient Hook Installation

python -m slashml.mcp_server --install-hooks --api-key "$SLASHML_API_KEY"

Metadata

Release files for slashml-memory 1.0.4

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

Source distribution (sdist)

Source distribution for slashml-memory 1.0.4
File Size Uploaded Provenance Actions
slashml_memory-1.0.4.tar.gz 26.5 kB Without provenance Details for slashml_memory-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for slashml-memory 1.0.4
File Interpreter ABI Platform Actions
slashml_memory-1.0.4-py3-none-any.whl Python 3 none any Details for slashml_memory-1.0.4-py3-none-any.whl

Total release size: 56.8 kB

Release files / slashml_memory-1.0.4.tar.gz

Download URL slashml_memory-1.0.4.tar.gz
Size 26.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5ed1040ae18165374062c02d9ba6dedf381030434a30766e725d5a512e64b349
BLAKE2b-256 checksum
How to use checksums
9e34e502ae2314beb9bd2ad8bd057ed1ca0218ed85cb494cb85ee8cb611b752b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / slashml_memory-1.0.4-py3-none-any.whl

Download URL slashml_memory-1.0.4-py3-none-any.whl
Size 30.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ebfadb07ab85dbcb4fcf16ed7ce588c8a21fd787054318c477c6d1f1a4de3ad6
BLAKE2b-256 checksum
How to use checksums
533cad126c791f0991c8b21b228d40c931c654845b18215d0597c02176142316
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for slashml-memory 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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