# Pwn AI Memory Index

> Drive PWN::AI::Memory::Index from pwn_eval.

- Skill: `0dayinc/pwn-ai-memory-index` (Agent Skill)
- Install (CLI): `npx get-skill add 0dayinc/pwn-ai-memory-index`
- Raw SKILL.md: https://api.skillmd.com/api/skills/0dayinc/pwn-ai-memory-index/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Coding & Dev Tools
- Author: 0dayInc (https://skillmd.com/u/0dayinc)
- Updated: 2026-12-02
- Page: https://skillmd.com/skills/0dayinc/pwn-ai-memory-index

---

---
name: pwn-ai-memory-index
description: Drive PWN::AI::Memory::Index from pwn_eval.
license: MIT
allowed-tools: [pwn, pwn_eval]
metadata:
  bundled: true
  generated: true
  module: PWN::AI::Memory::Index
  source: pwn/ai/memory/index.rb
---

# PWN::AI::Memory::Index

PWN::AI::Memory::Index is a lightweight local embedding index over PWN::AI::Memory (~/.pwn/memory.json) so PromptBuilder can inject the N MOST-RELEVANT memories for the current request instead of the N newest. Embeddings prefer a direct Ollama /api/embed endpoint (PWN::Config::Env[:ai][:providers][:ollama][:embed_model], default 'nomic-embed-text'). When only Open WebUI is configured, embeddings go through its /ollama/api/embed proxy with the openwebui key/base_uri. Index layout (~/.pwn/memory.idx): { "<key>": { "sha": "<sha16 of value>", "vec": [Float,…] }, … } Rebuilds are incremental: only entries whose value-sha changed are (re)embedded, so a warm index costs one embed call (the query).

## When to use

Call `PWN::AI::Memory::Index` from `pwn_eval` when the task needs this module.
Do not reimplement it in shell.

## Methodologies

Generated from `pwn/ai/memory/index.rb`. Prefer the public class methods below.
Class methods take `(opts = {})` and read `opts`.

## How to call

```ruby
PWN::AI::Memory::Index.help
PWN::AI::Memory::Index.available?(opts)
```

## Public methods

- `available?`
- `recall_semantic`
- `to_context`
- `refresh`
- `embed`
- `reset`
- `bm25`
- `authors`
- `help`

## Source

`pwn/ai/memory/index.rb`

## Verification

`PWN::AI::Memory::Index.respond_to?(:available?)` after the
module is loaded. Read the source for parameter names.

