Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/assets/tools-qdrant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/tools/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,16 @@ Check out the following pre-built tools that you can use with ADK agents:
</div>
</a>

<a href="/adk-docs/tools/third-party/qdrant/" class="tool-card">
<div class="tool-card-image-wrapper">
<img src="../assets/tools-qdrant.png" alt="Qdrant">
</div>
<div class="tool-card-content">
<h3>Qdrant</h3>
<p>Store and retrieve information using semantic vector search</p>
</div>
</a>

<a href="/adk-docs/tools/third-party/scrapegraphai/" class="tool-card">
<div class="tool-card-image-wrapper">
<img src="../assets/tools-scrapegraphai.png" alt="ScrapeGraphAI">
Expand Down
10 changes: 10 additions & 0 deletions docs/tools/third-party/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ Check out the following third-party tools that you can use with ADK agents:
</div>
</a>

<a href="/adk-docs/tools/third-party/qdrant/" class="tool-card">
<div class="tool-card-image-wrapper">
<img src="../../assets/tools-qdrant.png" alt="Qdrant">
</div>
<div class="tool-card-content">
<h3>Qdrant</h3>
<p>Store and retrieve information using semantic vector search</p>
</div>
</a>

<a href="/adk-docs/tools/third-party/scrapegraphai/" class="tool-card">
<div class="tool-card-image-wrapper">
<img src="../../assets/tools-scrapegraphai.png" alt="ScrapeGraphAI">
Expand Down
101 changes: 101 additions & 0 deletions docs/tools/third-party/qdrant.md
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)
Comment thread
Anush008 marked this conversation as resolved.
Outdated
`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/)
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ nav:
- Hugging Face: tools/third-party/hugging-face.md
- Linear: tools/third-party/linear.md
- Notion: tools/third-party/notion.md
- Qdrant: tools/third-party/qdrant.md
- ScrapeGraphAI: tools/third-party/scrapegraphai.md
- Tavily: tools/third-party/tavily.md
- Agentic UI (AG-UI): tools/third-party/ag-ui.md
Expand Down
Loading