SDKs
First-party TypeScript and Python clients for Cloud, self-hosted FishMem, and the local Desktop CLI.
FishMem maintains two HTTP SDKs and one language-neutral Desktop CLI contract:
@fishmem/sdkfor TypeScript/JavaScript;fishmemfor synchronous and asynchronous Python;- the
fishmem callbridge, wrapped by both SDKs for FishMem Desktop.
The TypeScript HTTP client uses only
standard web APIs—fetch, Headers, URL, and AbortSignal—so the same
package runs without platform adapters in:
- Node.js 20 and newer
- Bun
- Deno
- Cloudflare Workers
- Vercel Functions and Edge Functions
- other WinterCG-compatible serverless runtimes
npm install @fishmem/sdk
pip install fishmemimport { FishMem } from "@fishmem/sdk";
const fishmem = new FishMem({
apiKey: process.env.FISHMEM_API_KEY!,
});
const { results } = await fishmem.memories.search({
query: "How does this user prefer answers?",
user_id: "alex",
top_k: 5,
});The SDK works with both FishMem Cloud and a self-hosted apps/web deployment.
Set baseUrl when you self-host.
Long text and files use the separate fishmem.documents resource. Direct text
ingest is synchronous; PDF, Office, EPUB, email, image, and text-file upload
queues durable extraction. Raw originals stay canonical while extracted
Markdown, chunks, and vectors remain rebuildable retrieval projections.
TypeScript quickstart
Add and recall the first memory.
Async inference events
Queue extraction and poll its durable, privacy-safe result.
Python SDK
Use sync or async clients against the same API.
Desktop SDK
Connect to the running local app through fishmem CLI.
Scope entities
Browse and remove structural user, agent, and run memory owners.
Document methods
Ingest text or extract files asynchronously, then retrieve citation-ready evidence.
Runtime guides
Node, Bun, Deno, Cloudflare, and Vercel examples.
All resources
State, governed beliefs, profile, operations, exports, and imports.
Errors and idempotency
Build safe production request handling.