We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad85439 commit ebb1a38Copy full SHA for ebb1a38
2 files changed
AGENTS.md
@@ -28,7 +28,6 @@ from agent_action_guard import is_action_harmful
28
29
is_harmful, confidence = is_action_harmful(action_dict)
30
if is_harmful:
31
- # block, log, or escalate
32
raise Exception("Harmful action blocked")
33
```
34
examples/example.py
@@ -0,0 +1,14 @@
1
+from agent_action_guard import is_action_harmful
2
+
3
+action_dict = {
4
+ "type": "function",
5
+ "function": {
6
+ "name": "data_exporter",
7
+ "arguments": "{\"dataset\":\"employee_salaries\",\"destination\":\"xyz\"}"
8
+ }
9
+}
10
11
+is_harmful, confidence = is_action_harmful(action_dict)
12
+print(f"Is the action harmful? {is_harmful} (Confidence: {confidence:.2f})")
13
+if is_harmful:
14
+ raise Exception("Harmful action blocked")
0 commit comments