Skip to content

Interface: GuardrailRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / GuardrailRequest

Defined in: src/types/guardrail.ts:183

Request body for the conversation guardrail.

Body of POST /api/v1/guardrail/conversation. Uses the snake_case wire format (assistant_message, citation_features, service_description).

citationFeatures names the identifier features that constitute a citation in the caller’s corpus (e.g. document_id, page, passage_id, char_span). They are resolved from each supporting leaf fact and inlined on certified claims. The names are client-defined — source_uri (the ingestion convention) is always attempted regardless.

const request: GuardrailRequest = {
assistantMessage: 'Aspirin is contraindicated for this patient.',
citationFeatures: ['document_id', 'page'],
serviceDescription: 'A clinical decision-support assistant.',
};

assistantMessage: string

Defined in: src/types/guardrail.ts:185

The assistant (or user) turn to decompose and certify.


optional citationFeatures?: string[]

Defined in: src/types/guardrail.ts:191

Names of the identifier features that constitute a citation in the caller’s corpus. Resolved from each supporting leaf fact and inlined on certified claims.


optional serviceDescription?: string | null

Defined in: src/types/guardrail.ts:196

Optional description of what the AI service is supposed to do (grounds capability claims).