协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
typescript-rest-client【开发与工程】Use the @memmachine/client TypeScript REST client for Node/TypeScript project and memory operations, client defaults, API errors, build/test workflows, and self-hosted/cloud base URL troubleshooting.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task names @memmachine/client, TypeScript/Node,
MemMachineClient, MemMachineProject, MemMachineMemory, Axios errors,
Jest tests, npm build/lint/format, or a TypeScript app that adds/searches
MemMachine memories.
import MemMachineClient from '@memmachine/client'
const client = new MemMachineClient({
base_url: 'https://api.memmachine.ai/v2',
api_key: process.env.MEMMACHINE_API_KEY
})
const project = client.project({ org_id: 'my-org', project_id: 'my-project' })
const memory = project.memory({ user_id: 'alice', agent_id: 'assistant' })
await memory.add('Alice prefers aisle seats.', {
metadata: { category: 'travel' },
types: ['episodic', 'semantic']
})
const result = await memory.search('What seating does Alice prefer?', { top_k: 5 })
@memmachine/client.>=20.19.0.base_url: https://api.memmachine.ai/v2.timeout: 60000 ms.max_retries: 3.For a self-hosted server, confirm the correct REST prefix. A self-hosted FastAPI
server commonly exposes /api/v2, while the TS client's cloud default ends in
/v2. Set base_url to the exact prefix that makes /health and
/memories/search resolve correctly.