Nahuali

v0.8.0-beta.14
io.github.Arakiss/nahuali Checked 18 hours ago Published 1 month ago

Trust-aware agent memory with evidence-backed recall, self-inspection, and audit history.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

anomalies

Use when you want a read-only list of memory anomalies (contradictions, unsupported assertions, stale facts) that may warrant review. It does not change anything. Then record a decision on one with `anomaly_acknowledge`.

ParameterTypeDescription
deadlineHorizonMsinteger | nullHow far ahead, in milliseconds from `now`, to treat a deadline as upcoming.
nowMsinteger | nullReference "now" as Unix epoch milliseconds. Defaults to the current system time; override only to evaluate against a fixed point.
reviewLimitinteger | null
staleAfterMsinteger | nullAge threshold in milliseconds after which a fact or intention is treated as stale.

anomaly_acknowledge

Use when you have reviewed an anomaly from `anomalies` and want to record an explicit, auditable decision about it with a note. Set `dryRun: true` to preview the decision without writing it. Then re-run without `dryRun` to append the audit record.

ParameterTypeDescription
anomalyId *string
note *string
dryRunboolean | null

audit

Use when you need a non-mutating diff of what the append-only memory_record ledger recorded between two points, with the integrity of that history restated alongside it. Bound the range with `from`/`to` (exclusive then inclusive sequence) and optional `since`/`until` (millisecond timestamps); omit all to audit the whole ledger. It reports per-kind counts, per-event entries, and whether the history through the upper bound verifies. Then run `validate` if integrity does not verify.

ParameterTypeDescription
frominteger | null
sinceinteger | null
tointeger | null
untilinteger | null

briefing

Use this first at the start of a session, before any other work: it returns the compact read-only pre-work surface (authority, health, recent episodes, active intentions, high-priority review items, graph seeds). Pass `project` to limit episodes and intentions to one project. It does not change anything. Then `recall` specifics or act on the surfaced intentions and review items.

ParameterTypeDescription
episodeLimitinteger | null
graphSeedLimitinteger | null
intentionLimitinteger | null
projectstring | nullLimit recent episodes and active intentions to memory attributed to this project; `report.project_scope` in the result says what matched. Health, review items, and graph seeds stay store-wide.
reviewLimitinteger | null

claim

Use when an episode explicitly supports a subject-predicate-object assertion you want recallable, after calling `remember` (pass `sourceLast: true` to cite it). A claim is the canonical evidence-backed assertion; `fact` is a deprecated alias of this tool. Then run `inspect` to confirm the claim is supported, not orphaned.

ParameterTypeDescription
object *string
predicate *string
subject *string
confidencenumber | nullConfidence in this assertion, from 0.0 (unsure) to 1.0 (certain). Defaults to 0.8.
scope
sourceEpisodeIdstring | nullId of the source episode this assertion cites as evidence. Mutually exclusive with `sourceLast`.
sourceLastboolean | nullWhen true, cite the most recently recorded episode as evidence. Use this right after `remember`. Mutually exclusive with `sourceEpisodeId`.

consolidation_plan

Use when you want the full sleep/consolidation plan (replay, extraction, reconciliation, review-gate, and commit-eligibility steps) before any write-back. It is read-only and keeps `automatic_write_back=false`. Then act on the review gate via `review` and `review_resolve`; this tool never commits on its own.

ParameterTypeDescription
candidateLimitinteger | null
cycleLimitinteger | null
episodeLimitinteger | null
evidenceLimitinteger | null
reviewLimitinteger | null

deadlines

Use when you want a read-only list of upcoming or overdue intention deadlines within a horizon. It does not change anything. Then act with `intention_update` or `intention_status` on the items that need it.

ParameterTypeDescription
deadlineHorizonMsinteger | nullHow far ahead, in milliseconds from `now`, to treat a deadline as upcoming.
nowMsinteger | nullReference "now" as Unix epoch milliseconds. Defaults to the current system time; override only to evaluate against a fixed point.
reviewLimitinteger | null
staleAfterMsinteger | nullAge threshold in milliseconds after which a fact or intention is treated as stale.

