Skip to main content

Module intent

Module intent 

Source
Expand description

AI Intent snapshot.

Intent is the immutable entry point of the agent workflow. It captures one revision of the user’s request plus the optional analyzed IntentSpec.

§How to use this object

  • Create a root Intent when Libra accepts a new user request.
  • Create a new Intent revision when the request is refined, branched, or merged; link earlier revisions through parents.
  • Fill spec before persistence if analysis has already produced a structured request.
  • Freeze analysis-time context through analysis_context_frames when ContextFrames were used to derive the IntentSpec.

§How it works with other objects

  • Plan.intent points back to the Intent that the plan belongs to.
  • Task.intent may point back to the originating Intent.
  • analysis_context_frames freezes the context used to derive the stored IntentSpec.
  • IntentEvent records lifecycle facts such as analyzed / completed / cancelled.

§How Libra should call it

Libra should persist a new Intent for every semantic revision of the request, then keep “current thread head”, “selected plan”, and other mutable session state in Libra projections rather than on the Intent object itself.

Structs§

Intent
Immutable request/spec revision.
IntentSpec
Structured request payload derived from the free-form prompt.