From 1a8d63c5f0d6eeea5e673470a61404961b67f0ef Mon Sep 17 00:00:00 2001 From: Gaetan Hurel Date: Fri, 27 Jun 2025 10:16:42 +0200 Subject: [PATCH] remove warning --- simple-react-agent/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/simple-react-agent/main.py b/simple-react-agent/main.py index e882fca..30e39b1 100644 --- a/simple-react-agent/main.py +++ b/simple-react-agent/main.py @@ -1,10 +1,14 @@ import os +import warnings from langchain.chat_models import init_chat_model from langchain_community.tools.shell.tool import ShellTool from langgraph.prebuilt import create_react_agent from langchain_core.messages import HumanMessage from custom_tools.poem_tool import print_poem +# Suppress the shell tool warning since we're using it intentionally for sysadmin tasks +warnings.filterwarnings("ignore", message="The shell tool has no safeguards by default. Use at your own risk.") + def create_agent(): """Create and return a ReAct agent specialized for system administration and debugging."""