fact

Deprecated alias of `claim`; prefer that. Kept for backward compatibility while clients migrate to `claim`.

ParameterTypeDescription
object *string
predicate *string
subject *string
confidencenumber | nullConfidence in this assertion, from 0.0 (unsure) to 1.0 (certain). Defaults to 0.8.
scope
sourceEpisodeIdstring | nullId of the source episode this assertion cites as evidence. Mutually exclusive with `sourceLast`.
sourceLastboolean | nullWhen true, cite the most recently recorded episode as evidence. Use this right after `remember`. Mutually exclusive with `sourceEpisodeId`.

goal_progress

Use when you want a read-only roll-up of progress toward goals and their linked tasks. It does not change anything. Then update progress with `intention_update` if the picture is out of date.

graph

Use when flat `recall` is not enough and you need the neighborhood around an entity (nodes, edges, evidence IDs, authority, and health/review overlays) to a given depth. It is read-only. Then `recall` or `inspect` specific nodes the traversal surfaced.

ParameterTypeDescription
seed *string
depthinteger | null
limitinteger | null

ingest

Use when importing an external source document (the structured interchange format) and you need its provenance preserved as it becomes episodes. Set `dryRun: true` first to preflight scope, size, and evidence-gap counts without writing. Then re-run without `dryRun` to append the records.

