TypeScript SDK Reference
The@moorcheh-ai/memanto SDK for Node.js / TypeScript boots a local Memanto server on demand via uvx and exposes an ergonomic client.
Prerequisites
- Node.js 18+
uvxon PATH — install uv (which shipsuvx)
Installation
Quick Start
- Picks a free port and spawns
uvx memanto serve --port <port>. - Polls
/healthuntil the server is ready. - Creates the agent (if
autoCreateis enabled — defaulttrue) and activates a session. - Sends the request with the session token attached.
close() is called (or the Node process exits), the server is sent SIGTERM.
Memanto Client
Constructor
| Option | Type | Default | Description |
|---|---|---|---|
agentId | string | — | Required. Agent identifier. |
apiKey | string | — | Moorcheh API key, passed to the server as MOORCHEH_API_KEY. |
autoCreate | boolean | true | Create the agent if it does not exist. |
baseUrl | string | — | Use an already-running server URL instead of spawning one. |
port | number | auto | Bind the spawned server to this port. |
host | string | 127.0.0.1 | Bind host. |
uvxPath | string | uvx | Override the path to uvx. |
packageSpec | string | memanto | Package spec for uvx. Use memanto==0.2.3 to pin. |
healthTimeoutMs | number | 60000 | Health-check timeout. |
verbose | boolean | false | Stream server logs to the parent process. |
Memory Write Methods
Memory Read Methods
Analysis Methods
action is one of: keep_old | keep_new | keep_both | remove_both | manual.