Function: createGroundingGuardPack()
createGroundingGuardPack(
options?):ExtensionPack
Defined in: packages/agentos/src/extensions/packs/grounding-guard/index.ts:97
Create an ExtensionPack that bundles:
- The GroundingGuardrail guardrail (streaming + final verification).
- The CheckGroundingTool
check_groundingtool (on-demand verification).
Activation lifecycle
The pack uses mutable internal state (state.services, state.getSecret)
that is upgraded when the extension manager calls onActivate with its
shared service registry and secret resolver. Both components (guardrail
and tool) are rebuilt at that point so they share NLI model instances with
other extensions.
Parameters
options?
GroundingGuardOptions
Optional pack-level configuration. All properties have sensible defaults; see GroundingGuardOptions.
Returns
A fully-configured ExtensionPack with one guardrail and one tool.
Example
import { createGroundingGuardPack } from './grounding-guard';
// Zero-config — uses default NLI model and thresholds:
const pack = createGroundingGuardPack();
// Custom thresholds and block action:
const strictPack = createGroundingGuardPack({
entailmentThreshold: 0.8,
contradictionAction: 'block',
maxUnverifiableRatio: 0.3,
});