forgetful-setup

forgetful-setup is a command for coding agents from ScottRBK/forgetful. It costs 8 tokens per session (748 once invoked), scanned A, original, MIT.

A command that configures Forgetful, a semantic memory server, for OpenCode. It can use a local SQLite database or guide the user through a custom setup.

In plain words
What is it for?
Adding Forgetful to an OpenCode configuration, choosing standard or custom storage, and preparing persistent memory for future sessions.
Why use it?
It removes the need to manually create the server configuration and checks whether Forgetful is already set up.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/scottrbk/forgetful/forgetful-setup
Clone the repo
git clone --depth 1 https://github.com/ScottRBK/forgetful

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for forgetful-setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/scottrbk/forgetful/forgetful-setup.svg)](https://agentmods.dev/commands/scottrbk/forgetful/forgetful-setup)
Your own site
<a href="https://agentmods.dev/commands/scottrbk/forgetful/forgetful-setup"><img src="https://agentmods.dev/badge/commands/scottrbk/forgetful/forgetful-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 748 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00008 $0.00748
Opus 5 $0.00004 $0.00374
Sonnet 5 $0.00002 $0.00150
Haiku 4.5 $0.00001 $0.00075

Measured 3d ago against content hash 734d3b288758, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

forgetful-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/opencode/commands/forgetful-setup.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Forgetful Setup

Configure the Forgetful semantic memory MCP server for OpenCode.

Step 1: Check Existing Configuration

First, check if Forgetful is already configured in your opencode.json:

!`cat opencode.json 2>/dev/null | grep -A5 forgetful || echo "Not configured"`

If already configured:

  • Ask user if they want to reconfigure
  • If no, exit with message: "Forgetful is already configured."
  • If yes, proceed to modify the configuration

Step 2: Choose Setup Type

Ask the user which setup they prefer:

Question: "How would you like to configure Forgetful?"

Options:

  1. Standard (Recommended) - Zero config, uses uvx to run Forgetful with SQLite storage. Perfect for most users.
  2. Custom - For advanced setups: remote HTTP server, PostgreSQL, custom embeddings, authentication, etc.

Step 3a: Standard Setup

If user chose Standard, add this to their opencode.json:

{
  "mcp": {
    "forgetful": {
      "type": "local",
      "command": ["uvx", "forgetful-ai"],
      "enabled": true
    }
  }
}

Report: "Forgetful is now configured! Your memories will persist in ~/.forgetful/ using SQLite. Restart OpenCode to activate."

Step 3b: Custom Setup

If user chose Custom:

  1. Fetch the configuration docs:
WebFetch: https://github.com/ScottRBK/forgetful/blob/main/docs/configuration.md
  1. Ask what they need:

    • Remote HTTP server - Connect to Forgetful running elsewhere
    • PostgreSQL backend - Use Postgres instead of SQLite
    • Custom embeddings - Use different embedding model/provider
    • Authentication - API key or OAuth setup
  2. Based on their answers, build the appropriate configuration:

For HTTP remote server:

{
  "mcp": {
    "forgetful": {
      "type": "remote",
      "url": "http://HOST:PORT/mcp",
      "enabled": true,
      "timeout": 30000
    }
  }
}

For PostgreSQL with custom embeddings:

{
  "mcp": {
    "forgetful": {
      "type": "local",
      "command": ["uvx", "forgetful-ai"],
      "enabled": true,
      "environment": {
        "DATABASE": "Postgres",
        "POSTGRES_HOST": "localhost",
        "PGPORT": "5432",
        "POSTGRES_DB": "forgetful",
        "POSTGRES_USER": "user",
        "POSTGRES_PASSWORD": "pass",
        "EMBEDDING_PROVIDER": "Google",
        "EMBEDDING_MODEL": "models/text-embedding-004"
      }
    }
  }
}

Read the full file on GitHub · 116 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 116 lines · 8 tokens per session scan A 734d3b288758

Subscribe to this mod's changes

forgetful-setup is a command published in the GitHub repository ScottRBK/forgetful (296 stars, last pushed 8d ago), licensed MIT. It adds 8 tokens to every session and 748 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.