Agentic.Memory.CommitmentDetector (agentic v0.2.2)

Copy Markdown

Detects unfulfilled action commitments in agent responses.

When the LLM says "I'll check that" or "Let me look into it" but returns end_turn without using any tools, the agent has made a promise it didn't keep. This module detects such patterns so the session can schedule a follow-up.

Summary

Functions

Returns true if the text contains action commitments suggesting the agent intended to use tools but didn't.

Extracts the first commitment phrase from the text. Returns nil if no commitment is found.

Functions

commitment_detected?(text)

@spec commitment_detected?(String.t() | nil) :: boolean()

Returns true if the text contains action commitments suggesting the agent intended to use tools but didn't.

extract_commitment(text)

@spec extract_commitment(String.t() | nil) :: String.t() | nil

Extracts the first commitment phrase from the text. Returns nil if no commitment is found.