Install, set a key, ask.
slorg is an npm package (lorg). Six steps below take you from install
to a fully-scored answer with the plan exposed. Roughly 5–15 seconds per query on
the default config.
Install the package
slorg ships on npm as lorg. Install it globally for the CLI, or as a project dependency to use the library. Node 18+ is required.
# CLI
npm install -g lorg
# or as a library
npm install lorg Set an API key
slorg makes OpenAI-compatible calls in steps 1, 3, and 6. Provide a key via OPENAI_API_KEY. Point OPENAI_BASE_URL at any compatible endpoint to use another provider or a local model.
export OPENAI_API_KEY=sk-your-key-here
# optional: use any OpenAI-compatible endpoint
# export OPENAI_BASE_URL=https://api.groq.com/openai/v1 Run a query from the CLI
Ask a question and slorg runs the full six-step pipeline: draft, graph, keywords, multi-engine search, fetch, and score. Expect roughly 5–15 seconds of wall-clock on the default configuration.
lorg "What causes the northern lights?" Use it as a Node library
Instantiate LorgSearch with your key and call search(). The returned object exposes every intermediate artifact, not just a final answer.
import LorgSearch from 'lorg';
const lorg = new LorgSearch(process.env.OPENAI_API_KEY);
const res = await lorg.search('What is quantum computing?', {
model: 'gpt-4o-mini',
maxResults: 5,
}); Read the structured response
Every stage of the pipeline is a field on the response. Inspect the draft, the graph, and the keywords to understand why a result set looks the way it does.
res.answer; // step 1 — draft answer from the model
res.knowledgeGraph; // step 2 — entities + relationships
res.keywords; // step 3 — graph-derived search terms
res.results; // step 6 — web results, each with a 0–1 score
res.tokenCount; // total OpenAI tokens used Or serve it over REST
Start slorg as an OpenAI-compatible service and POST queries to it. Useful for wiring the pipeline into an existing app or another language.
lorg server -p 3000
# POST /search { "query": "..." } Full API reference lives at docs.skelfresearch.com/slorg. See the whole flow on the architecture page.