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

@ultra-dex/dexgraph

v1.2.0

Published

Deterministic workflow orchestration with DAG-based task graphs

Downloads

31

Readme

@ultra-dex/dexgraph

Define AI workflows in YAML. DexGraph compiles them into DAGs, schedules tasks in parallel where possible, dispatches to providers via @ultra-dex/sdk, verifies outputs, and handles failures automatically.

Install

npm install @ultra-dex/dexgraph

Quickstart

# workflow.dex
version: dexgraph/v1
name: research-and-summarize

tasks:
  - id: search
    role: engineer
    instruction: Search the web

  - id: analyze
    role: engineer
    instruction: Analyze results
    depends_on: [search]

  - id: summarize
    role: engineer
    instruction: Summarize findings
    depends_on: [analyze]
import { parse, DexGraph, Scheduler, StateMachine } from '@ultra-dex/dexgraph';

const result = parse('./workflow.dex');
const graph = new DexGraph(result);
const scheduler = new Scheduler(graph);

console.log(graph.getExecutionOrder());
// → ['search', 'analyze', 'summarize']

DexGraph + UltraDex SDK Integration

Connect DexGraph to the @ultra-dex/sdk SmartRouter so each workflow step is automatically routed to the cheapest/fastest AI provider.

import { UltraDex } from '@ultra-dex/sdk';
import { DexGraph, Scheduler, UltraDexAdapter } from '@ultra-dex/dexgraph';

// 1. Set up SDK with providers and SmartRouter
const dex = new UltraDex();
dex.registerProvider('openai', openaiProvider);
dex.registerProvider('anthropic', anthropicProvider);
dex.enableRouter({ strategy: 'cheapest' });

// 2. Create DexGraph workflow
const graph = new DexGraph(parsedWorkflow);

// 3. Bridge DexGraph → SDK via UltraDexAdapter
const adapter = new UltraDexAdapter(dex);
const scheduler = new Scheduler(graph, {
  dispatch: (node) => adapter.run({
    nodeId: node.id,
    taskType: node.role,
    input: { prompt: node.instruction },
    timeout: 30000,
  }),
});

// 4. Run — each step routes to the best provider automatically
const result = await scheduler.run();

Why this matters

  • Workflow layer (DexGraph) handles DAG scheduling, retries, verification, and inter-task context
  • Routing layer (SDK) handles provider selection, failover, and cost tracking
  • Together they form an end-to-end agentic orchestration stack

Demo

A full working demo is included in the package:

# From the repo root:
node packages/dexgraph/demo/research-workflow.js

This runs a 3-step research → analyze → summarize workflow across simulated providers and shows exactly how much dynamic routing saves vs single-provider.

API

  • parse(filepath) — Parse YAML workflow into DexGraphResult
  • DexGraph — DAG builder + cycle detection
  • Scheduler — Topological sort + parallel batching
  • StateMachine — Node state transitions (CREATED → READY → RUNNING → SUCCESS)
  • Dispatcher — Task dispatch with context injection
  • createVerifier() — Output verification against rules
  • ContextInjector — Inter-task data passing
  • UltraDexAdapter — Bridges DexGraph to @ultra-dex/sdk for dynamic provider routing

License

MIT