Skip to content

Class HTM::Workflows::RememberWorkflow

Inherits Object
Defined in lib/htm/workflows/remember_workflow.rb

RememberWorkflow orchestrates the parallel processing of node enrichment

Uses simple_flow to manage the dependency graph and parallel execution of embedding generation, tag extraction, and proposition extraction.

The workflow structure: save_node (no deps) -> embedding, tags, propositions (parallel)

@example Basic usage with fiber concurrency

workflow = HTM::Workflows::RememberWorkflow.new(htm_instance)
node_id = workflow.call(content: "PostgreSQL is great", tags: ["database"])

@example With inline execution (for testing)

workflow = HTM::Workflows::RememberWorkflow.new(htm_instance, concurrency: :threads)
node_id = workflow.call(content: "Test content")

Attributes

htm [R]

Returns the value of attribute htm.

pipeline [R]

Returns the value of attribute pipeline.

Public Instance Methods

call(content:, tags: [], metadata: {})

Execute the remember workflow - @param content [String] Content to remember - @param tags [Array] Manual tags to assign - @param metadata [Hash] Metadata for the node - @return [Integer] Node ID of the created memory

execution_plan()

Get execution plan - @return [String] Execution plan description

initialize(htm, concurrency: :auto)

Initialize the remember workflow - @param htm [HTM] HTM instance for the robot - @param concurrency [Symbol] Concurrency model (:auto, :threads, :async) - @return [RememberWorkflow] a new instance of RememberWorkflow

to_mermaid()

Get visualization of the workflow as Mermaid diagram - @return [String] Mermaid diagram source