ワンクリックで
agent-memory-sdk
Use when building, integrating, testing, or extending the agent-memory TypeScript SDK
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when building, integrating, testing, or extending the agent-memory TypeScript SDK
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | agent-memory-sdk |
| description | Use when building, integrating, testing, or extending the agent-memory TypeScript SDK |
agent-memory-sdk is a TypeScript SDK that wraps model calls with automatic scoped memory, compact recall, and pluggable storage/model adapters.
Use this when:
agent-memory-sdk to an app, API route, worker, or service.packages/core: private runtime-neutral engine, contracts, compiler, retrieval, in-memory store. No Node fs, provider SDKs, or database drivers.packages/local: private local .memory/memory.json persistence.packages/sqlite: private real SQLite .memory/memory.sqlite persistence.packages/postgres: private Postgres persistence with automatic migrations and pgvector retrieval.packages/openai: private OpenAI chat completions through the official openai SDK, including custom baseURL providers for compatible endpoints.packages/anthropic: private Anthropic messages through the official @anthropic-ai/sdk package.packages/gemini: private Gemini generation through the official @google/genai package.packages/xai: private xAI chat completions through the documented OpenAI SDK-compatible client path with xAI defaults.agent-memory-sdk: the only public npm package. createAgent({ model }) should work with automatic local memory and should bundle private workspace package output into dist/internal.import { createAgent, openai } from "agent-memory-sdk"
const agent = createAgent({
model: openai("gpt-5")
})
const result = await agent.generate({
userId: "user_123",
threadId: "thread_123",
operationId: "op_migration",
messages: [{ role: "user", content: "Remember that I prefer terse updates." }]
})
userId in multi-user apps. Missing userId writes to the default scope.threadId for chat-local context.operationId for complex multi-step work. Retrieval packs recent operation events without replaying the full chat.memory: false when memory must be disabled.memory: { learn: false } for messages that should not teach durable memory.For a provider adapter, add or extend a private workspace package under packages/* and return a ModelProvider. Major first-party provider packages should depend on the provider's official SDK when one exists; OpenAI-compatible wrappers are for custom model endpoints and documented compatible providers.
For a storage adapter, add or extend a private workspace package under packages/* and implement MemoryStore. Database adapters should own their migration lifecycle instead of making application code run setup manually.
Keep core dependency-free and runtime-neutral.
Run:
pnpm test
pnpm lint
pnpm pack:check
Check package dry-runs for accidental inclusion of apps/playground, .memory, .ai-memory, tarballs, logs, screenshots, or local databases.