@xpert-ai/plugin-agent-behavior-monitor from xpert-plugins, used to detect and handle abnormal agent behavior during runtime.
What It Detects
prompt_injection: prompt injection on user input (LLM judge)sensitive_instruction: risky/forbidden instructions on user input (LLM judge)high_frequency: high-frequency tool calls (counter-based)repeat_failure: repeated tool failures (counter-based)
Available Actions
alert_only: record hit and continueblock: block current stage and return alert messageend_run: terminate the run and return alert message
Install and Enable
- Install the plugin package in your host project:
- Enable the plugin through environment variables:
- Follow Publish & Use to ensure the host loads the plugin.
Minimal Configuration Examples
1) Prompt Injection Blocking
2) High-Frequency Tool Call Blocking
Key Fields
evidenceMaxLength: max evidence length stored for each hit (default240)ringBufferSize: runtime trace ring buffer size (default120)target: derived fromruleTypeautomatically- Input rules (
prompt_injection,sensitive_instruction) requirejudgeModel
Audit and Debugging
Each run writes a snapshot. Check:ringBuffer: events likellm_judge,tool_call,tool_errorhits: matched rulessummary: total hits, blocked count, terminated flag