Tools and commands
For a generated reference of registered tools, commands, and editable config fields, see Generated surface reference.
/hindsight is the main control center. Commands are convenience shortcuts and escape hatches for advanced workflows.
Main command
Section titled “Main command”/hindsightShows memory status, selected banks, config facts, retain queue status, import status, and recent retain receipts. Status activity can distinguish recall, retain, and import work, including importing, imported, import-queued, and import-failed. It also exposes setup/config editing actions. Press f to flush queued retain jobs from the TUI. Press m to open the read-only mental model list/detail view; use the Hindsight web interface for create, edit, refresh, or delete.
Setup and config
Section titled “Setup and config”/hindsight:initWrites .pi/hindsight.json with the current project bank ID and Hindsight base URL.
The hindsight_configure tool can write config from agents. Prefer /hindsight for interactive setup.
Import
Section titled “Import”/hindsight:import-current --dry-run/hindsight:import-current/hindsight:import-file /path/to/session.jsonl --dry-run --all-leaves/hindsight:import-project-sessions --dry-run/hindsight:import-project-sessionsUse dry-run before non-dry-run imports. See Import controls and Importing sessions.
Queue and snapshots
Section titled “Queue and snapshots”/hindsight:queue/hindsight:queue --jobs --json/hindsight:flush/hindsight:last-recall/hindsight:last-recall --json/hindsight:recall-cleanup/hindsight:recall-cleanup <session.jsonl> --prune/hindsight:queue summarizes active and dead-letter retain queues without printing retained payloads. Add --jobs --json for redacted job metadata such as job id, bank id, document id, tags, byte counts, retry count, and last error. /hindsight:flush flushes queued retain jobs. /hindsight:last-recall reads the opt-in local recall snapshot. Recall cleanup reports or prunes accidentally persisted <hindsight-memory> transcript lines.
Session controls
Section titled “Session controls”/hindsight:session/hindsight:mode normal/hindsight:mode read-only/hindsight:mode ignored/hindsight:retain on/hindsight:retain off/hindsight:next-opt-out/hindsight:tag add <tag>/hindsight:tag remove <tag>read-only: recall still works; automatic retain is skipped.ignored: recall and retain are skipped.retain off: disables automatic retain for the session.next-opt-out: skips automatic retain once, then clears itself.- manual tags are merged into automatic retain jobs.
Explicit tools
Section titled “Explicit tools”Required tools:
hindsight_recallhindsight_retainhindsight_reflect
Additional tools:
hindsight_configurehindsight_get_bank_confighindsight_update_bank_confighindsight_get_bank_profilehindsight_update_bank_profilehindsight_update_bank_dispositionhindsight_add_bank_backgroundhindsight_reset_bank_confighindsight_list_directiveshindsight_get_directivehindsight_create_directivehindsight_update_directivehindsight_delete_directivehindsight_get_bank_template_schemahindsight_export_bank_templatehindsight_import_bank_templatehindsight_importhindsight_import_seed_contenthindsight_import_chat_transcripthindsight_retain_globalhindsight_route_memoryhindsight_retain_fileshindsight_retain_receiptshindsight_delete_documenthindsight_list_documentshindsight_get_documenthindsight_update_document_tagshindsight_list_entitieshindsight_get_entityhindsight_regenerate_entityhindsight_get_graphhindsight_get_entity_graphhindsight_list_tagshindsight_list_mental_modelshindsight_get_mental_modelhindsight_create_mental_modelhindsight_promote_reflect_query_to_mental_modelhindsight_update_mental_modelhindsight_delete_mental_modelhindsight_get_mental_model_historyhindsight_refresh_mental_modelhindsight_trigger_consolidationhindsight_recover_consolidationhindsight_clear_observationshindsight_list_operationshindsight_cancel_operationhindsight_retry_operationhindsight_list_memorieshindsight_get_memoryhindsight_get_chunkhindsight_get_memory_historyhindsight_delete_memory_observations
Tool notes:
hindsight_recallacceptsqueryTimestampplus advanced one-off controls:types,budget,maxTokens(including0),includeChunks,recallChunksMaxTokens,includeSourceFacts,maxSourceFactsTokens,includeEntities, andtrace.hindsight_retainandhindsight_retain_globalaccept explicit Hindsight retain options:entities,documentId,timestamp(including literalunset),metadata,updateMode,observationScopes,documentTags, andasync.observationScopesacceptsper_tag,combined,all_combinations, or explicit string groups. Hindsight supportsdocumentTagsfor compatibility, but upstream marks it deprecated; prefer normaltagsunless document-level interop requires it.- For
updateMode: "append", use a stabledocumentIdwhen continuing a known document. If omitted, pi-hindsight still uses its deterministic explicit-retain document ID; repeated calls only append together when content/context/session produce the same ID. - Async retain responses include Hindsight operation IDs when the server returns them; use
hindsight_list_operations,hindsight_cancel_operation, andhindsight_retry_operationto inspect or manage those jobs. - Caller
metadatais merged with pi-hindsight provenance, but reserved provenance keys such ascwd,pi_session_file,source, andretainSourceare set by pi-hindsight and cannot be overridden. hindsight_reflectacceptsresponseSchemafor structured reflection output plusbudget,maxTokens(including0),includeFacts, andincludeToolCallswhen supported by Hindsight.- Omit
bankor passprojectfor the selected project bank. - Pass
globalfor the configured global bank. hindsight_retain_globalrefuses to write if global memory is disabled or missing a bank ID.hindsight_delete_documentrequires exact bank, exact document ID, andconfirm: true.hindsight_update_bank_configaccepts raw Hindsight bank config override fields and requiresconfirm: true. High-value fields include retain extraction/chunking, observation/consolidation limits, reflect source-fact budgets, MCP tool allowlists, retain strategies, and recall budget mapping fields. Keep server-admin or credential-like fields out of Pi local config unless Hindsight documents them as per-bank safe overrides.hindsight_import_bank_templatedefaults to dry-run. Applying requiresdryRun: falseplusconfirmApply: trueand exactly one source (sourceFileormanifestJson).hindsight_import_seed_contentimports explicit.md,.txt, and.jsonfiles or directories into the project bank by default. It defaults to dry-run, uses deterministicpi-seed-import:<relative-path>document IDs, and writes withupdateMode: "replace"for idempotent reimports.hindsight_retain_filesuses Hindsight native file retain for PDFs, Office files, images, audio, and other server-supported files. It returns async operation details; inspect progress withhindsight_list_operations.- Document/entity/graph/tag inspection tools present compact IDs, tags, metadata/provenance keys, timestamps, and counts when Hindsight returns them. They do not print giant source payloads by default beyond bounded JSON detail.
hindsight_update_document_tags,hindsight_regenerate_entity,hindsight_update_bank_config,hindsight_update_bank_profile,hindsight_update_bank_disposition, andhindsight_add_bank_backgroundare admin mutations and requireconfirm: true.- Bank profile/background/disposition tools only call current supported Hindsight endpoints. They do not expose bank-wide destructive operations. Roll back profile/disposition/background changes by reapplying the previous values from the returned
beforeprofile or the Hindsight web UI. hindsight_cancel_operationrequires exact operation ID andconfirm: true; it is intended for pending operations.- Mental-model tools expose list/get/create/update/delete/history/refresh. Deletes require
confirm: true; refresh can return async operation IDs. - Consolidation tools can trigger and recover server consolidation work.
hindsight_clear_observationsis bank-wide and destructive, so it requiresconfirm: true; preferhindsight_delete_memory_observationsfor one-memory repair. hindsight_delete_memory_observationsrequires exact memory ID andconfirm: true. Bank-wide memory clear/delete-all is intentionally not exposed.- Memory inspection tools use current documented REST endpoints: list memory units, fetch a memory, fetch a chunk by ID, fetch memory history when the server supports it, and delete observations for one memory when supported.
Receipts and deletion
Section titled “Receipts and deletion”Explicit retain returns a receipt with:
bankIddocumentIdqueueJobIdupdateMode
Recent receipts are saved locally and exposed through hindsight_retain_receipts so exact document IDs can be found later.
Manual explicit memories use deterministic pi-explicit:<session>:<hash> document IDs and updateMode: "replace", so repeating the same explicit memory updates the same document instead of appending duplicates.