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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"genome_id": "<genome_id>",
"user_message": "<user_message>",
"response": "<response>"
},
"name": "gsep_after_llm"
}
}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 |