observe_chat
Scan chat exchanges for risks, enforce policy thresholds, log the interaction, and run the model only if allowed.
Instructions
[WRITE][risk=medium] Scan + policy-gate a chat exchange, record it, then run if allowed.
Args: model: Model to run. messages: OpenAI-style [{"role","content"}] messages (contents are scanned). agent / user: Actor attribution recorded in the usage log. block_threshold: Block when risk band >= this. target: Ollama target name from config; omit for the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | No | ||
| agent | No | unknown | |
| model | Yes | ||
| target | No | ||
| messages | Yes | ||
| block_threshold | No | high |