@deepxx/memories
v0.1.2
Published
TypeScript SDK for the DeepXX Agent Memory API.
Readme
DeepXX TypeScript SDK
@deepxx/memories is the Node.js client for the DeepXX Agent Memory API. It wraps API-key authenticated /v1 endpoints for runtime session creation, event capture, context hydration, memory review, correction, and forget flows.
Install
npm install @deepxx/memoriesThe SDK has no runtime package dependencies. It requires Node.js 20 or newer.
Quick Start
import { DeepXXMemoryClient } from "@deepxx/memories";
const memory = new DeepXXMemoryClient({
apiKey: process.env.DEEPXX_API_KEY!,
baseUrl: process.env.DEEPXX_API_BASE_URL ?? "https://api.deepxx.ai",
defaultProjectId: process.env.DEEPXX_PROJECT_ID,
defaultAgentId: process.env.DEEPXX_AGENT_ID
});
const { session } = await memory.createSession({
title: "Support triage run",
metadata: { source: "support-agent" }
});
await memory.captureEvent({
sessionId: session.id,
kind: "conversation.user_message",
actor: "user",
content: "Remember that rollout decisions should be summarized before code changes."
});
const snapshot = await memory.hydrateContext({
sessionId: session.id,
message: "What context should the agent use before answering?"
});
console.log(snapshot.sections.relevantContext);Authentication
Every request uses the DeepXX API key as a bearer token. Issue a machine key from the DeepXX console with the minimum required scopes:
memory:readforhydrateContext,previewContext,listMemories, andgetMemorymemory:writeforcreateSession,captureEvent,captureConversationTurn, andcorrectMemorymemory:forgetforforgetMemory
Keep the API key on the server side. Do not expose it from browser code.
Runtime Scope
The API key resolves the user, workspace, default project, default agent, and allowed scopes. The SDK can pass projectId, agentId, and sessionId per request when a runtime needs stricter task-level isolation.
For production agents, create a runtime session at the start of a task with createSession, then reuse that session.id for capture and hydration calls.
