inland-empire

Raudbjorn's avatarfrom Raudbjorn

Unified memory substrate. Store facts, patterns, and context. Query with remember, consult, and stats commands.

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 20, 2025⬇️1downloads

When & Why to Use This Skill

Inland Empire is a sophisticated unified memory substrate that enables Claude to maintain long-term persistence and 'institutional memory.' By integrating graph-based fact storage, pattern recognition, and session context, it solves the problem of context loss across sessions, allowing agents to recall complex project details, user preferences, and recurring patterns that logic alone might miss.

Use Cases

  • Project Continuity: Recalling specific architectural decisions, race conditions, or project-specific nuances when returning to a codebase after a long break.
  • User Personalization: Storing and retrieving soft context such as user-specific coding styles, preferred error verbosity, and workflow habits.
  • Pattern Recognition: Identifying and documenting recurring issues or 'gut feelings' across multiple interactions to improve future problem-solving efficiency.
  • Knowledge Graph Building: Automatically constructing a queryable network of facts and entities using the LibSQL graph backend to enhance research capabilities.
nameinland-empire
descriptionUnified memory substrate. Store facts, patterns, and context. Query with remember, consult, and stats commands.
licenseMIT
version1
required[]
- event_typememory.evicted
priorityhigh
max_absorb_per_minute100
max_emit_per_minute50

Inland Empire

"This is your gut feeling. The raw data of the soul. When logic fails, consult the Empire."

Capabilities

The Inland Empire unifies three memory backends but only exposes sanitized aliases (fact_memory, pattern_memory, context_memory). Internals (MCP, mem0, JSONL) are hidden.

Alias Memory Type Backend Storage Notes
fact_memory fact mcp-memory-libsql Graph entities/relations Defaults to local SQLite fallback
pattern_memory pattern mem0 Hosted API (MEM0_API_KEY) or self-hosted Postgres (POSTGRES_URL)
context_memory context JSONL Local file (session_memory.jsonl) Always available

Backend detection

  • mem0 hosted: MEM0_API_KEY present
  • mem0 self-hosted: POSTGRES_URL present
  • mem0 disabled: neither credential; pattern memory gracefully skipped
  • LIBSQL_URL optional; if missing, a local SQLite file powers fact memory
  • INLAND_EMPIRE_STATE_DIR overrides the storage directory (tests, sandboxes, multi-project)

Commands

remember

Store a memory across configured backends.

python3 inland-empire.py remember "<text>" [--type fact|pattern|context]

Examples:

python3 inland-empire.py remember "User prefers verbose error messages"
python3 inland-empire.py remember "The auth flow has race conditions" --type pattern

consult

Query stored memories with optional depth and type filters. Results contain backend aliases, partial-result indicators, and normalized metadata.

python3 inland-empire.py consult "<query>" [--depth shallow|deep] [--type fact|pattern|context]

Example:

python3 inland-empire.py consult "user preferences" --depth deep --type pattern

Response shape

{
  "status": "ok",
  "command": "consult",
  "result": {
    "query": "user preferences",
    "depth": "deep",
    "results": [
      {
        "origin": "pattern",
        "summary": "User prefers verbose error messages",
        "score": 0.812,
        "observed_at": null,
        "backend": "pattern_memory",
        "partial": false,
        "metadata": {
          "id": "mem0_123",
          "user_id": "agent_subconscious",
          "created_at": "2024-01-15T10:30:00Z",
          "updated_at": "2024-01-15T10:30:00Z",
          "mode": "hosted"
        }
      }
    ],
    "metadata": {
      "requested_backends": ["fact_memory", "pattern_memory"],
      "completed_backends": ["pattern_memory"],
      "timed_out_backends": ["fact_memory"],
      "partial": true
    }
  }
}

stats

Display backend health, detection mode, and basic counts (context entries).

python3 inland-empire.py stats

When to Use

  • Store hunches, preferences, and soft context that doesn't belong in files
  • Recall project context after breaks
  • Detect patterns across sessions
  • Build institutional memory for recurring issues