Persistent agent memory backed by a Prolog logic cell.
Summary
Functions
Add a constraint rule (data-grout/logic.constrain).
Export the logic cell contents (data-grout/logic.export).
Retract facts from the logic cell (data-grout/logic.forget).
Hydrate the logic cell from external data (data-grout/logic.hydrate).
Import facts into the logic cell (data-grout/logic.import).
Query the logic cell (data-grout/logic.query).
Reflect on the logic cell (data-grout/logic.reflect).
Assert facts into the logic cell (data-grout/logic.remember).
Tabulate logic cell contents (data-grout/logic.tabulate).
Manage hypothetical worlds (data-grout/logic.worlds).
Functions
@spec constrain(GenServer.server(), map()) :: {:ok, map()} | {:error, term()}
Add a constraint rule (data-grout/logic.constrain).
Params
"rule"- Natural language rule (required)"tag"- Tag/namespace (default:"constraint")
@spec export_cell(GenServer.server(), map()) :: {:ok, map()} | {:error, term()}
Export the logic cell contents (data-grout/logic.export).
@spec forget(GenServer.server(), map()) :: {:ok, map()} | {:error, term()}
Retract facts from the logic cell (data-grout/logic.forget).
Params
"handles"- Specific fact handles to retract"pattern"- Pattern to match and retract facts
@spec hydrate(GenServer.server(), map()) :: {:ok, map()} | {:error, term()}
Hydrate the logic cell from external data (data-grout/logic.hydrate).
@spec import_cell(GenServer.server(), map()) :: {:ok, map()} | {:error, term()}
Import facts into the logic cell (data-grout/logic.import).
@spec query(GenServer.server(), map()) :: {:ok, map()} | {:error, term()}
Query the logic cell (data-grout/logic.query).
Params
"question"- Natural language question (mutually exclusive with"patterns")"patterns"- Pre-built pattern list (mutually exclusive with"question")"limit"- Maximum results (default: 50)
@spec reflect(GenServer.server(), map()) :: {:ok, map()} | {:error, term()}
Reflect on the logic cell (data-grout/logic.reflect).
Params
"entity"- Optional entity name to scope reflection"summary_only"- Return only counts (default: false)
@spec remember(GenServer.server(), map()) :: {:ok, map()} | {:error, term()}
Assert facts into the logic cell (data-grout/logic.remember).
Params
"statement"- Natural language statement (mutually exclusive with"facts")"facts"- Pre-structured fact list (mutually exclusive with"statement")"tag"- Tag/namespace for grouping facts (default:"default")
@spec tabulate(GenServer.server(), map()) :: {:ok, map()} | {:error, term()}
Tabulate logic cell contents (data-grout/logic.tabulate).
@spec worlds(GenServer.server(), map()) :: {:ok, map()} | {:error, term()}
Manage hypothetical worlds (data-grout/logic.worlds).