slashml-memory 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of slashml-memory might be problematic. Click here for more details.

@@ -0,0 +1,18 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ Copyright 2026 SlashML, Inc.
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
@@ -0,0 +1,67 @@
1
+ Metadata-Version: 2.4
2
+ Name: slashml-memory
3
+ Version: 1.0.0
4
+ Summary: / ml (SlashML): Sub-Millisecond Stateful Agent & Code Memory Python SDK
5
+ Author: SlashML Inc.
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://slashml.ai
8
+ Project-URL: Repository, https://github.com/slashml-ai/ml-memory
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: numpy>=1.24.0
13
+ Dynamic: license-file
14
+
15
+ # `/ ml` (`slashml-memory`) Python SDK
16
+
17
+ 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).
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ pip install slashml-memory
23
+ export SLASHML_API_KEY="sml_live_..."
24
+ ```
25
+
26
+ ## Quickstart
27
+
28
+ ### 1. Native `/ ml` Memory Client (`SlashMLMemory` / `MemoryClient`)
29
+
30
+ ```python
31
+ from slashml import SlashMLMemory
32
+
33
+ client = SlashMLMemory(api_key="sml_live_...")
34
+
35
+ # Ingest raw text or source code in a single pass ($0 LLM extraction cost)
36
+ client.ingest(
37
+ documents=[
38
+ {"id": "doc_1", "text": "Production PostgreSQL runs on port 5432 with pgBouncer on 6432."}
39
+ ],
40
+ user_id="alice",
41
+ )
42
+
43
+ # Sub-millisecond semantic & code query
44
+ hits = client.query("Which port does pgBouncer listen on?", user_id="alice", top_k=3)
45
+ print(hits["results"][0])
46
+
47
+ # Physical O(1) GDPR unlearning
48
+ client.forget(["doc_1"], user_id="alice")
49
+ ```
50
+
51
+ ### 2. 1-Line `Mem0` Drop-In Replacement (`Memory` & `MemoryClient`)
52
+
53
+ Replace `from mem0 import MemoryClient` or `from mem0 import Memory` with `from slashml import MemoryClient, Memory`:
54
+
55
+ ```python
56
+ # Before: from mem0 import MemoryClient
57
+ from slashml import MemoryClient
58
+
59
+ client = MemoryClient(api_key="sml_live_...")
60
+
61
+ client.add(
62
+ [{"role": "user", "content": "Always use uv and pytest -q for Python checks."}],
63
+ user_id="developer_1",
64
+ )
65
+
66
+ results = client.search("How should I run Python tests?", user_id="developer_1")
67
+ ```
@@ -0,0 +1,53 @@
1
+ # `/ ml` (`slashml-memory`) Python SDK
2
+
3
+ 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).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install slashml-memory
9
+ export SLASHML_API_KEY="sml_live_..."
10
+ ```
11
+
12
+ ## Quickstart
13
+
14
+ ### 1. Native `/ ml` Memory Client (`SlashMLMemory` / `MemoryClient`)
15
+
16
+ ```python
17
+ from slashml import SlashMLMemory
18
+
19
+ client = SlashMLMemory(api_key="sml_live_...")
20
+
21
+ # Ingest raw text or source code in a single pass ($0 LLM extraction cost)
22
+ client.ingest(
23
+ documents=[
24
+ {"id": "doc_1", "text": "Production PostgreSQL runs on port 5432 with pgBouncer on 6432."}
25
+ ],
26
+ user_id="alice",
27
+ )
28
+
29
+ # Sub-millisecond semantic & code query
30
+ hits = client.query("Which port does pgBouncer listen on?", user_id="alice", top_k=3)
31
+ print(hits["results"][0])
32
+
33
+ # Physical O(1) GDPR unlearning
34
+ client.forget(["doc_1"], user_id="alice")
35
+ ```
36
+
37
+ ### 2. 1-Line `Mem0` Drop-In Replacement (`Memory` & `MemoryClient`)
38
+
39
+ Replace `from mem0 import MemoryClient` or `from mem0 import Memory` with `from slashml import MemoryClient, Memory`:
40
+
41
+ ```python
42
+ # Before: from mem0 import MemoryClient
43
+ from slashml import MemoryClient
44
+
45
+ client = MemoryClient(api_key="sml_live_...")
46
+
47
+ client.add(
48
+ [{"role": "user", "content": "Always use uv and pytest -q for Python checks."}],
49
+ user_id="developer_1",
50
+ )
51
+
52
+ results = client.search("How should I run Python tests?", user_id="developer_1")
53
+ ```
@@ -0,0 +1,31 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "slashml-memory"
7
+ version = "1.0.0"
8
+ description = "/ ml (SlashML): Sub-Millisecond Stateful Agent & Code Memory Python SDK"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = {text = "Apache-2.0"}
12
+ authors = [{name = "SlashML Inc."}]
13
+ dependencies = [
14
+ "numpy>=1.24.0",
15
+ ]
16
+
17
+ [project.urls]
18
+ Homepage = "https://slashml.ai"
19
+ Repository = "https://github.com/slashml-ai/ml-memory"
20
+
21
+ [project.scripts]
22
+ slashml-mcp = "slashml.mcp_server:main"
23
+ slashml-mcp-code = "slashml.mcp_server:main_code_only"
24
+ slashml-eval = "slashml.eval_cli:main"
25
+
26
+ [tool.setuptools]
27
+ packages = ["slashml", "slashml.integrations"]
28
+ include-package-data = true
29
+
30
+ [tool.setuptools.package-data]
31
+ slashml = ["py.typed"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,61 @@
1
+ """/ ml (`slashml`) Python SDK — Sub-Millisecond Stateful Agent & Code Memory.
2
+
3
+ Provides 100% Mem0-compatible `Memory` and `MemoryClient` alongside `SlashMLMemory` and `SlashMLClient`.
4
+ """
5
+
6
+ from slashml.client import (
7
+ DEFAULT_BASE_URL,
8
+ AsyncMemoryClient,
9
+ AsyncSlashMLClient,
10
+ AsyncSlashMLMemory,
11
+ MemoryClient,
12
+ SlashMLAPIError,
13
+ SlashMLClient,
14
+ SlashMLMemory,
15
+ )
16
+ from slashml.compat import AsyncMemory, Memory
17
+ from slashml.integrations import (
18
+ SlashMLChatMessageHistory,
19
+ SlashMLCrewAIMemory,
20
+ SlashMLLangChainRetriever,
21
+ SlashMLLangChainVectorStore,
22
+ SlashMLLangGraphCheckpointer,
23
+ SlashMLLangGraphStore,
24
+ SlashMLLlamaIndexRetriever,
25
+ SlashMLLlamaIndexVectorStore,
26
+ )
27
+ from slashml.mcp_server import SlashMLMCPServer
28
+ from slashml.repo_indexer import (
29
+ RepositoryIndexer,
30
+ find_bug_candidates,
31
+ remap_memory_file_references,
32
+ search_code_by_behavior,
33
+ )
34
+
35
+ __version__ = "1.0.0"
36
+ __all__ = [
37
+ "AsyncMemory",
38
+ "AsyncMemoryClient",
39
+ "AsyncSlashMLClient",
40
+ "AsyncSlashMLMemory",
41
+ "DEFAULT_BASE_URL",
42
+ "Memory",
43
+ "MemoryClient",
44
+ "RepositoryIndexer",
45
+ "SlashMLAPIError",
46
+ "SlashMLChatMessageHistory",
47
+ "SlashMLClient",
48
+ "SlashMLCrewAIMemory",
49
+ "SlashMLLangChainRetriever",
50
+ "SlashMLLangChainVectorStore",
51
+ "SlashMLLangGraphCheckpointer",
52
+ "SlashMLLangGraphStore",
53
+ "SlashMLLlamaIndexRetriever",
54
+ "SlashMLLlamaIndexVectorStore",
55
+ "SlashMLMCPServer",
56
+ "SlashMLMemory",
57
+ "__version__",
58
+ "find_bug_candidates",
59
+ "remap_memory_file_references",
60
+ "search_code_by_behavior",
61
+ ]
@@ -0,0 +1,11 @@
1
+ """CLI entrypoint for `python -m slashml`."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import sys
6
+
7
+ from slashml.mcp_server import main
8
+
9
+
10
+ if __name__ == "__main__":
11
+ raise SystemExit(main(sys.argv[1:]))