New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@memofs/adapter-workers-ai

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@memofs/adapter-workers-ai

Cloudflare Workers AI extractor adapter for MemoFS.

latest
Source
npmnpm
Version
1.3.0-beta.2
Version published
Weekly downloads
1
-95%
Maintainers
1
Weekly downloads
 
Created
Source

@memofs/adapter-workers-ai

npm version   Status: Beta   npm downloads   CI   Docs   MIT License

Cloudflare Workers AI extractor adapter for MemoFS.

What is this?

Cloudflare Workers AI frontier extractor adapter for MemoFS. Implements core's provider-neutral Extractor contract against a Cloudflare Workers AI binding (env.AI), extracting subject–predicate–object facts into the memory graph.

Installation

npm install @memofs/adapter-workers-ai

Requires Node.js >= 22.

Peer dependency: @cloudflare/workers-types (for the Ai binding type).

Quick Start

import { createWorkersAiExtractor } from "@memofs/adapter-workers-ai";

const extractor = createWorkersAiExtractor({ ai: env.AI });

// Pass it to the MemoFS runtime:
// new MemoFS({ store, projectId, mode: "local", extractor, ... })

Resilience

The adapter parses the model's output defensively: malformed JSON, missing fields, or unknown relation types are dropped (never thrown). A failed extraction returns an empty { nodes, edges }, so the write fan-out stays resilient — and the rule-based extractor remains available as the fallback when no Ai binding is configured.

Boundary

This package owns the Workers AI extractor adapter implementation. It does not own the MemoFS core Extractor contract, other adapters, or the Workers AI service itself.

Contributing

See our central Contributing Guide and development scripts for details on formatting, linting, and testing within the monorepo.

License

MIT

Keywords

cloudflare

FAQs

Package last updated on 16 Aug 2026

Related posts