gsep_after_llm
After an LLM responds, execute C4 behavioral immune checks and fitness recording to return a safe response before content is shown to users or tools.
Instructions
Middleware hook to run after an external LLM responds. Runs C4 behavioral immune checks, records fitness, and returns safe_response before content is shown to users or tools.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | No | User identifier for personalization and audit context | |
| response | Yes | Raw LLM response to verify before showing or executing | |
| genome_id | Yes | Unique identifier for this agent genome | |
| task_type | No | Task type hint, e.g. support, coding, research | |
| user_message | Yes | Original user message that produced this LLM response |