@turbomem/okf
v1.0.0
Published
Open Knowledge Format (OKF) parser, validator, and writer for Node.js
Maintainers
Readme
@turbomem/okf
Open Knowledge Format (OKF) v0.1 parser, validator, writer, and concept graph for Node.js. Optionally seed turbomem agent memory from OKF bundles.
Install
npm install @turbomem/okfFor turbomem integration, also install turbomem:
npm install @turbomem/okf turbomemStandalone usage
import { parseBundle, validateBundle, buildGraph } from "@turbomem/okf";
const bundle = await parseBundle("./knowledge");
const result = validateBundle(bundle);
const graph = buildGraph(bundle);CLI
npx okf validate ./knowledge
npx okf parse ./knowledgeturbomem integration
import { TurboMemory } from "turbomem";
import { parseBundle, addFromBundle } from "@turbomem/okf";
const memory = new TurboMemory({
embeddings: "openai",
storage: "pglite",
extraction: { provider: "openai", model: "gpt-4.1-mini" },
openai: { apiKey: process.env.OPENAI_API_KEY },
});
await memory.init();
const bundle = await parseBundle("./knowledge");
await addFromBundle(memory, bundle, { userId: "agent_1" });
const results = await memory.search("How do I compute weekly active users?", {
userId: "agent_1",
limit: 5,
});Documentation
https://docs.turbomem.dev/adapters/okf
License
Apache License 2.0
