cai/examples
Víctor Mayoral Vilches d1b42233e6
Prompt injection mitigation (#249)
* Reproduce prompt injection flaw in CAI

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>

* Mitigate prompt injection

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>

* Add a second PoC, refactor and propose a message when guardrails are triggered

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>

* Add CAI_GUARDRAILS and 2 additional PoCs

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>

* Mitigate PoC 3

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>

* Mitigate PoC 4

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>

* Add and mitigate PoCs 5 and 6

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>

* Add PoCs 7 to 10

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>

* Test and mitigate PoCs 7 to 10

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>

* Add PoCs 11 to 14

Inspired by 'Embrade The Red' research and also by 'The Month of AI bugs'

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>

* Mitigate PoCs 11 to 14

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>

---------

Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
2025-08-28 20:25:24 +02:00
..
agent_patterns Address issues with litellm and agents SDK 2025-04-02 14:03:00 +02:00
basic Revert "Apply code formatting with make format" 2025-06-14 09:51:19 +00:00
cai Prompt injection mitigation (#249) 2025-08-28 20:25:24 +02:00
customer_service Initial commit 2025-03-11 09:42:28 -07:00
financial_research_agent fix tests 2025-03-20 09:52:15 -07:00
handoffs fix: use first_agent instead of second_agent for a task to generate random number 2025-03-13 18:26:49 -07:00
mcp Hotfix mcp example (#365) 2025-03-27 13:05:30 -04:00
model_providers Re-structure under sdk/agents, get CLI mockup 2025-03-27 14:31:38 +01:00
research_bot fix typos in /examples 2025-03-20 11:23:57 +01:00
tools make computer use example less verbose 2025-03-11 15:27:08 -07:00
voice fix(examples): make sure audio playback finishes 2025-03-25 12:11:33 -07:00
__init__.py Initial commit 2025-03-11 09:42:28 -07:00