Agent orchestration beyond the coding session

Ultra workflows. Under your rules.

Claude Code ultracode and ChatGPT Ultra coordinate agents inside their apps. Rulvar brings that class of orchestration into your TypeScript product, where you choose every model, cap priced spend, persist state, and test the workflow as code.

pnpm add @rulvar/rulvar @rulvar/openai
product workflow / migrate-payments
owned by your app

01 Built for workflows your product repeats.

02 Hosted and local models share one run.

03 With durable stores, completed model calls survive restarts.

A precise comparison

Ultra is a mode.
Rulvar is a runtime.

The modes are excellent when you want an AI application to solve a difficult task. Rulvar is for the next step: running that orchestration repeatedly inside your own product, under policy your code controls.

Claude Code ultracode

Dynamic workflows in a coding session

Xhigh reasoning can generate a JavaScript workflow, fan work out to subagents, and keep completed results when paused in the same session.

Best for a large coding or research task right now.
ChatGPT / Codex Ultra / subagents

Proactive or explicit delegation in an AI application

ChatGPT Ultra can delegate parallel work proactively. Codex clients run requested subagents and support custom instructions, models, reasoning, and sandbox settings.

Best for supervised work across app or agent threads.
Rulvar TypeScript runtime

Agent execution owned by your product

Your application defines the workflow, routes each invocation across providers, persists effects, enforces budget policy, and exposes the run to tests and telemetry.

Best for production workflows you must control and repeat.
Capability Claude Code ultracode ChatGPT Ultra / Codex subagents Rulvar
Where it runs Claude Code session and workflow runtime ChatGPT Work mode or Codex client Your Node.js application and infrastructure
Who owns the plan A generated JavaScript workflow you can save and rerun The main agent coordinating subagent threads Human TypeScript, a frozen planner script, or a live orchestrator
Model control The session model, with a smaller model available by stage Custom Codex agents can use different model configurations Per-invocation routing across OpenAI, local models, and gateways
Spend control Token visibility, agent caps, and advisory size guidance Usage limits; parallel agents consume additional tokens Immutable budgetUsd for priced calls, bounded in-flight overshoot, and a cost report
Recovery Completed agents are cached when resuming in the same session Agent threads and results remain visible in the product workflow Journaled effects resume across processes or machines from durable storage
Verification Inspect and rerun the generated workflow script Inspect subagent threads and configure specialist agents Fake adapters, VCR cassettes, replay-strict tests, and typed events

Use an Ultra mode when you want the app to complete a task. Use Rulvar when your product must own the workflow, the providers, the spend, and the recovery path.

Comparison based on the public documentation for Claude Code dynamic workflows, OpenAI subagents, and Rulvar orchestration modes.

A different model topology

One capable coordinator.
Workers chosen by role.

Reserve the strongest model for planning and judgment. Send implementation, extraction, retrieval, or verification to smaller hosted models, local Ollama or vLLM endpoints, or any OpenAI-compatible gateway.

ORCHESTRATE / HIGH EFFORT

Control model

openai:gpt-5.6-sol sees the goal, profiles, results, budget, and plan
IMPLEMENT ollama:qwen3-coder:30b local · tool loop
EXTRACT openai:gpt-5.6-luna hosted · low effort
REVIEW openai:gpt-5.6-terra hosted · escalation target
MIXED PROVIDERS

Sol coordinates the run. Ollama implements locally. Luna extracts structured data. Terra performs the final review.

01

Four override layers.

A call overrides its profile, which overrides workflow and engine defaults.

02

Six invocation roles.

Loop, extract, finalize, summarize, plan, and orchestrate resolve independently.

03

Provider-neutral IDs.

Address OpenAI, Ollama, vLLM, or a gateway as adapterId:model.

Immutable run budget

The spending ceiling is part of the run.

Pass budgetUsd when starting a run. Rulvar checks spend before dispatch, limits each turn, stops live streams at the ceiling, and returns a cost report. Provider billing can leave a bounded in-flight overshoot; unpriced local usage is reported separately.

Read the budget guide
Uniform routing one hosted model handles every role
Role-aware routing capability follows task requirements

No API can raise budgetUsd after execution begins.

Workflow authoring

Choose who produces the plan.

All three modes use the same runtime primitives. They differ in authorship and whether the plan may change after the run starts.

A

Static

Author a fixed plan in TypeScript.

Ordinary async TypeScript over typed primitives. Ideal when the shape is known and every branch should be explicit.

engine.run(workflow) Explore workflows ↗
C

Adaptive

Adapt the plan as results arrive.

The orchestrator can spawn, await, cancel, adapt its strategy, and finish based on intermediate output. Add PlanRunner when live replanning needs a typed task DAG.

orchestrate(engine, goal) See adaptive mode ↗

Content-addressed journal

Completed effects become replayable facts.

With durable journal and transcript stores, each effect receives a stable identity before it enters the journal. Crash the process, edit the workflow, move machines, then resume. Completed calls load from storage.

RUN / feature-128 RESUME PREVIEW

000planokreplayed

001agent / researchokreplayed

002agent / implementokreplayed

003agent / verifymisslive

004finalizewaitingqueued

3replay hits
1live call
$0repaid work
Stable identitiesUnrelated edits do not invalidate completed effects.
Turn checkpointsA crash costs at most one partial turn per interrupted agent.
Byte-level testsFake adapters, VCR cassettes, strict replay.
Your storageJSONL, SQLite, or a conforming custom store.

Configuration

Configuration is explicit and reviewable.

Provider adapters, worker profiles, routing rules, and the run budget are visible together at the call site.

workflow.mts
import {
  createEngine,
  defineWorkflow,
  FileTranscriptStore,
  JsonlFileStore,
  openai,
} from '@rulvar/rulvar';
import { openaiCompatible } from '@rulvar/openai';

const engine = createEngine({
  adapters: [
    openai(),
    openaiCompatible({
      id: 'ollama',
      baseURL: 'http://127.0.0.1:11434/v1',
    }),
  ],
  defaults: {
    routing: {
      loop: 'openai:gpt-5.6-terra',
      extract: 'openai:gpt-5.6-luna',
    },
    profiles: {
      planner: { model: 'openai:gpt-5.6-sol' },
      implementer: { model: 'ollama:qwen3-coder:30b' },
      reviewer: { model: 'openai:gpt-5.6-terra' },
    },
  },
  stores: {
    journal: new JsonlFileStore({ dir: '.rulvar/journal' }),
    transcripts: new FileTranscriptStore({ dir: '.rulvar/transcripts' }),
  },
});

const shipFeature = defineWorkflow(
  { name: 'ship-feature' },
  async (ctx, goal: string) => {
    const plan = String(await ctx.agent(goal, { agentType: 'planner' }));
    const patch = String(await ctx.agent(plan, { agentType: 'implementer' }));
    return ctx.agent(patch, { agentType: 'reviewer' });
  },
);

const objective = 'Implement and review the requested feature';
const run = engine.run(shipFeature, objective, {
  budgetUsd: 5,
});

const outcome = await run.result;
console.log(outcome.status, outcome.cost.totalUsd);

Open source · Apache-2.0

Use Rulvar when the workflow
is part of your product.

Embed durable multi-agent execution in your Node.js application without adopting a hosted platform or surrendering runtime policy.