Skip to main content

Crate thoughtchain

Crate thoughtchain 

Source
Expand description

Semantic, hash-chained memory for long-running agents.

thoughtchain provides an append-only, adapter-backed memory log for durable, queryable cognitive state. Thoughts are timestamped, hash-chained, typed, optionally connected to prior thoughts, and exportable as prompts or Markdown memory snapshots. The current default backend is JSONL, but the chain model is intentionally independent from any single storage format.

Structs§

BinaryStorageAdapter
Append-only binary storage adapter for ThoughtChain.
JsonlStorageAdapter
Append-only JSONL storage adapter for ThoughtChain.
Thought
A single durable thought record.
ThoughtChain
Append-only, hash-chained semantic memory store.
ThoughtInput
Builder-like input struct used to append rich thoughts.
ThoughtQuery
Retrieval filter for semantic memory queries.
ThoughtRelation
Typed edge in the thought graph.

Enums§

StorageAdapterKind
Supported durable storage formats for ThoughtChain.
ThoughtRelationKind
Why a thought points to another thought.
ThoughtRole
Operational role of a thought inside the system.
ThoughtType
Semantic category describing what changed in the agent’s internal model.

Traits§

StorageAdapter
Persistence interface for ThoughtChain storage backends.

Functions§

chain_filename
Stable filename derived from a chain key rather than mutable agent profile data.
chain_key_from_storage_filename
Recover the stable chain key portion from a ThoughtChain storage filename.
chain_storage_filename
Stable filename derived from a chain key and storage adapter kind.