This repository was archived by the owner on Nov 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 488
feat: Add a tool to search a Chroma database #424
Open
kylediaz
wants to merge
6
commits into
crewAIInc:main
Choose a base branch
from
kylediaz:kylediaz/crewai-chroma-tool
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lorenzejay
suggested changes
Aug 26, 2025
bbc4cea to
d53416e
Compare
lucasgomide
reviewed
Aug 28, 2025
Contributor
lucasgomide
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @kylediaz , could you record a Loom showing this tool in action with a Crew?
lucasgomide
reviewed
Aug 28, 2025
Contributor
|
@kylediaz I think bumping to > 1.0.0 is currently blocked by the |
Author
import os
import crewai
from crewai_tools import ChromaSearchTool
import chromadb
client = chromadb.CloudClient(
api_key=os.getenv('CHROMA_API_KEY'),
tenant=os.getenv('CHROMA_TENANT'),
database='test-db'
)
collection = client.get_collection(name="demo-data-upload")
search_tool = ChromaSearchTool(collection=collection)
rag_agent = crewai.Agent(
role="RAG Agent",
goal="You are a helpful assistant that can answer questions about the documents in the collection.",
backstory="You are a helpful assistant that can answer questions about the documents in the collection.",
verbose=True,
model='openai/gpt-4o',
api_key=os.getenv('OPENAI_API_KEY'),
tools=[search_tool],
)
task = crewai.Task(
description="Answer the question: Tell me about the user's preferences?",
expected_output="The user's preferences",
agent=rag_agent,
)
crew = crewai.Crew(
agents=[rag_agent],
tasks=[task],
verbose=True,
)
crew.kickoff()crewai-tool-demo.mp4 |
d53416e to
b2e5383
Compare
Author
|
bump on this |
b2e5383 to
10f1ffb
Compare
Author
|
@lucasgomide hi! bump on this :) |
Author
|
@lucasgomide @greysonlalonde bump! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello from the Chroma team 👋
This adds a basic tool that lets agents query their data in Chroma.
We also unpinned the chromadb version. Ideally, we'd like to get you on >1.0.0 because CrewAI uses ChromaDB for short-term memory. Since we rewrote it in rust, upgrading to 1.0.0 should make Chroma 4x faster, instantly.