Skip to content

[sdk] Add TypeScript SDK — @engram/client#34

Open
Malaybhai11 wants to merge 1 commit into
Dipraise1:mainfrom
Malaybhai11:sdk/typescript-client
Open

[sdk] Add TypeScript SDK — @engram/client#34
Malaybhai11 wants to merge 1 commit into
Dipraise1:mainfrom
Malaybhai11:sdk/typescript-client

Conversation

@Malaybhai11

Copy link
Copy Markdown

What

Adds a TypeScript client package (@engram/client) that mirrors the Python engram.sdk API. This lets JS/TS agent stacks (LangChain.js, Vercel AI SDK, custom agents) use Engram for semantic memory without a Python bridge.

What's included

  • EngramClient class with ingest, query, get, delete, list, health, isOnline, ingestConversation, ingestEmbedding, and queryByVector methods
  • Error hierarchy matching the Python SDK: EngramError, MinerOfflineError, IngestError, QueryError, InvalidCIDError
  • TypeScript types for all data structures (QueryResult, HealthResponse, MemoryRecord, Metadata, ClientOptions)
  • 9 passing tests (unit tests for client construction, error classes, and offline detection)
  • README with usage examples and API reference

Design decisions

  • Uses Node.js stdlib (http/https) — zero runtime dependencies
  • Namespace auth supports the legacy namespace_key flow (matching the Python SDK fallback)
  • CID validation is lenient to avoid breaking on new CID formats
  • Timeout handling matches the Python SDK behavior

Verification

cd sdk/typescript
npm install && npm run build && npm test
# 9 tests, 0 failures

Closes #22

 Implements the core EngramClient with ingest, query, get, delete,
 list, health, and conversation methods. Includes typed errors that
 match the Python SDK hierarchy so JS/TS agent stacks get the same
 catch semantics.

 Closes Dipraise1#22
@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the praise's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sdk] TypeScript SDK — @engram/client mirroring the Python SDK

1 participant