ParameterTypeDescription
document *Source-neutral ingestion document (the Nahuali interchange format, `MemoryIngestDocument`). Expected shape: `{ "version": 1, "source": { "kind", "title", "uri", "metadata", "scope" }, "episodes": [...…
dryRunboolean | nullWhen true, validate and preflight the document without appending any records. Defaults to false.

ingest_text

Use when you have raw UTF-8 text (notes, a transcript, a web page) to capture as source episodes without building the full interchange document. It chunks and preserves provenance but does not infer claims or links. Set `dryRun: true` to preflight; then re-run to append, and derive claims/links separately if needed.

ParameterTypeDescription
content *string
chunking
dryRunboolean | null
kind
maxChunkBytesinteger | null
mentionsarray | null
metadataobject | null
scope
sourceRolestring | null
tagsarray | null
titlestring | null
uristring | null

inspect

Use when you need the database-wide health snapshot (supported vs unsupported facts, contradictions, stale facts, blind spots) to gauge whether memory can be trusted right now. It is read-only and does not propose fixes. Then run `self_inspect` for a structured findings report before proposing any repair.

intention

Use when the user commits to future work, a goal, or a reminder that must survive across sessions. Capture it here so `briefing`, `deadlines`, and `reconcile_intentions` can surface it later. Recording the same active intention again returns the existing one with `deduplicated: true` and writes nothing. Then use `intention_update` to add a deadline or goal link, and `intention_status` to close it out.

ParameterTypeDescription
description *string
kind
priority
scope
sourceEpisodeIdstring | null
sourceLastboolean | null

intention_status

Use when an intention's lifecycle changes (it is completed, abandoned, blocked, or deferred) and you want that recorded with a reason. Find the intention id via `briefing` or `recall` first; when an episode shows the change, pass `sourceLast: true` or `sourceEpisodeId` to cite it. Then re-check `reconcile_intentions` if you need the updated commitment picture.

ParameterTypeDescription
id *string
status *
reasonstring | null
sourceEpisodeIdstring | nullRecorded episode that justifies the change.
sourceLastboolean | nullCite the most recent episode instead of naming one.

intention_update

Use when you need to set an intention's deadline, goal link, dependencies, or progress without changing its lifecycle status. Look up the intention id via `briefing` or `recall` first; pass `sourceLast: true` or `sourceEpisodeId` to cite the episode that justifies the update. Then `goal_progress` and `deadlines` will reflect the new metadata.

ParameterTypeDescription
id *string
deadlineAtMsinteger | nullDeadline as Unix epoch milliseconds. Pass `null` to clear an existing deadline; omit the field to leave it unchanged.
dependsOnarray | null
descriptionstring | null
goalIdstring | nullParent goal id. Pass `null` to clear it; omit to leave it unchanged.
priority
progressPercentinteger | nullProgress from 0 to 100 percent. Pass `null` to clear it; omit to leave it unchanged.
sourceEpisodeIdstring | nullRecorded episode that justifies the update.
sourceLastboolean | nullCite the most recent episode instead of naming one.

memory_hook

Use when a host wants the right governed context bundled for a host execution point: pass `kind` as `session_start`, `pre_prompt`, `post_action`, `session_close`, or `sleep_cycle`. It is read-only and packages authority, directives, recall, and (for close/sleep) reflection or self-inspection. Then follow the returned directives with explicit tool calls.

ParameterTypeDescription
kind *
cycleLimitinteger | null
episodeLimitinteger | null
evidenceLimitinteger | null
graphSeedLimitinteger | null
inputstring | null
intentionLimitinteger | null
recallLimitinteger | null
reviewLimitinteger | null

preference

Use when an episode states a durable behavioral preference or rule (a coding convention, a communication style, an operating default) you want recalled later, after `remember` (pass `sourceLast: true` to cite it). Distinct from `procedure`: a preference is a stated rule, a procedure is a repeatable how-to. Then run `inspect` to confirm it is supported.

ParameterTypeDescription
body *string
name *string
confidencenumber | nullConfidence in this procedure, from 0.0 (unsure) to 1.0 (certain). Defaults to 0.8.
scope
sourceEpisodeIdstring | nullId of the source episode this procedure cites as evidence. Mutually exclusive with `sourceLast`.
sourceLastboolean | nullWhen true, cite the most recently recorded episode as evidence. Use this right after `remember`. Mutually exclusive with `sourceEpisodeId`.

proactive

Use when you want a read-only operator report of everything that may need attention (deadlines, anomalies, and review signals together). It does not change anything. Then drill in with `deadlines` or `anomalies`, or act through `review` and the explicit write tools.

ParameterTypeDescription
deadlineHorizonMsinteger | nullHow far ahead, in milliseconds from `now`, to treat a deadline as upcoming.
nowMsinteger | nullReference "now" as Unix epoch milliseconds. Defaults to the current system time; override only to evaluate against a fixed point.
reviewLimitinteger | null
staleAfterMsinteger | nullAge threshold in milliseconds after which a fact or intention is treated as stale.

procedure

Use when an episode establishes a repeatable how-to or rule (a procedure) you want recalled later, after `remember` (pass `sourceLast: true` to cite it). For a stated behavioral preference rather than a procedure, use `preference`. Then run `inspect` to confirm it is supported.

ParameterTypeDescription
body *string
name *string
confidencenumber | nullConfidence in this procedure, from 0.0 (unsure) to 1.0 (certain). Defaults to 0.8.
scope
sourceEpisodeIdstring | nullId of the source episode this procedure cites as evidence. Mutually exclusive with `sourceLast`.
sourceLastboolean | nullWhen true, cite the most recently recorded episode as evidence. Use this right after `remember`. Mutually exclusive with `sourceEpisodeId`.

projection_rebuild

Use when `projection_status` or `projection_validate` shows the derived SurrealDB graph projection is stale or inconsistent. It rebuilds the derived tier from the record ledger and does not change ground truth. Then run `projection_validate` to confirm it now matches.

projection_status

Use when you need to know whether the derived SurrealDB graph projection is current with the record ledger. It is read-only. Then run `projection_validate` to confirm consistency, or `projection_rebuild` if it is stale.

projection_validate

Use when you want to confirm the derived SurrealDB graph projection still matches the record ledger and report any drift. It is read-only. Then run `projection_rebuild` if it reports the projection is out of sync.

recall

Use this before acting on anything memory might already know: it retrieves matching memory with per-result trust, evidence IDs, a store-level authority decision, and a health report in one call. Read each result's trust and the authority/health before relying on it. Then cite evidence IDs, or state the gap if authority or health is `warn`/`block`.

ParameterTypeDescription
query *string
asOfMsinteger | nullInclusive upper bound: only memory created at or before this epoch-ms timestamp (point-in-time recall).
excludeSupersededboolean | nullHide claims replaced by a newer evidence-backed value. By default they are returned, marked `superseded`, and ranked last.
kindsarray | null
limitinteger | null
requireEvidenceboolean | null
scope
sinceMsinteger | nullInclusive lower bound: only memory created at or after this epoch-ms timestamp (exclude stale memory at query time).

reconcile_intentions

Use when you need a read-only picture of which intentions are stale, overdue, or need attention before deciding what to act on. It does not change any intention. Then act with `intention_status` or `intention_update`.

ParameterTypeDescription
nowMsinteger | nullReference "now" as Unix epoch milliseconds. Defaults to the current system time; override only to reconcile against a fixed point.
staleAfterMsinteger | nullAge threshold in milliseconds after which an intention is treated as stale.

reflect

Use when you want self-inspection findings grouped into prioritized reflection cycles (with evidence IDs and coverage) for operator approval, rather than the raw findings. It is read-only and keeps `automatic_write_back=false`. Then move approved items through `review` and `review_resolve`.

ParameterTypeDescription
cycleLimitinteger | null
evidenceLimitinteger | null

relate

Deprecated alias of `link`; prefer that. Kept for backward compatibility while clients migrate to `link`.

ParameterTypeDescription
from *string
relation *string
to *string
confidencenumber | nullConfidence in this connection, from 0.0 (unsure) to 1.0 (certain). Defaults to 0.8.
scope
sourceEpisodeIdstring | nullId of the source episode this connection cites as evidence. Mutually exclusive with `sourceLast`.
sourceLastboolean | nullWhen true, cite the most recently recorded episode as evidence. Use this right after `remember`. Mutually exclusive with `sourceEpisodeId`.

remember

Use when you observe something worth remembering (a decision, event, or fact stated by the user) and want it preserved verbatim as append-only evidence. Episodes are the evidence other memory cites, so record them before asserting any claim or link. Then derive claims/links with `sourceLast: true` to cite this episode.

ParameterTypeDescription
content *string
mentionsarray | null
scope
tagsarray | null

review

Use when you want the prioritized, read-only operator review queue derived from self-inspection; narrow it with `action` to one proposed operator action. Treat it as guidance, not automatic write-back. Then apply a chosen item with `review_resolve`, which is the only path that writes a decision back.

ParameterTypeDescription
action
limitinteger | null
minPriority

review_resolve

Use this as the only write-back path for review items: after picking one from `review`, resolve it with its id and an explicit operator note. Set `dryRun: true` to preview the audit decision without writing. Then re-run without `dryRun` to append the decision to the ledger.

ParameterTypeDescription
note *string
reviewId *string
dryRunboolean | null

self_inspect

Use before proposing any memory repair: it returns a read-only consolidation report with health, authority, findings, proposed review items, and an explicit `automatic_write_back=false` policy. It never writes. Then turn proposals into a queue with `review`, and apply only through `review_resolve`.

semantic_rebuild

Use when `semantic_status` shows the derived Qdrant semantic index is missing or stale. It rebuilds the index from projected memory and does not change ground truth. Then run `semantic_status` to confirm it is current.

semantic_status

Use when you need to know whether the derived Qdrant semantic index is present and current. It is read-only. Then run `semantic_rebuild` if it is missing or stale.

semantic_sync

Use when you have written memory and want recall to reflect it without dropping the index. It upserts current points into the derived Qdrant semantic index without recreating the collection, so recall does not gap. Use `semantic_rebuild` instead after changing the embedder. Then run `semantic_status` to confirm.

trust_report

Use when you need one composed, non-mutating report before relying on memory: knowledge counts, authority, available ledger checks, knowledge health, and a bounded verdict with reasons. Internal ledger checks can detect corruption and broken links; rollback or a fully re-chained history requires a retained, policy-authorized external checkpoint. Then act on the reasons, for example with `review` or by capturing missing evidence.

validate

Use when you need to confirm the append-only SurrealDB memory_record ledger is intact and report record counts and any migration needs. It is read-only and checks the ground-truth ledger itself, not a derived tier. Then run `projection_validate`/`semantic_status` to check the derived tiers if the ledger is healthy.