Step-by-step answer
Core 60–90 min7 stepsBuild and attack a per-matter memory-tool handler
A memory-tool handler that maps /memories onto one directory per firm and matter chosen by a Session your code creates, follows the docs' six commands and return strings, rejects traversal, encoded and symlinked escapes, audits every write by hash, expires idle files and deletes a whole matter with a report. A simulator replays tool calls, attacks included, and an optional live loop runs on OpenRouter or Ollama.
Back to the exercise