Skip to main content
@3ngram/sdk is a thin TypeScript client over the REST /api/v1 surface. It takes explicit configuration and sends the configured API key as X-API-Key on every request.
Install with npm install @3ngram/sdk (or pnpm add @3ngram/sdk). The package ships ESM with bundled type declarations.

Client setup

Methods

remember

Append a typed memory. Commitment outputs include a commitmentId. Signature: remember(input: RememberToolArgs): Promise<RememberToolOutput>
REST route: POST /api/v1/memories

Example

Input schema

Output schema

Run semantic and keyword retrieval with optional pre-fusion filters. Signature: search(query: string, opts?: SearchOptions): Promise<SearchToolOutput>
REST route: POST /api/v1/search

Example

Input schema

Output schema

getFacts

Read currently-valid facts, with optional bi-temporal filters. Signature: getFacts(filters?: FactsQueryArgs): Promise<FactsToolOutput>
REST route: GET /api/v1/facts

Example

Input schema

Output schema

revise

Create a corrected successor memory and link it to the predecessor. Signature: revise(predecessorId: string, input: ReviseBody): Promise<ReviseToolOutput>
REST route: POST /api/v1/memories/:id/revise

Example

Input schema

Output schema

resolve

Transition the commitment riding a memory, or archive an active blocker. Signature: resolve(memoryId: string, status: CommitmentStatus): Promise<ResolveToolOutput>
REST route: POST /api/v1/memories/:id/resolve

Example

Input schema

Output schema

Errors