NEW Workflows: agents follow the steps, you sign off. Read more →
Ulpi

rule-injector

PLUGIN

Moves agent behavioural rules out of the system prompt and injects each one at the point of need, through three hooks: pre_llm_call for behavioural guards.

by klautimus · v1.1.0

What it does

Moves agent behavioural rules out of the system prompt and injects each one at the point of need, through three hooks: pre_llm_call for behavioural guards, transform_tool_result for corrections the model reads in place, and pre_verify as a completion gate. A rule is {trigger, inject} — matched on keywords, regex, tool name, tool error, path or session scope, or a boolean compound of those — with a per-turn injection budget and an undroppable always-on floor.

An optional adjudicator adds a semantic second pass over ambiguous turns, and propose.py drafts a rule from a user correction.

How to set it up

  1. Ships a local web dashboard (, FastAPI, read-only) that lists the rule set and the recent activation trace, and seven starter rules; rules.json is a template the user replaces.

    python3 dashboard.py
  2. Disclosure — writes one activation trace line per fired rule, a rule-drafting audit line, and (only with the adjudicator enabled) a 48-hour verdict log holding excerpts of the user message and recent turns, all under the active ULPI_HOME's logs/ directory, and writes the plugin's rules.json when a rule is created through its own CLI; no shell and no telemetry; the optional dashboard (, fastapi + uvicorn installed by the user) binds 127.0.0.1 and only reads the rules file and trace log; semantic triggers download a sentence-transformers embedding model from Hugging Face once and then run locally; the optional adjudicator, only when enabled, sends the current turn to the user's active model through Ulpi's plugin LLM facade and holds no key of its own.

    python3 dashboard.py

Review notes

What an owner reads and accepts before the install is approved.

  • Ulpi has not reviewed this version: it is listed in the public plugin catalog, and the install still fetches it at its pinned commit, checks its shape and scans it before you approve

More in Automation

All listings →