A minimal proof-of-concept showing how to integrate Vanna AI — a natural language–to–SQL engine — into a LangChain 1.0 agent, alongside another tool (OpenWeather) to demonstrate multi-tool routing.
- 🧩 Vanna Tool — Streams answers from Vanna’s
/chat_sseendpoint - 🌤 Weather Tool — Uses OpenWeather API for real-time city forecasts
- 🧠 LangChain Agent — Automatically decides which tool to call
- 🔐 .env-based Config — No hard-coded API keys
To get started:
-
Clone the repository
git clone https://github.com/vanna-ai/langchain.git cd langchain -
Create and activate a virtual environment
python3 -m venv venv source venv/bin/activate -
Install dependencies
pip install -r requirements.txt -
Copy the example environment file and fill in your keys
cp .env.example .env -
Run the agent
python main.py
Who is the largest customer, what are total sales?
What's the weather in Paris?
OPENAI_API_KEY=your_openai_key
VANNA_API_KEY=your_vanna_key
VANNA_AGENT_ID=look-service-account
VANNA_USER_EMAIL=your_email_here
OPENWEATHER_KEY=your_openweather_key
.
├── main.py
├── requirements.txt
├── test_vanna_api.py
├── .env.example
├── .gitignore
└── README.md
Vanna AI
Description: Simple LangChain 1.0 agent integrating Vanna and external APIs.
🌐 https://vanna.ai
Vanna AI is a conversational analytics engine that connects to your databases and lets you ask business questions in natural language — returning SQL, charts, or dataframes as responses.