-
Notifications
You must be signed in to change notification settings - Fork 963
docs: Added Qdrant to third-party tools #1039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # Qdrant | ||
|
|
||
| The [Qdrant MCP Server](https://github.com/qdrant/mcp-server-qdrant) connects | ||
| your ADK agent to [Qdrant](https://qdrant.tech/), an open-source vector search engine. This integration gives your agent the ability to store and | ||
| retrieve information using semantic search. | ||
|
|
||
| ## Use cases | ||
|
|
||
| - **Semantic Memory for Agents**: Store conversation context, facts, or learned | ||
| information that agents can retrieve later using natural language queries. | ||
|
|
||
| - **Code Repository Search**: Build a searchable index of code snippets, | ||
| documentation, and implementation patterns that can be queried semantically. | ||
|
|
||
| - **Knowledge Base Retrieval**: Create a retrieval-augmented generation (RAG) | ||
| system by storing documents and retrieving relevant context for responses. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - A running Qdrant instance. You can: | ||
| - Use [Qdrant Cloud](https://cloud.qdrant.io/) (managed service) | ||
| - Run locally with Docker: `docker run -p 6333:6333 qdrant/qdrant` | ||
| - (Optional) A Qdrant API key for authentication | ||
|
|
||
| ## Use with agent | ||
|
|
||
| === "Local MCP Server" | ||
|
|
||
| ```python | ||
| from google.adk.agents import Agent | ||
| from google.adk.tools.mcp_tool import McpToolset | ||
| from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams | ||
| from mcp import StdioServerParameters | ||
|
|
||
| QDRANT_URL = "http://localhost:6333" # Or your Qdrant Cloud URL | ||
| COLLECTION_NAME = "my_collection" | ||
| # QDRANT_API_KEY = "YOUR_QDRANT_API_KEY" | ||
|
|
||
| root_agent = Agent( | ||
| model="gemini-2.5-pro", | ||
| name="qdrant_agent", | ||
| instruction="Help users store and retrieve information using semantic search", | ||
| tools=[ | ||
| McpToolset( | ||
| connection_params=StdioConnectionParams( | ||
| server_params=StdioServerParameters( | ||
| command="uvx", | ||
| args=["mcp-server-qdrant"], | ||
| env={ | ||
| "QDRANT_URL": QDRANT_URL, | ||
| "COLLECTION_NAME": COLLECTION_NAME, | ||
| # "QDRANT_API_KEY": QDRANT_API_KEY, | ||
| } | ||
| ), | ||
| timeout=30, | ||
| ), | ||
| ) | ||
| ], | ||
| ) | ||
| ``` | ||
|
|
||
| ## Available tools | ||
|
|
||
| Tool | Description | ||
| ---- | ----------- | ||
| `qdrant-store` | Store information in Qdrant with optional metadata | ||
| `qdrant-find` | Search for relevant information using natural language queries | ||
|
|
||
| ## Configuration | ||
|
|
||
| The Qdrant MCP server can be configured using environment variables: | ||
|
|
||
| Variable | Description | Default | ||
| -------- | ----------- | ------- | ||
| `QDRANT_URL` | URL of the Qdrant server | `None` (required) | ||
| `QDRANT_API_KEY` | API key for Qdrant Cloud authentication | `None` | ||
| `COLLECTION_NAME` | Name of the collection to use | `None` (required) | ||
| `QDRANT_LOCAL_PATH` | Path for local persistent storage (alternative to URL) | `None` | ||
| `EMBEDDING_MODEL` | Embedding model to use | `sentence-transformers/all-MiniLM-L6-v2` | ||
| `EMBEDDING_PROVIDER` | Provider for embeddings (`fastembed` or `ollama`) | `fastembed` | ||
| `TOOL_STORE_DESCRIPTION` | Custom description for the store tool | Default description | ||
| `TOOL_FIND_DESCRIPTION` | Custom description for the find tool | Default description | ||
|
|
||
| ### Custom tool descriptions | ||
|
|
||
| You can customize the tool descriptions to guide the agent's behavior: | ||
|
|
||
| ```python | ||
| env={ | ||
| "QDRANT_URL": "http://localhost:6333", | ||
| "COLLECTION_NAME": "code-snippets", | ||
| "TOOL_STORE_DESCRIPTION": "Store code snippets with descriptions. The 'information' parameter should contain a description of what the code does, while the actual code should be in 'metadata.code'.", | ||
| "TOOL_FIND_DESCRIPTION": "Search for relevant code snippets using natural language. Describe the functionality you're looking for.", | ||
| } | ||
| ``` | ||
|
|
||
| ## Additional resources | ||
|
|
||
| - [Qdrant MCP Server Repository](https://github.com/qdrant/mcp-server-qdrant) | ||
| - [Qdrant Documentation](https://qdrant.tech/documentation/) | ||
| - [Qdrant Cloud](https://cloud.qdrant.io/) | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.