Skip to content

Interface: SetActionReviewConfigRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / SetActionReviewConfigRequest

Defined in: src/types/cognitive.ts:1361

Request to set the human-in-the-loop (HITL) action-review configuration for the authenticated tenant’s cognitive agents.

The tenant is taken from the authenticated principal, never from the body — this request carries no tenantId.

The PUT replaces the whole stored configuration. An omitted (or null) optional field is NOT kept from the stored configuration: it takes the engine’s domain default — timeout 3600s, always-approve ["file_write", "file_delete", "web_post", "send_email", "send_telegram", "publish_post", "post_comment"], never-approve [], low-confidence threshold 0.3, and a maximum of 100 pending reviews. To change one field, read the configuration with getActionReviewConfig() and send all six fields back: an ActionReviewConfig is assignable to this type.

defaultTimeoutSecs must be at least 1 and must keep the review deadline inside the representable calendar; the engine refuses any other value with 400 and stores nothing.

await client.cognitive.setActionReviewConfig({
enabled: true,
alwaysRequireApproval: ['file_delete'],
lowConfidenceThreshold: 0.4,
});

optional alwaysRequireApproval?: string[] | null

Defined in: src/types/cognitive.ts:1365

Action sorts that always require approval.


optional defaultTimeoutSecs?: number | null

Defined in: src/types/cognitive.ts:1374

Seconds a new review waits for a decision. Each review an agent creates carries deadline = createdAt + defaultTimeoutSecs, and a review still pending past it is timed out (or escalated on an approval chain). Must be at least 1.


enabled: boolean

Defined in: src/types/cognitive.ts:1363

Enable HITL review for agent actions.


optional lowConfidenceThreshold?: number | null

Defined in: src/types/cognitive.ts:1376

Confidence threshold below which actions require approval (0.0 to 1.0).


optional maxPendingReviews?: number | null

Defined in: src/types/cognitive.ts:1384

Maximum pending reviews in the tenant’s queue, counting every origin. An agent action that needs a review while this many are pending is refused: it is neither queued nor executed, and the integrated cycle reports it in IntegratedCycleOutcomeDto.reviewQueueRefusals. 0 refuses every action that needs a review.


optional neverRequireApproval?: string[] | null

Defined in: src/types/cognitive.ts:1367

Action sorts that never require approval (override).