AppOmni AgentGuard icon

AppOmni AgentGuard

AppOmni's runtime security solution for n8n workflows that leverage AI agents

AppOmni AgentGuard

AI-generated

Summary

Classifies text prompts for security threats and prompt injection attacks using AppOmni AgentGuard, routing input items to dual output branches based on safety.

Inputs

  • prompt (required) — The text prompt to evaluate. Automatically resolves common upstream fields such as chatInput, prompt, or message by default.
  • role — The author role of the prompt, choice of 'user', 'assistant', or 'system'. Defaults to 'user'.
  • includeDetails — Whether to request and include detailed per-classifier analysis in the response.
  • metadata — Optional context collection including Agent ID, Agent Name, Session ID, User ID, Username, User Email, Principal Type, Request Interface, and Source App. Auto-populates defaults from workflow and execution data when omitted.

Output shape

Dual-output stream ('Allowed' at index 0, 'Blocked' at index 1) returning the input JSON enriched with an 'agentguard' property.

An item is routed to the 'Blocked' output if AgentGuard responds with a 'block' action; otherwise, it is routed to 'Allowed'. The added 'agentguard' key contains blocked status, prompt payload, response_action, response_message, block_reasons, event_id, and full API response.

Examples

Example 1: Inspect user prompt from a Chat Trigger before calling an LLM

Set Prompt to ={{ $json.chatInput }} with Role set to 'user'.

Example 2: Validate assistant response for data exfiltration before sending to end user

Set Prompt to ={{ $json.output }}, Role to 'assistant', and set Include Details to true.

Links

Discussion