Weaviate Query Agent Tool
vector-searchvector-databaseretrieval-augmented-generationllm-frameworksfunction-callingweaviate-recipesintegrationsPythongenerative-aillm-agent-frameworksanthropic
Export
Weaviate Query Agent with Anthropic
This notebook will show you how to define the Weaviate Query Agent as a tool through Anthropic.
Requirements
- Weaviate Cloud instance (WCD): The Weaviate Query Agent is only accessible through WCD at the moment. You can create a serverless cluster or a free 14-day sandbox here.
- Install the Anthropic Python API with
pip install anthropic. We're using version0.49.0at the time of creating this notebook. - Install the Weaviate Agents package with
pip install weaviate-agents - You'll need a Weaviate cluster with data. If you don't have one, check out this notebook to import the Weaviate Blogs.
Import libraries and keys
[ ]
[1]
Define Query Agent function
[ ]
Connect to Anthropic client and define Query Agent function
[8]
Query time
[9]
Question:
How do I run Weaviate with Docker?
==================================================
Tool plan:
I'll help you find information about running Weaviate with Docker. Let me search for that information for you.
Tool calls:
Tool name: send_query_agent_request | Parameters: {'query': 'How to run Weaviate with Docker'}
==================================================
Final response:
# Running Weaviate with Docker
Here's how to run Weaviate using Docker:
## Prerequisites
- Docker and Docker Compose installed on your system
- Basic familiarity with Docker commands
## Step-by-Step Instructions
1. **Install Docker and Docker Compose**
- For Windows/Mac: Install [Docker Desktop](https://www.docker.com/products/docker-desktop)
- For Linux: Install [Docker Engine](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/)
2. **Get the Docker Compose Configuration**
- Option 1: Use the [Weaviate configuration tool](https://weaviate.io/developers/weaviate/installation/docker-compose) to generate a custom `docker-compose.yml`
- Option 2: Download a sample configuration from Weaviate's documentation
3. **Start Weaviate**
```bash
docker compose up -d
```
The `-d` flag runs containers in detached mode (in the background)
4. **Verify Weaviate is Running**
- Check if Weaviate is ready by accessing the readiness endpoint:
```bash
curl http://localhost:8080/v1/.well-known/ready
```
- You should receive a 2xx status code when Weaviate is operational
## Notes
- This Docker Compose setup is recommended for development and testing
- For production environments, a Kubernetes deployment is recommended
Would you like me to provide more specific information about configuring Weaviate modules or customizing your Docker setup?
==================================================