Setup Guide to set up a LangChain/LangGraph-based multi-agent system that uses a locally running Ollama LLM to interpret vehicle sensor data like rain intensity or hood status from the Kuksa data broker and autonomously sets the appropriate windshield wiper mode via VSS actuators.
├── SmartWiperAgents <- local Langgraph agents
├── SmartWiperApp <- Velocitas Runtime
| Tool | Version | Purpose |
|---|---|---|
| Ubuntu / WSL2 | 24.04+ | Host OS |
| Python | 3.12+ | LangGraph runtime |
| Docker | 24+ | Kuksa databroker container |
| LangSmith API key | — | Studio tracing (smith.langchain.com) |
this creates the Velocitas-Runtime (Kuksa Databroker, MQTT, Mock-Service) that is used by the "vehicle" model inside "SmartWiperAgents"
git clone https://github.com/eclipse-velocitas/vehicle-app-python-template.git SmartWiperApp
cd SmartWiperApp
velocitas init
velocitas sync
velocitas exec runtime-local up
SmartWiperAgents is a multi-agent system using LangGraph that responds to VSS data from the Velocitas Vehicle Runtime and decides on the windshield wiper mode based on the input.
python3.12 --version
if not installed:
sudo apt install python3.12
install ubuntu binary and set up a system service so it can run in the background:
curl -fsSL https://ollama.com/install.sh | sh
start it with
ollama serve
pull the Ollama 3.1:8b model
ollama pull llama3.1:8b
python3.12 -m venv .venv
to activate the environment for the rest of the setup
source .venv/bin/activate
pip install -r requirements.txt
to define the directories as packages and allow import:
touch app/__init__.py
touch agents/__init__.py
touch graph/__init__.py
in the virtual environment
export PYTHONPATH="/your/path/to/the/project/SmartWiperApp/gen/vehicle_model:$PYTHONPATH"
to start the Velocitas-Vehicle-App run from /SmartWiperAgents
python -m app.SmartWiper
to change the standart values of the Velociats Runtime while is is running, install the KUKSA client:
pip install kuksa-client
start the KUKSA client:
kuksa-client grpc://127.0.0.1:55555
to change the standart values use this:
setValue Vehicle.Speed 0
setValue Vehicle.Body.Windshield.Front.Wiping.Mode "MEDIUM"
setValue Vehicle.Body.Hood.IsOpen true
Prerequisite: Have a account on smith.langchain.com
pip install -U "langgraph-cli[inmem]"
ollama pull llama3.1:8b
ollama serve
# LangSmith Tracing
LANGSMITH_API_KEY=lsv2_pt_xxxxxxxxxxxxxxxxxxxx #from Langsmith website
LANGSMITH_TRACING=true
LANGSMITH_PROJECT=SmartWiperAgents
LANGSMITH_ENDPOINT=https://api.smith.langchain.eu #must match the website where the Langsmith account is registered
# Ollama
OLLAMA_MODEL=llama3.1:8b
if outside of the EU, use LANGSMITH_ENDPOINT=https://api.smith.langchain.com
The API key can be generate under settings -> API keys
{
"$schema": "https://langgra.ph/schema.json",
"dependencies": ["."],
"graphs": {
"wiper_graph": "./graph/wiper_graph.py:graph"
},
"env": ".env",
"python_version": "3.12"
}
if not already installed in requirements.txt
pip install -U \
"langgraph-cli[inmem]" \
langgraph \
langchain-core \
langchain-ollama \
langsmith \
python-dotenv
langgraph dev
to use the benchmarking, psutil needs to be installed
pip install psutil