ollama:local-coder
ready · no API spend
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
openai:gpt-5.6-sol
plan · delegate · evaluate
openai:gpt-5.6-luna
ready · lower cost
vllm:local-reviewer
ready · private endpoint
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.
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.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.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.
Control model
openai:gpt-5.6-sol sees the goal, profiles, results, budget, and planSol coordinates the run. Ollama implements locally. Luna extracts structured data. Terra performs the final review.
Four override layers.
A call overrides its profile, which overrides workflow and engine defaults.
Six invocation roles.
Loop, extract, finalize, summarize, plan, and orchestrate resolve independently.
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 guideNo 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.
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 ↗
Planned
Generate and freeze the plan.
A model compiles a typed script, repairs lint diagnostics, and freezes it before a deterministic sandbox runs it, with separate budgets for planning and execution.
runPlanned(engine, goal, null, {
plan: { run: { budgetUsd: 1 } },
run: { budgetUsd: 5 },
})
Meet the planner ↗
Frozen before run
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.
000planokreplayed
001agent / researchokreplayed
002agent / implementokreplayed
003agent / verifymisslive
004finalizewaitingqueued
Configuration
Configuration is explicit and reviewable.
Provider adapters, worker profiles, routing rules, and the run budget are visible together at the call site.
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.