
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
@tencentdb-agent-memory/memory-sdk-ts
Advanced tools
TypeScript SDK for the TencentDB Agent Memory v2 API.
# From npm (after publish)
npm install @tencentdb-agent-memory/memory-sdk-ts
# From local .tgz
npm install ./tencentdb-agent-memory-memory-sdk-0.1.0.tgz
import { MemoryClient } from "@tencentdb-agent-memory/memory-sdk-ts";
const client = new MemoryClient({
endpoint: "http://127.0.0.1:8420",
apiKey: "your-api-key",
serviceId: "your-memory-space-id",
});
// L0: append a conversation
const result = await client.addConversation({
session_id: "sess-1",
messages: [
{ role: "user", content: "Hello" },
{ role: "assistant", content: "Hi!" },
],
});
console.log(result.accepted_ids);
// L1: search structured memories
const hits = await client.searchAtomic({ query: "user preferences", limit: 5 });
console.log(hits.items);
// L1: update a memory note
await client.updateAtomic({ id: "note-xxx", content: "updated content", background: "context" });
// L2: list scenario files
const scenarios = await client.listScenarios({ path_prefix: "" });
console.log(scenarios.entries);
// L2: read a scenario file
const file = await client.readScenario({ path: "工作.md" });
console.log(file.content);
// L2: update a scenario file (must already exist)
await client.writeScenario({ path: "工作.md", content: "# Updated", summary: "new summary" });
// L3: read core memory (persona)
const core = await client.readCore();
console.log(core.content);
// L3: write core memory
await client.writeCore({ content: "# User Profile\n..." });
// Read memory pipeline artifacts (e.g. persona.md, scene_blocks/*.md)
const raw = await client.readFile("scene_blocks/工作.md");
| Layer | Method | Endpoint |
|---|---|---|
| L0 | addConversation() | POST /v2/conversation/add |
| L0 | queryConversation() | POST /v2/conversation/query |
| L0 | searchConversation() | POST /v2/conversation/search |
| L0 | deleteConversation() | POST /v2/conversation/delete |
| L1 | updateAtomic() | POST /v2/atomic/update |
| L1 | queryAtomic() | POST /v2/atomic/query |
| L1 | searchAtomic() | POST /v2/atomic/search |
| L1 | deleteAtomic() | POST /v2/atomic/delete |
| L2 | listScenarios() | POST /v2/scenario/ls |
| L2 | readScenario() | POST /v2/scenario/read |
| L2 | writeScenario() | POST /v2/scenario/write |
| L2 | rmScenario() | POST /v2/scenario/rm |
| L3 | readCore() | POST /v2/core/read |
| L3 | writeCore() | POST /v2/core/write |
All non-zero code responses throw TDAMError:
import { TDAMError } from "@tencentdb-agent-memory/memory-sdk-ts";
try {
await client.readCore();
} catch (e) {
if (e instanceof TDAMError) {
console.error(`code=${e.code} message=${e.message} request_id=${e.requestId}`);
}
}
# Build
npm run build
# Pack as .tgz for distribution
npm pack
# → tencentdb-agent-memory-memory-sdk-0.1.0.tgz
MIT
FAQs
TypeScript SDK for TencentDB Agent Memory v2 API
The npm package @tencentdb-agent-memory/memory-sdk-ts receives a total of 267 weekly downloads. As such, @tencentdb-agent-memory/memory-sdk-ts popularity was classified as not popular.
We found that @tencentdb-agent-memory/memory-sdk-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.