← Blog
April 13, 2026

MentisDB 0.8.9 — Webhooks, Irregular Verb Lemmas, and Benchmark Stability

0.8.9 ships a major new extensibility feature — webhook delivery for thought append events — plus an important lexical search improvement and continued benchmark stability. This release also includes two new REST endpoints and matching MCP tools for webhook management.

Webhooks — HTTP Callbacks on Thought Append

MentisDB can now notify external services whenever thoughts are appended to a chain. Webhooks are registered per-chain (with optional thought-type and chain-key filters) and delivered asynchronously via POST with exponential backoff retries.

REST Endpoints

MethodPathDescription
POST/v1/webhooksRegister a new webhook
GET/v1/webhooksList all webhooks
GET/v1/webhooks/{id}Get one webhook by ID
DELETE/v1/webhooks/{id}Delete a webhook

Webhook Payload

Each delivery sends a POST with JSON body:

{
  "webhook_id": "uuid",
  "chain_key": "my-chain",
  "thought_id": "uuid",
  "thought_index": 42,
  "thought_type": "FactLearned",
  "agent_id": "agent-1",
  "content_hash": "sha256...",
  "tags": ["speaker:alice", "turn:3"],
  "concepts": [],
  "importance": 0.8,
  "timestamp": "2026-04-13T20:00:00Z"
}

Delivery Guarantees

Webhook delivery is fire-and-forget — it does not block the append path. MentisDB spawns an async task for each delivery with up to 5 exponential-backoff retries (max 32s delay). Failed deliveries are logged but do not affect chain integrity.

Irregular Verb Lemma Expansion

normalize_lexical_tokens() now bridges irregular verb forms that Porter stemming cannot normalize. Query terms like "went", "ran", "gave", "knew" are expanded to their base lemmas ("go", "run", "give", "know") and stemmed — so evidence containing the infinitive matches even when the query uses the past tense.

The expansion is query-time only. Index building passes expand_lemmas=false to avoid duplicate postings for terms whose lemma also appears elsewhere in the text. This keeps the index lean while giving queries the full lexical bridge.

Porter stemmer: "went" → "went" (irregular, no normalization)
With lemma expansion: "went" → "went" + "go" → "go" (matches "go", "going", "gone")

Benchmark Results

LoCoMo 10-persona (1977 queries) and LongMemEval (500 instances) on a fresh chain:

BenchmarkMetricResultNotes
LoCoMo 10-personaR@1072.0% 1424/1977. Single-hop 76.2%, multi-hop 58.6%. 5882 thoughts.
LoCoMo 10-personaR@2078.6% Multi-hop gap persists (~17pp vs single-hop).
LongMemEvalR@557.6% 288/500. Multi-session hardest at 26.3%.
LongMemEvalR@1061.6% 308/500. Knowledge-update best at 82.1%.

LoCoMo R@10 is stable in the 71.9–72.9% range across scoring iterations. Multi-hop questions remain the hardest category — 47% of misses are true lexical gaps where the answer text has no term overlap with the query.

Upgrade Instructions

cargo install mentisdb --force

Or download the binary from GitHub Releases.

Webhook registrations persist to $MENTISDB_DIR/webhooks.json and survive daemon restarts. No migration needed.

New REST Endpoints & MCP Tools

Endpoint / ToolDescription
POST /v1/webhooksRegister webhook (url, chain_key_filter, thought_type_filter)
GET /v1/webhooksList all registered webhooks
GET /v1/webhooks/{id}Get one webhook
DELETE /v1/webhooks/{id}Delete a webhook
mentisdb_register_webhookMCP tool equivalent
mentisdb_list_webhooksMCP tool equivalent
mentisdb_delete_webhookMCP tool equivalent