|
| 1 | +{ |
| 2 | + "entryPoints": [ |
| 3 | + { |
| 4 | + "filePath": "agent", |
| 5 | + "uniqueId": "0afddb15-cecc-4a20-87ef-c1a65a690fcb", |
| 6 | + "type": "agent", |
| 7 | + "input": { |
| 8 | + "type": "object", |
| 9 | + "properties": { |
| 10 | + "word": { |
| 11 | + "type": "string", |
| 12 | + "description": "The word to base the joke on" |
| 13 | + } |
| 14 | + }, |
| 15 | + "required": ["word"] |
| 16 | + }, |
| 17 | + "output": { |
| 18 | + "type": "object", |
| 19 | + "properties": { |
| 20 | + "joke": { |
| 21 | + "type": "string", |
| 22 | + "description": "The generated family-friendly joke" |
| 23 | + }, |
| 24 | + "randomName": { |
| 25 | + "type": "string", |
| 26 | + "description": "A randomly generated name" |
| 27 | + }, |
| 28 | + "analysis": { |
| 29 | + "type": "string", |
| 30 | + "description": "The analysis result from the SentenceAnalyzer tool" |
| 31 | + }, |
| 32 | + "explanation": { |
| 33 | + "type": "string", |
| 34 | + "description": "An explanation if a joke couldn't be generated" |
| 35 | + } |
| 36 | + }, |
| 37 | + "required": ["joke", "randomName", "analysis"] |
| 38 | + } |
| 39 | + } |
| 40 | + ], |
| 41 | + "bindings": { |
| 42 | + "version": "2.0", |
| 43 | + "resources": [], |
| 44 | + "guardrails": [ |
| 45 | + { |
| 46 | + "$guardrailType": "custom", |
| 47 | + "id": "0dac2299-a8ae-43aa-8703-3eb93c657b2a", |
| 48 | + "name": "Guardrail on input for donkey", |
| 49 | + "description": "Filters out the word 'donkey' from tool inputs", |
| 50 | + "enabledForEvals": true, |
| 51 | + "selector": { |
| 52 | + "scopes": ["Tool"], |
| 53 | + "matchNames": ["Agent _ Sentence Analyzer"] |
| 54 | + }, |
| 55 | + "rules": [ |
| 56 | + { |
| 57 | + "$ruleType": "word", |
| 58 | + "fieldSelector": { |
| 59 | + "$selectorType": "specific", |
| 60 | + "fields": [ |
| 61 | + { |
| 62 | + "path": "sentence", |
| 63 | + "source": "input" |
| 64 | + } |
| 65 | + ] |
| 66 | + }, |
| 67 | + "operator": "contains", |
| 68 | + "value": "donkey" |
| 69 | + } |
| 70 | + ], |
| 71 | + "action": { |
| 72 | + "$actionType": "filter", |
| 73 | + "fields": [ |
| 74 | + { |
| 75 | + "path": "sentence", |
| 76 | + "source": "input" |
| 77 | + } |
| 78 | + ] |
| 79 | + } |
| 80 | + }, |
| 81 | + { |
| 82 | + "$guardrailType": "builtInValidator", |
| 83 | + "id": "3b4d5416-202a-47ab-bba6-89fa8940a5cf", |
| 84 | + "name": "PII detection guardrail", |
| 85 | + "description": "This validator is designed to detect personally identifiable information", |
| 86 | + "validatorType": "pii_detection", |
| 87 | + "validatorParameters": [ |
| 88 | + { |
| 89 | + "$parameterType": "enum-list", |
| 90 | + "id": "entities", |
| 91 | + "value": ["Email", "Address", "Person"] |
| 92 | + }, |
| 93 | + { |
| 94 | + "$parameterType": "map-enum", |
| 95 | + "id": "entityThresholds", |
| 96 | + "value": { |
| 97 | + "Email": 0.5, |
| 98 | + "Address": 0.5, |
| 99 | + "Person": 0.5 |
| 100 | + } |
| 101 | + } |
| 102 | + ], |
| 103 | + "action": { |
| 104 | + "$actionType": "block", |
| 105 | + "reason": "PII detected" |
| 106 | + }, |
| 107 | + "enabledForEvals": true, |
| 108 | + "selector": { |
| 109 | + "scopes": ["Agent", "Llm"], |
| 110 | + "matchNames": [] |
| 111 | + } |
| 112 | + }, |
| 113 | + { |
| 114 | + "$guardrailType": "builtInValidator", |
| 115 | + "id": "255b1220-97f8-4d79-be8e-052a664b2b90", |
| 116 | + "name": "Prompt injection guardrail", |
| 117 | + "description": "This validator is built to detect malicious attack attempts", |
| 118 | + "validatorType": "prompt_injection", |
| 119 | + "validatorParameters": [ |
| 120 | + { |
| 121 | + "$parameterType": "number", |
| 122 | + "id": "threshold", |
| 123 | + "value": 0.5 |
| 124 | + } |
| 125 | + ], |
| 126 | + "action": { |
| 127 | + "$actionType": "block", |
| 128 | + "reason": "Prompt Injection detected" |
| 129 | + }, |
| 130 | + "enabledForEvals": true, |
| 131 | + "selector": { |
| 132 | + "scopes": ["Llm"], |
| 133 | + "matchNames": [] |
| 134 | + } |
| 135 | + } |
| 136 | + ] |
| 137 | + } |
| 138 | +} |
| 139 | + |
0 commit comments