crewai-memory-chroma 0.1.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.
@@ -0,0 +1,6 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.egg-info/
4
+ pip.log
5
+ results/
6
+ dist/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Federico Laurianti
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.5
2
+ Name: crewai-memory-chroma
3
+ Version: 0.1.0
4
+ Summary: A storage backend for the memory of CrewAI on a Chroma server.
5
+ Project-URL: Repository, https://github.com/VecturaDB/crewai-memory-chroma
6
+ Project-URL: Issues, https://github.com/VecturaDB/crewai-memory-chroma/issues
7
+ Author: Federico Laurianti
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: agents,chroma,chromadb,crewai,memory,vecturadb
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
+ Requires-Python: <3.14,>=3.10
19
+ Requires-Dist: chromadb~=1.5.9
20
+ Requires-Dist: crewai<2,>=1.15.35
21
+ Description-Content-Type: text/markdown
22
+
23
+ # crewai-memory-chroma
24
+
25
+ A storage backend for the memory of [CrewAI](https://github.com/crewAIInc/crewAI) that keeps the memories of a crew in a collection of a Chroma server, or of any server with the API of Chroma, such as [VecturaDB](https://github.com/VecturaDB/VecturaDB).
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ pip install crewai-memory-chroma
31
+ ```
32
+
33
+ ## Use
34
+
35
+ Start a server, for example:
36
+
37
+ ```bash
38
+ docker run -d -p 8000:8000 chromadb/chroma:1.5.9
39
+ ```
40
+
41
+ Then give the backend to the memory of the crew:
42
+
43
+ ```python
44
+ import chromadb
45
+ from crewai import Crew, Memory
46
+ from crewai_memory_chroma import ChromaStorage
47
+
48
+ storage = ChromaStorage(
49
+ client=chromadb.HttpClient(host="127.0.0.1", port=8000),
50
+ collection_name="memories",
51
+ )
52
+ crew = Crew(agents=[...], tasks=[...], memory=Memory(storage=storage))
53
+ ```
54
+
55
+ `client` takes any client of the `chromadb` package. Without it, `ChromaStorage` uses `chromadb.HttpClient()` with its defaults.
56
+
57
+ ## What it does
58
+
59
+ It does what `LanceDBStorage`, the default backend of CrewAI, does: the same fields, the same scores (`1 / (1 + distance)`, with the squared L2 distance of Chroma), the same checks of the embedding dimension. Two things work as in `QdrantEdgeStorage`:
60
+
61
+ - Scopes are matched by path: `/crew/research` matches itself and `/crew/research/...`, not `/crew/research-2`.
62
+ - A search by category is filtered by the server before the nearest records are taken, so a record of that category is found even when other records are nearer.
63
+
64
+ ## Tested with
65
+
66
+ In our tests, with CrewAI 1.15.35 and the `chromadb` client 1.5.9, against Chroma 1.5.9 and VecturaDB 1.0.0-preview.6:
67
+
68
+ - the memory tests of CrewAI 1.15.35 with `LanceDBStorage` replaced by this backend: 171 of 172 pass; the other one expects a search by a part of a scope name to match;
69
+ - random operations compared with `LanceDBStorage`, result by result, apart from the two differences above;
70
+ - the scopes, the categories, records without an embedding and the dimension checks.
71
+
72
+ ## If CrewAI takes it in
73
+
74
+ If CrewAI takes this backend in, this package will be deprecated and we will maintain the backend there.
75
+
76
+ ## License
77
+
78
+ MIT. Provided as is, without warranty.
79
+
80
+ Independent project. Not affiliated with, endorsed by or sponsored by Chroma Inc. or crewAI, Inc. CHROMA is a registered trademark of Chroma Inc., used here only to describe compatibility.
@@ -0,0 +1,58 @@
1
+ # crewai-memory-chroma
2
+
3
+ A storage backend for the memory of [CrewAI](https://github.com/crewAIInc/crewAI) that keeps the memories of a crew in a collection of a Chroma server, or of any server with the API of Chroma, such as [VecturaDB](https://github.com/VecturaDB/VecturaDB).
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install crewai-memory-chroma
9
+ ```
10
+
11
+ ## Use
12
+
13
+ Start a server, for example:
14
+
15
+ ```bash
16
+ docker run -d -p 8000:8000 chromadb/chroma:1.5.9
17
+ ```
18
+
19
+ Then give the backend to the memory of the crew:
20
+
21
+ ```python
22
+ import chromadb
23
+ from crewai import Crew, Memory
24
+ from crewai_memory_chroma import ChromaStorage
25
+
26
+ storage = ChromaStorage(
27
+ client=chromadb.HttpClient(host="127.0.0.1", port=8000),
28
+ collection_name="memories",
29
+ )
30
+ crew = Crew(agents=[...], tasks=[...], memory=Memory(storage=storage))
31
+ ```
32
+
33
+ `client` takes any client of the `chromadb` package. Without it, `ChromaStorage` uses `chromadb.HttpClient()` with its defaults.
34
+
35
+ ## What it does
36
+
37
+ It does what `LanceDBStorage`, the default backend of CrewAI, does: the same fields, the same scores (`1 / (1 + distance)`, with the squared L2 distance of Chroma), the same checks of the embedding dimension. Two things work as in `QdrantEdgeStorage`:
38
+
39
+ - Scopes are matched by path: `/crew/research` matches itself and `/crew/research/...`, not `/crew/research-2`.
40
+ - A search by category is filtered by the server before the nearest records are taken, so a record of that category is found even when other records are nearer.
41
+
42
+ ## Tested with
43
+
44
+ In our tests, with CrewAI 1.15.35 and the `chromadb` client 1.5.9, against Chroma 1.5.9 and VecturaDB 1.0.0-preview.6:
45
+
46
+ - the memory tests of CrewAI 1.15.35 with `LanceDBStorage` replaced by this backend: 171 of 172 pass; the other one expects a search by a part of a scope name to match;
47
+ - random operations compared with `LanceDBStorage`, result by result, apart from the two differences above;
48
+ - the scopes, the categories, records without an embedding and the dimension checks.
49
+
50
+ ## If CrewAI takes it in
51
+
52
+ If CrewAI takes this backend in, this package will be deprecated and we will maintain the backend there.
53
+
54
+ ## License
55
+
56
+ MIT. Provided as is, without warranty.
57
+
58
+ Independent project. Not affiliated with, endorsed by or sponsored by Chroma Inc. or crewAI, Inc. CHROMA is a registered trademark of Chroma Inc., used here only to describe compatibility.
@@ -0,0 +1,38 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "crewai-memory-chroma"
7
+ version = "0.1.0"
8
+ description = "A storage backend for the memory of CrewAI on a Chroma server."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ authors = [{ name = "Federico Laurianti" }]
13
+ requires-python = ">=3.10,<3.14"
14
+ dependencies = ["crewai>=1.15.35,<2", "chromadb~=1.5.9"]
15
+ keywords = ["crewai", "chroma", "chromadb", "vecturadb", "memory", "agents"]
16
+ classifiers = [
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.10",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Operating System :: OS Independent",
23
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
24
+ ]
25
+
26
+ [project.urls]
27
+ Repository = "https://github.com/VecturaDB/crewai-memory-chroma"
28
+ Issues = "https://github.com/VecturaDB/crewai-memory-chroma/issues"
29
+
30
+ [tool.hatch.build.targets.wheel]
31
+ packages = ["src/crewai_memory_chroma"]
32
+
33
+ [tool.hatch.build.targets.sdist]
34
+ include = ["src", "tests", "README.md", "LICENSE", "pyproject.toml"]
35
+
36
+ [tool.pytest.ini_options]
37
+ testpaths = ["tests"]
38
+ asyncio_default_fixture_loop_scope = "function"
@@ -0,0 +1,6 @@
1
+ """A Chroma storage backend for the unified memory of CrewAI."""
2
+
3
+ from crewai_memory_chroma.storage import ChromaStorage
4
+
5
+
6
+ __all__ = ["ChromaStorage"]