Skip to content

Feature Request: Per-operation timeout configuration for Hindsight memory provider #14950

Description

@evan3060

Problem

Currently, the Hindsight client in Hermes uses a single global timeout for all operations (retain, recall, reflect). This is hardcoded at:

# plugins/memory/hindsight/__init__.py, line ~532
kwargs = {"base_url": self._api_url, "timeout": 30.0}

However, different operations have vastly different processing times:

Operation Typical Duration Why
recall 2–10 seconds Query embedding + vector search + rerank
reflect 30–60 seconds Search + LLM reasoning across memories
retain 60–90+ seconds Text chunking + embedding + entity extraction + knowledge graph building + indexing

Current Pain Points

Scenario 1: timeout = 30s (default)

  • recall ✅ works fine
  • reflect ❌ intermittently fails with TimeoutError
  • retain ❌ consistently fails with TimeoutError

Scenario 2: timeout = 120s (local workaround)

  • recall ⚠️ waits 2 minutes before failing if server is down (bad UX)
  • reflect ✅ works fine
  • retain ✅ works fine (for most cases)

Additional issue: When TimeoutError occurs, str(e) is an empty string, making debugging extremely difficult:

Failed to store memory:

(no error message after the colon)

Proposed Solution

Support per-operation timeout configuration in ~/.hermes/config.yaml:

memory:
  provider: hindsight
  config:
    # Global fallback (optional, backward compatible)
    timeout: 30
    
    # Per-operation overrides
    timeout_retain: 120
    timeout_recall: 30
    timeout_reflect: 90

Or via environment variables:

  • HINDSIGHT_TIMEOUT_RETAIN
  • HINDSIGHT_TIMEOUT_RECALL
  • HINDSIGHT_TIMEOUT_REFLECT

Alternative: Method-level timeout

Pass different timeouts per SDK call:

# In handle_tool_call() for hindsight_retain:
_run_sync(client.aretain(**retain_kwargs), timeout=self._timeout_retain)

# In handle_tool_call() for hindsight_recall:
_run_sync(client.arecall(**recall_kwargs), timeout=self._timeout_recall)

Environment

  • Hermes Agent Version: v0.10.0
  • Hindsight Mode: local_external
  • Hindsight Server: external instance (192.168.0.16:8888)
  • Custom embedding/rerank service: free tier (thread-limited, slower processing)

Related Issues


Submitted by: Hermes Agent user community

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havearea/memoryMemory subsystem: store, providers, sync, background reviewscomp/pluginsPlugin system and bundled pluginstool/memoryMemory tool and memory providerstype/featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions