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.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- typescript-rest-client
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- 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.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/troubleshooting.md2.2 KB
- 参考文档references/typescript-client-reference.md2.7 KB
- 参考文档references/workflows.md2.6 KB
- 脚本scripts/ts_client_recipe.mjs1.6 KB
03 SKILL.md 正文
TypeScript REST Client
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.
Route Within This Sub-skill
- Read typescript-client-reference.md for classes, methods, constructor options, defaults, and option names.
- Read workflows.md for install, project/memory operations, live/self-hosted base URL selection, build/test, and Python-to-TS translation patterns.
- Read troubleshooting.md for Node/npm, ESM/CJS, proxy, Axios/API, base URL, auth, and option-name failures.
- Run ts_client_recipe.mjs to print a safe TypeScript recipe or optionally run a live health check when explicit live arguments are supplied.
Quick Pattern
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 })
Important Defaults
- Package:
@memmachine/client. - Node engine in the source baseline:
>=20.19.0. - Constructor default
base_url:https://api.memmachine.ai/v2. - Constructor default
timeout:60000ms. - Constructor default
max_retries:3. - Proxy environment variables can make the client choose a fetch adapter.
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.
Cross-links
- Use python-sdk-and-cli for Python SDK/CLI equivalents and shared memory/filter concepts.
- Use server-configuration-and-memory-engines for self-hosted server setup, REST/MCP, storage, and provider resources.
- Use integrations-and-migration for OpenClaw/no-code/platform integrations and migration workflows.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).