Skip to main content

Crate urge

Crate urge 

Source
Expand description

§URGE — Universal Reasoning Governance Engine

An LLM agent can act. It usually cannot prove why the action was permitted. URGE closes that gap: wrap an agent action in a formal policy check and get back a verdict with the reasoning that produced it. The same input yields the same verdict every time, and the derivation is attached rather than inferred.

This crate is a facade. It re-exports urge_runtime, which assembles the lower crates into one interface. Depend on urge unless you need a narrower slice:

CrateWhat it holds
urge-coreTypes, AST, verdicts. No framework dependencies.
urge-enginesThe per-paradigm evaluators.
urge-metaParadigm detection and the governance pipeline.
urge-monitorDeontic obligation lifecycle over time.
urge-runtimeThe std-tier API this crate re-exports.

§Paradigms

Seven are implemented and cross-validated against each other: boolean, modal (S5), epistemic, deontic, temporal (LTL), fuzzy and paraconsistent (Belnap four-valued). Probabilistic is on the roadmap and is not implemented.

§No-std

Default features enable std. For embedded targets, turn them off:

urge = { version = "0.1", default-features = false }

That gives you no_std with alloc, which is this crate’s floor. The heap is not optional here: the audit log and the healthcare obligation helpers both need it. If you want the allocation-free tier, depend on urge-core directly rather than on this facade.

§Try it without installing anything

There is a live browser demo at https://toneron2.github.io/URGE/demo/ — type a governance expression, flip context slots, and watch the verdict, the formal notation and the reasoning trace update.

Licensed under Apache-2.0. Source at https://github.com/toneron2/URGE.

Modules§

audit
Audit log — durable, append-only record of all governance decisions.
embedded
Embedded BIOS-like governance facade.
healthcare
Healthcare-specific governance facade.

Structs§

GovernanceMonitor
The full continuous governance engine.
GovernancePipeline
The complete governance pipeline (Figure 26).
Obligation
A tracked obligation in the world state.
PipelineConfig
Configuration for the governance pipeline.
Verdict
The outcome of a complete governance evaluation.

Enums§

Expr
A node in the multi-paradigm AST.
Literal
A literal value in an expression.
ObligationState
Lifecycle state of a single obligation.
ObligationType
The SDL modality of this obligation.
Paradigm
All supported logic paradigms, ordered for stable bit-mapping.

Type Aliases§

AstNode