SecurityAgent / tools /security_detail_planner.py
ahghorbe97's picture
Upload agent
60e03c1 verified
from typing import Any, Optional
from smolagents.tools import Tool
class SecurityDetailTool(Tool):
name = "security_detail_planner"
description = """
This tool helps plan security measures for my event.
It suggests security protocols based on the event's risk level."""
inputs = {'risk_level': {'type': 'string', 'description': "The risk level of the event (e.g., 'low', 'medium', 'high')."}}
output_type = "string"
def forward(self, risk_level: str):
protocols = {
"low": "Basic perimeter security with minimal personnel at entry points.",
"medium": "Increased security with regular patrols, surveillance, and a security check at the entrance.",
"high": "Full lockdown protocol, including metal detectors, snipers on rooftops, and a SWAT team on standby."
}
return protocols.get(risk_level.lower(), "Security protocol not found. Try 'low', 'medium', or 'high'.")
def __init__(self, *args, **kwargs):
self.is_initialized = False