feat: add offline OSHA safety compliance tool for vision models#6171
Open
anadya-s wants to merge 2 commits intoaden-hive:mainfrom
Open
feat: add offline OSHA safety compliance tool for vision models#6171anadya-s wants to merge 2 commits intoaden-hive:mainfrom
anadya-s wants to merge 2 commits intoaden-hive:mainfrom
Conversation
PR Requirements WarningThis PR does not meet the contribution requirements. Missing: No linked issue found. To fix:
Exception: To bypass this requirement, you can:
Micro-fix requirements (must meet ALL):
Why is this required? See #472 for details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces
osha_safety_tool.py, a localized reasoning tool designed to bridge computer vision models (like YOLOv8) with the Aden framework for automated safety compliance.Why this is needed
Currently, handling continuous video frame anomalies (e.g., missing PPE on a job site) requires routing every detection through an LLM, which rapidly burns through API rate limits.
This tool provides a hardcoded, offline reasoning layer. It allows a vision model to pass a simple anomaly string (
"no hard hat") to the agent, which then cross-references an internal database to return the exact official OSHA standard (e.g.,OSHA 1926.100(a)) and protocol without hitting external APIs.Changes Made
osha_safety_tool.pyusing theFastMCPpattern._TOOL_MODULESand unverified tool registries.Tested locally via a simulated YOLO-to-Agent bridge script.
Fixes #6172