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

@galdor/core

v0.3.1

Published

galdor-bun core: schema, provider, tool, graph, agent, observability.

Readme

@galdor/core

The core of galdor: a typed message schema, a provider abstraction over LLM backends, tools defined once with Zod and validated at runtime, a graph runtime with ReAct and plan-and-execute agents, persistent memory, and first-class observability that persists gen_ai.* / galdor.* spans.

Runs on Bun (loads the TypeScript source directly) and Node ≥ 22.5 (uses the compiled build) from the same package.

Install

bun add @galdor/core      # or: npm install @galdor/core

Subpath exports

Reach each concern through its own entry point:

| Import | What it gives you | |---|---| | @galdor/core/schema | Messages, content parts, tool calls, usage | | @galdor/core/provider | Provider interface, error taxonomy, retry, capabilities | | @galdor/core/tool | defineTool, Registry, executeCalls | | @galdor/core/graph | Graph builder, Runnable, checkpoints, interrupts, hooks | | @galdor/core/agent | ReAct and plan-and-execute agents | | @galdor/core/council | Supervisor and swarm multi-agent orchestration | | @galdor/core/store | SQLite span store (dual-runtime driver) | | @galdor/core/observability | setupTracing, span instrumentation, exporter | | @galdor/core/memory | Retriever, InMemoryStore, chunking | | @galdor/core/embedder | Generic HTTPEmbedder | | @galdor/core/eval | Dataset runner, scorers, report module | | @galdor/core/replay | Deterministic replay from fixtures or the span store | | @galdor/core/spellbook | Versioned prompt-template store with rendering | | @galdor/core/testprovider | Scripted Provider for tests |

The root @galdor/core also re-exports every module as a namespace (import { graph, provider } from "@galdor/core").

Quickstart

import { Graph, START, END } from "@galdor/core/graph";
import { userMessage, messageText } from "@galdor/core/schema";
import { newAnthropic } from "@galdor/provider-anthropic";

const provider = newAnthropic({ apiKey: process.env.ANTHROPIC_API_KEY! });

type S = { question: string; answer: string };

const app = new Graph<S>()
  .addNode("ask", async (s) => {
    const res = await provider.generate({ model: "claude-haiku-4-5", messages: [userMessage(s.question)] });
    return { ...s, answer: messageText(res.message) };
  })
  .addEdge(START, "ask")
  .addEdge("ask", END)
  .compile();

const out = await app.invoke({ question: "Capital of Ecuador?", answer: "" });
console.log(out.answer);

Observability

import { setupTracing, instrumentProvider } from "@galdor/core/observability";

const { tracer, store, shutdown } = setupTracing("traces.db");
const traced = instrumentProvider(provider, tracer, { captureContent: true });
// run agents with `traced`; explore the spans with `galdor scry` or the dashboard.
await shutdown();

Providers

@galdor/core defines the Provider interface; install an adapter to use a backend: @galdor/provider-anthropic, @galdor/provider-openai, @galdor/provider-google, @galdor/provider-bedrock, or @galdor/providerset to pick one by name.

License

Apache-2.0