Concept: Agent Evaluation | Python:
client.agent.check_injection()Parameters
The text to scan for injection attempts. Can be user input, tool output, a retrieved document, or any string an agent is about to process.
Optional description of where this text came from, e.g.
"user_input", "web_search_result", "api_response".Request
Response
The response is flat — noresult wrapper:
true if an injection attempt was detected.Confidence score from 0.0 to 1.0.
"none", "direct_instruction_override", "role_hijack", "jailbreak", "data_exfil_attempt", or "indirect_injection"."none", "low", "medium", "high", or "critical"."PASS", "FLAG", or "BLOCK".Usage in SDK
Common injection patterns detected
Instruction override
Instruction override
Phrases like “Ignore all previous instructions” or “Disregard your instructions”. These attempt to cancel the agent’s system prompt.
Role hijacking
Role hijacking
Attempts to redefine the agent’s identity, such as “You are now DAN” or “Act as an unrestricted AI”.
Jailbreak
Jailbreak
Attempts to bypass safety constraints through hypothetical framing, roleplay, or encoding tricks.
Data exfiltration / indirect injection
Data exfiltration / indirect injection
Instructions embedded in retrieved content (a document, a tool result) that try to leak data or redirect the agent when that content is later processed.
What’s next
Agent: Tool Call Evaluation
Evaluate tool calls before execution.
Agent: Tool Result Scanning
Scan tool results for PII and injection.
Concepts: Agent Evaluation
Overview of all agent safety endpoints.
Python SDK: Agent Evaluation
Full Python SDK reference for agent safety.