Ultra-Dex

Ultra-Dex orchestrates AI tasks across multiple providers and manages complex workflows.

Ultra-Dex

Route AI tasks across providers. Orchestrate multi-agent workflows. Persist everything.

npm npm CI License: MIT

Ultra-Dex is an AI orchestration layer that routes tasks across providers (OpenAI, Anthropic, Google, NVIDIA, Mistral, Groq, and 7 more), coordinates multi-agent workflows as DAGs, and persists memory and execution state automatically.

Website | Docs | Dashboard


Install

npm i -g @ultra-dex/cli
ultra-dex init

The ultra-dex init command will:

  1. Prompt for your API keys (Anthropic required, OpenAI optional)
  2. Create .ultra-dex/config.yaml
  3. Run a hello-world chat and show the response + cost

Quick Start

# After ultra-dex init, run your first AI task
ultra-dex run planner -t "design a REST API"

# Or use a multi-agent swarm
ultra-dex swarm "build a landing page"

Quick Example

Route to the cheapest provider automatically

import { UltraDex } from '@ultra-dex/sdk';

const dex = new UltraDex();
dex.registerProvider('openai', openaiProvider);
dex.registerProvider('anthropic', anthropicProvider);
dex.registerProvider('google', googleProvider);

// SDK picks the cheapest provider for each call
dex.enableRouter({ strategy: 'cheapest' });

const result = await dex.chat('Explain quantum computing');
// Routed to google (cheapest) — saved 80% vs OpenAI

Orchestrate a multi-step workflow

# workflow.yaml
version: dexgraph/v1
name: research-agent

tasks:
  - id: research
    role: engineer
    instruction: Gather key facts about the topic

  - id: analyze
    role: architect
    instruction: Identify the most important trends
    depends_on: [research]

  - id: summarize
    role: reviewer
    instruction: Distill into actionable takeaways
    depends_on: [analyze]
npx @ultra-dex/dexgraph run workflow.yaml
# Execution order: research -> analyze -> summarize
# All 3 nodes succeeded in 330ms

Architecture

@ultra-dex/sdk                        @ultra-dex/dexgraph
+-----------------------+             +------------------------+
| SmartRouter           |             | YAML Parser            |
|   cheapest / fastest  |   bridge    | DAG Builder (DexGraph) |
|   quality / fallback  | <--------+ | Scheduler              |
| Provider Registry     |             | State Machine          |
| Middleware Pipeline   |             | UltraDexAdapter        |
+-----------------------+             +------------------------+
         |                                       |
    13+ AI Providers                    Workflow Orchestration
    (OpenAI, Anthropic,                 (parallel, sequential,
     Google, NVIDIA, ...)                retry, halt-on-fail)

Supported Providers

ProviderIDModel examples
OpenAIopenaiGPT-4o, GPT-4, GPT-3.5
AnthropicanthropicClaude Opus, Sonnet, Haiku
GooglegoogleGemini Pro, Gemini Flash
NVIDIAnvidiaNemotron, Llama 3.1 via NVIDIA API
MistralmistralMistral Large, Medium, Small
GroqgroqLlama, Mixtral via Groq inference
DeepSeekdeepseekDeepSeek V3, DeepSeek Coder
CoherecohereCommand R, Command R+
TogethertogetherOpen-source models via Together AI
FireworksfireworksFast open-source inference
PerplexityperplexitySonar models with web search
GrokgrokGrok-2
LlamallamaLlama 4 via Meta API

CLI

The full CLI provides agent-based task execution, swarm workflows, and diagnostics:

git clone https://github.com/Srujan0798/Ultra-Dex.git && cd Ultra-Dex && npm install

# Run with mock provider (no API keys needed)
MOCK_AI=true npm start -- run planner -t "design a REST API"

# Multi-agent swarm
MOCK_AI=true npm start -- swarm "build a landing page"

# Start local server + MCP endpoint
npm start -- serve

Key Features

  • Smart Routing — 4 strategies: cheapest, fastest, quality-weighted, fallback chain
  • DAG Orchestration — Define workflows in YAML, execute as dependency graphs
  • 13+ Providers — One interface for all major AI providers
  • Persistent Memory — SQLite-backed storage with vector search and graph queries
  • Multi-Agent Swarms — Named agent roles (planner, backend, frontend, reviewer, debugger)
  • Governance — Policy enforcement, audit logging, execution traces
  • MCP Server — Model Context Protocol integration for tool registries

Project Structure

packages/sdk/         @ultra-dex/sdk — provider routing and smart selection
packages/dexgraph/    @ultra-dex/dexgraph — workflow DAG engine
apps/cli/             CLI with 55+ commands
apps/website/         Marketing site (Next.js)
apps/dashboard/       SaaS dashboard (Next.js)
apps/docs-site/       Documentation (Docusaurus)
src/core/             Core engine (orchestration, memory, governance, agents)
examples/             Working examples
tests/                526 tests (unit + integration + CLI)

Contributing

See CONTRIBUTING.md for setup, testing, and guidelines.

License

MIT. See LICENSE.