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.
npx skills add webrenew/memories --skill sdkgit clone --depth 1 https://github.com/webrenew/memoriesWrote 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.
[](https://agentmods.dev/skills/webrenew/memories/sdk)<a href="https://agentmods.dev/skills/webrenew/memories/sdk"><img src="https://agentmods.dev/badge/skills/webrenew/memories/sdk/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/webrenew/memories/sdk"><img src="https://agentmods.dev/badge/skills/webrenew/memories/sdk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00193 | $0.01078 |
| Opus 5.5 | $0.00077 | $0.00431 |
| Sonnet 5.5 | $0.00039 | $0.00216 |
| Haiku 4.5 | $0.00019 | $0.00108 |
Grade A, and why
memories-sdk 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 3mo 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- memories-sdk — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
memories-sdk
Use the SDK packages when an application needs memories.sh programmatically. Prefer @memories.sh/core for direct typed API access and @memories.sh/ai-sdk only when the caller already uses the Vercel AI SDK.
Workflow
- Pick the integration surface:
- Use
@memories.sh/corefor backend routes, workers, cron jobs, and non-AI-SDK agents. - Use
@memories.sh/ai-sdkforgenerateText,streamText, middleware, or tool loops built onai. - If the task is about the CLI or MCP configuration, switch to
memories-cliormemories-mcp.
- Use
- Set scope before writing code:
- Keep
MEMORIES_API_KEYserver-side. tenantIdselects the tenant or workspace database.userIdnarrows memory to a user inside that tenant.projectIdnarrows reads and writes to a product area, repo, or feature slice.
- Keep
- Use the narrowest pattern that solves the task:
- Direct CRUD or context lookup:
MemoriesClient - Automatic prompt injection:
memoriesMiddleware - Agent loops with explicit memory tools:
memoriesToolsandmemoriesSystemPrompt - Fetch once and reuse:
preloadContext - Persist after completion:
createMemoriesOnFinish
- Direct CRUD or context lookup:
- Verify the integration:
- Confirm the same scope is used on both reads and writes.
- Catch
MemoriesClientError. - Do not expose the API key to browser-only code.
Quick Start
@memories.sh/core
import { MemoriesClient } from "@memories.sh/core"
const client = new MemoriesClient({
apiKey: process.env.MEMORIES_API_KEY,
tenantId: "acme-prod",
userId: "user_123",
})
const context = await client.context.get({
query: "billing architecture",
projectId: "dashboard",
mode: "all",
strategy: "hybrid",
limit: 8,
})
await client.memories.add({
content: "Enterprise billing uses Stripe invoices.",
type: "fact",
projectId: "dashboard",
tags: ["billing"],
})
@memories.sh/ai-sdk
import { generateText, stepCountIs, wrapLanguageModel } from "ai"
import { openai } from "@ai-sdk/openai"
import {
memoriesMiddleware,
memoriesSystemPrompt,
memoriesTools,
} from "@memories.sh/ai-sdk"
const model = wrapLanguageModel({
model: openai("gpt-4o"),
middleware: memoriesMiddleware({
tenantId: "acme-prod",
userId: "user_123",
projectId: "dashboard",
}),
})
const result = await generateText({
model,
system: memoriesSystemPrompt(),
tools: memoriesTools({
tenantId: "acme-prod",
userId: "user_123",
projectId: "dashboard",
}),
stopWhen: stepCountIs(5),
prompt: "Summarize prior decisions about billing.",
})
console.log(result.text)
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 3mo ago First seen · 110 lines · 193 tokens per session scan A f4104eaa90d8
memories-sdk is a skill published in the GitHub repository webrenew/memories (37 stars, last pushed today), licensed Apache-2.0. It adds 193 tokens to every session and 1,078 once invoked, about $0.0008 per session on Opus 5.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.
memories-sdk compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| memories-sdkwebrenew/memories | Skill | 37 | today | Apache-2.0 | A | 193 | Claude Code, Codex |
| knowledge-ingestopenclaw/openclaw | Skill | 395k | today | MIT | A | 80 | Claude Code, Codex |
| forgetasgeirtj/system_prompts_leaks | Skill | 74k | 2d ago | CC0-1.0 | A | 0 | Claude Code, Codex |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 70k | 4d ago | Apache-2.0 | A | 217 | Claude Code, Codex |
| Cortexdanielmiessler/LifeOS | Skill | 21k | 13d ago | MIT | A | 184 | Claude Code |
| memoryopensquilla/opensquilla | Skill | 7.2k | 5d ago | Apache-2.0 | A | 44 | Claude Code, Codex |
| ha-data-storesshiwenwen/hope-agent | Skill | 1.9k | today | MIT | A | 115 | Claude Code, Codex |