Local-first 🧠memory for Hermes Agent that lives in your Obsidian vault and remembers project context. Nightly 😴 dream passes turn repeat corrections into confirmed preferences with measurable confidence. Adapters ship for Claude Code, Codex, and OpenClaw, with an MCP server for anything else.
TypeScript
import { runBrainWatchdog } from "../core/brain/watchdog.ts";
import { coerceBool, coerceInt, coerceStr } from "./coerce.ts";
import type { ToolDefinition } from "./tool-contract.ts";
export const WATCHDOG_TOOLS: ReadonlyArray<ToolDefinition> = [
{
name: "brain_watchdog",
kind: "write",
description:
"Probe Brain health and return safe recovery recommendations. Read-only unless remediate=true, which only creates missing Brain directories.",
inputSchema: {
type: "object",
properties: {
remediate: {
type: "boolean",
description: "Apply safe remediations such as missing directory creation.",
},
dry_run: {
type: "boolean",
description: "Preview remediation without applying it.",
},
restore: {
type: "string",
description: "Snapshot run id to check restore readiness for.",
},
force_restore: {
type: "boolean",
description: "Allow restore recommendation to be emitted.",
},
attempt: {
type: "integer",
description: "Retry attempt for exponential backoff metadata.",
},
},
additionalProperties: false,
},
handler: (ctx, args) =>
runBrainWatchdog(ctx.vault, {
remediate: coerceBool(args, "remediate"),
dryRun: coerceBool(args, "dry_run"),
restoreRunId: coerceStr(args, "restore", false) ?? undefined,
forceRestore: coerceBool(args, "force_restore"),
attempt: coerceInt(args, "attempt", 0, 0, 32),
}),
},
];