gsep_before_llm
Sanitizes and enhances user messages before LLM calls, preventing prompt injection and returning security status for agent protection.
Instructions
Middleware hook to run before any agent calls an LLM. Returns enhanced_prompt, sanitized_message, and C3/security status. Use this when GSEP-MCP protects an existing external agent rather than owning the LLM call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | User message or external content before it reaches the LLM | |
| user_id | No | User identifier for personalization and audit context | |
| genome_id | Yes | Unique identifier for this agent genome | |
| task_type | No | Task type hint, e.g. support, coding, research | |
| batch_size | No | Optional batch size hint for batch workflows |