npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@x12i/memorix-graphifier

v1.3.0

Published

Memorix Graphifier — explore SDK for host graph views and a capability worker. Graphify content, records, JSON Schema, OpenAPI endpoints, and object properties (org-scoped).

Downloads

1,424

Readme

Memorix Graphifier

Turn org knowledge into a knowledge graph, then load that graph from your view — not the Graphifier SPA.

Graphifier accepts content, records, JSON Schema, OpenAPI / endpoints, and object properties. Isolation is always per organization (graphified-<orgId> Mongo DB). Optional agentId is host/Memorix context only; it does not filter Graphifier storage.

Published as @x12i/memorix-graphifier.

npm install @x12i/memorix-graphifier@">=1.3.0"

Two surfaces

| You want | Use | |----------|-----| | Embed an org or item graph in a host app | Explore SDKcreateGraphifierClient (talks to Graphifier REST) | | Pipeline analyze drafts for Memorix write-record | Capability workercreateGraphifierWorker / buildAnalyzeDraft |

This package does not ship the React explorer under ui/. Analyze never writes Memorix subjects or Mongo domain data; REST graphify is the persist path for the explore API.

Explore SDK — host views

import {
  createGraphifierClient,
  graphViewFrom,
  isGraphifierApiError,
} from "@x12i/memorix-graphifier";

const client = createGraphifierClient({
  baseUrl: "http://127.0.0.1:8080",
  orgId: "authix",
  agentId: "opx", // host context only — not a DB filter
  graphId: "default",
});

try {
  // Org canvas (nodes include properties — schemas/endpoints keep their payload)
  const viz = await client.getVisualization({
    maximumNodes: 500,
    nodeTypes: ["schema", "endpoint", "property", "openapi"],
  });

  // Item ego-network
  const around = await client.getItemNeighborhood("default", "user-schema", {
    depth: 1,
  });

  const view = graphViewFrom(around); // { nodes, edges } for Cytoscape / Sigma / custom
  console.log(client.scope, view.nodes.length);
} catch (err) {
  if (isGraphifierApiError(err)) {
    console.error(err.code, err.status, err.message);
  } else {
    throw err;
  }
}

View scopes

| View intent | SDK usage | |-------------|-----------| | Org graph | getVisualization / searchNodes / getNeighbors | | Item + connected | getItemNeighborhood(graphId, itemId, { depth }) | | Schema / endpoint slice | getVisualization({ nodeTypes: ["schema","endpoint","property"] }) or listNodes(graphId, { type: "endpoint" }) |

forScope({ orgId, agentId, graphId }) clones the client. REST paths are always /v1/orgs/{orgId}/…. See examples/explore-host-view.ts.

Graphify schemas, endpoints, and objects

Content and record-shaped items still work. Structured JSON that looks like a schema or API is graphified without registering JSONPath object-types:

  • JSON Schema$schema or a properties map of objects → schema + property nodes, has_property / refs
  • OpenAPIopenapi / swagger or pathsopenapi + endpoint nodes, exposes / uses_schema
  • Endpoint objectmethod + path (or url)
  • Nested objects — child nodes + has_property (depth 2). Scalar record fields (e.g. name, ownerTeamId) stay on the entity; they are not exploded into property nodes

Offline draft (no REST)

import { buildAnalyzeDraft, SERVICE_ID } from "@x12i/memorix-graphifier";

const draft = buildAnalyzeDraft(
  {
    schemas: [
      {
        id: "user",
        title: "User",
        $schema: "https://json-schema.org/draft/2020-12/schema",
        properties: { email: { type: "string" } },
      },
    ],
  },
  { serviceId: SERVICE_ID },
);
// draft.graphDraft.nodes / .edges — same envelope as analyze since 1.0.5

Bags: items, records, snapshot, schemas, endpoints, objects.

Persist via REST

await client.graphify({
  items: [
    {
      id: "pets-api",
      inputType: "structured",
      objectType: "openapi",
      data: {
        openapi: "3.0.0",
        paths: { "/pets": { get: { operationId: "listPets" } } },
      },
    },
  ],
});

Optional putObjectType / listObjectTypes still apply JSONPath mappings when you want them; they are not required for schema/endpoint ingest. Full sample: examples/graphify-schema-endpoint.ts.

Requires the Graphifier REST API (memorix_graphifier, typically :8080).

Env (operator-side)

| Variable | Purpose | |----------|---------| | GRAPHIFIER_API_URL | REST base for the client | | GRAPHIFIER_DEFAULT_ORG_ID / GRAPHIFIER_DEFAULT_TENANT | Default orgId or full graphified-<orgId> | | GRAPHIFIER_DEFAULT_DATABASE_NAME | Optional default full org DB name (must match prefix form) | | GRAPHIFIER_DEFAULT_AGENT_ID | Optional host agent context | | GRAPHIFIER_DEFAULT_GRAPH_ID | Default graph id (default) | | GRAPHIFIER_MONGO_DATABASE_PREFIX | Default graphified- |

Capability worker (Memorix pipelines)

Stable analyze → persist envelope (graphDraft / patchPlan with array nodes/edges and sourceRefs) since 1.0.5. Pin writers at >=1.0.5. Platform sequence is analyze → write-record (portConfig.mode: "graphifier"). Details: docs/memorix-binding.md.

npm install
npm test
npm start

Worker listen URL is printed as JSON (endpoint → ServiceRef). Defaults: host 127.0.0.1, port 7500 from @x12i/ports-manager zone memorix-graphier.

import {
  graphifierCapability,
  createGraphifierWorker,
  SERVICE_ID,
} from "@x12i/memorix-graphifier";

Depends on @x12i/memorix-sdk only. Do not install Memorix engine packages in this app.

Manual invoke

curl -sS -X POST "http://127.0.0.1:${MEMORIX_WORKER_PORT}/" \
  -H 'content-type: application/json' \
  -d '{
    "version":"memorix-capability/1",
    "serviceId":"memorix-graphifier",
    "operation":"analyze",
    "scope":{"orgId":"sandbox1","agentIds":["opx"]},
    "execution":{
      "runId":"r1","stepId":"s1","attempt":1,"correlationId":"c1"
    },
    "inputs":{
      "items":[
        {"id":"credorix","inputType":"structured","objectType":"product",
         "data":{"name":"Credorix","ownerTeamId":"identity-team"}}
      ]
    }
  }'

Smoke and CI fixtures: sandbox* orgs and agentIds: ["opx"] only.

Legacy Python REST (optional)

memorix_graphifier/ is a FastAPI + Mongo explore/ingest API. It is not the Memorix called-service surface. The explore SDK uses it as the data plane.

export GRAPHIFIER_USE_MEMORY_STORE=true
pip install -e ".[dev]"
memorix-graphifier

See ARCHITECTURE.md.

Knowledge Graph UI

Optional full SPA (not this npm package):

# API: set GRAPHIFIER_CORS_ORIGINS=http://127.0.0.1:7501
cd ui && cp .env.example .env && npm install && npm run dev
# open http://127.0.0.1:7501/organizations/<orgId>/knowledge-graph

Details: ui/README.md.

License

Apache License 2.0. Upstream Graphify attribution is retained in NOTICE and LICENSE-MIT for applicable portions.