Orkestia
Blog
Guides

Building with DGI

Express a goal to DGI, review the workflow plan it assembles, and promote a good plan into a reusable deterministic virtual workflow

DGI (Dialog Generative Interface) is the reasoning surface where you describe what you want to happen and Orkestia figures out which workflows to run, in what order, with what inputs. It is the front door to Orkestia's hybrid execution model: AI reasons about intent, then that intent is compiled into a deterministic virtual workflow the engine runs the same way every time.

This guide walks the full loop — goal → plan → review → run → promote — with a worked example. It assumes you already understand workflows and have read the DGI concept page.

DGI's job is design, not custody. The plan it produces is a graph of capabilities that execute in your own cloud accounts via runners. Orkestia keeps workflow state and Lumen observability — never your code or data. See security and compliance.

The mental model

There are three distinct objects in play. Keeping them separate is the key to using DGI well.

ObjectWhat it isWho produces it
Goal / dialogNatural-language intent plus the back-and-forth that refines itYou, in conversation
Plan (VirtualWorkflow)A typed, validated DAG of workflow steps with explicit input wiringDGI reasoning, expressed as data
Compiled compositionPlain JSON in the engine's DAGWorkflow shape, deterministic and runnableThe virtual engine compiler

DGI reasons in natural language but emits structure. That structure is a VirtualWorkflow — layers of steps, each step bound to a registered workflow type ({provider}.{service}.{operation}), each argument explicitly sourced. The virtual engine then validates it against the live catalog of installed workflow types and compiles it to engine-ready JSON. Once compiled, there is no AI in the execution path — it is a deterministic DAG.

The plan is the contract, not the prose. Two people can phrase the same goal differently, but if DGI lands on the same VirtualWorkflow it compiles to byte-stable JSON. That determinism is what makes plans diffable, reviewable, and promotable.

Step 1 — Express a goal

Talk to DGI the way you would brief a capable platform engineer: state the outcome, the constraints, and the inputs you can provide. DGI does not need you to name workflows — capability discovery is its job — but it works best when the outcome is concrete and bounded.

Good goals are specific about the end state:

Stand up a static-site bucket in our AWS sandbox account, upload an index page,
and put it behind a CDN. The bucket name should come from a parameter so I can
reuse this for other sites.

Weaker goals leave DGI guessing about scope ("set up our website infra") — it will ask clarifying questions, but you will iterate more.

Treat the opening message as a design brief. Name the target environment, the resources, and what should be parameterised so it generalises. DGI will surface the rest as follow-up questions.

Step 2 — How DGI selects and assembles workflows

Under the hood, DGI does not invent capabilities. It works strictly within the workflows that are actually installed and discoverable in your engine host — the same catalog you can browse via the MCP integration or the workflow types registry.

The assembly process, in order:

  1. Discover the catalog. The virtual engine reads get_workflows() / entry points on the installed base-library and business-library packages. There is no hand-maintained list of "known" workflows — the catalog is whatever is importable at compile time.
  2. Map intent to capabilities. DGI matches each part of your goal to a registered workflow type. "Put it behind a CDN" resolves to a CloudFront-family workflow if one is installed; if not, DGI tells you rather than fabricating one.
  3. Order into layers. Steps that can run concurrently share a layer; steps that depend on a prior step's output land in a later layer. This is the DAG.
  4. Wire inputs explicitly. Every step argument declares its source — one of three kinds:
    SourceMeaningExample
    inputA value supplied when the workflow runsbucket name parameter
    stepA field from a prior step's outputthe bucket created upstream
    staticA hardcoded literal baked into the planindex.html as the object key

    There is no implicit global scope and no runtime string templating — every wire is explicit, which is what makes the plan auditable.
DGI can only assemble what is installed. If a capability your goal needs is missing from the catalog, the plan will fail validation in the references phase (see below) rather than silently degrade. Check the workflow types registry or reference.orkestia.dev for the live catalog, and see getting started for installing libraries.

Step 3 — Review and refine the plan

Before anything runs, the VirtualWorkflow passes through three-phase validation. Each phase short-circuits with a typed error, so feedback is precise — both for you and for the DGI refinement loop.

PhaseChecksTypical failure
StructureDAG is acyclic, step IDs unique, layers well-formedA step depends on a later layer (cycle)
ReferencesEvery {provider}.{service}.{operation} exists in the live catalogHallucinated or misspelled workflow type
CompatibilityEvery input mapping resolves to a source field of a compatible typeA step mapping points at an output field that was renamed

A reference-phase error looks like this — note it is structured data, not a stack trace, so DGI can loop it straight back into reasoning:

{
  "phase": "references",
  "step_id": "s2",
  "workflow_type": "aws.s3.put_bucket_taging",
  "reason": "unknown workflow type; did you mean 'aws.s3.put_bucket_tagging'?"
}

When you review a plan, check three things:

  • Coverage — does every part of your goal map to a step? Missing steps mean DGI didn't find a capability or misread intent.
  • Wiring — are the step mappings pointing at the right upstream outputs? This is where subtle bugs hide.
  • Parameterisation — are the values you want reusable expressed as input, not baked in as static?

Refine by replying in natural language ("the index file should be a parameter too, not hardcoded"). DGI re-emits the plan; the validator re-runs. Iterate until the plan is clean.

Compilation is deterministic: the same VirtualWorkflow against the same installed catalog always produces byte-identical JSON. That means you can diff successive plans during refinement and see exactly what your feedback changed.

Worked example: dialog → plan → compiled composition

The dialog

You:  Create a static-site bucket in our AWS sandbox, tag it for cost tracking,
      and make the bucket name a parameter.

DGI:  I'll assemble two layers:
        1. aws.s3.create_bucket      — takes the bucket name from workflow input
        2. aws.s3.put_bucket_tagging — tags the bucket created in step 1
      The bucket name is parameterised as `bucket_name`. The tag set is a
      literal for now. Want it parameterised too?

You:  That's good for a first version.

The plan DGI emits (VirtualWorkflow)

This is the typed intermediate representation — authored as data, not strings, so shape errors are caught before the catalog validator even runs.

{
  "name": "vw_static_site",
  "layers": [
    {
      "name": "create",
      "steps": [
        {
          "name": "s1",
          "workflow_type": "aws.s3.create_bucket",
          "input_mapping": {
            "name": { "source": "input", "field_name": "bucket_name" }
          }
        }
      ]
    },
    {
      "name": "write",
      "steps": [
        {
          "name": "s2",
          "workflow_type": "aws.s3.put_bucket_tagging",
          "input_mapping": {
            "bucket":  { "source": "step", "step": "s1", "field_name": "bucket_name" },
            "tagging": { "source": "static", "value": { "TagSet": [{ "Key": "env", "Value": "demo" }] } }
          }
        }
      ]
    }
  ]
}
Workflow types and field names above are illustrative. The real names depend on the libraries installed in your engine host. Browse the live catalog at reference.orkestia.dev or via the workflow types registry — never assume a type exists.

The compiled composition (handed to the engine)

The virtual engine compiles the plan into a plain dict in the engine's DAGWorkflow shape. The engine has no idea this came from AI — there is no runtime marker, no AI in the execution path.

{
  "id": "vw_static_site",
  "layers": [
    { "steps": [ { "id": "s1", "workflow": "aws.s3.create_bucket",
                   "inputs": { "name": {"from": "input.bucket_name"} } } ] },
    { "steps": [ { "id": "s2", "workflow": "aws.s3.put_bucket_tagging",
                   "inputs": {
                     "bucket":  {"from": "step.s1.bucket_name"},
                     "tagging": {"value": { "TagSet": [{ "Key": "env", "Value": "demo" }] }}
                   } } ] }
  ]
}

From here it dispatches like any DAG workflow — running in your cloud account via a runner, with state and telemetry flowing back to Orkestia. Watch it through the MCP (watch_workflow) or in Lumen.

Step 4 — Promote a good plan into a reusable virtual workflow

A plan that works is an asset. Rather than re-deriving it through dialog each time, promote it: the compiled composition becomes a named, parameterised virtual workflow that anyone in your org can start directly — no AI round-trip, no per-run reasoning cost.

What promotion buys you:

Determinism

The promoted composition is fixed JSON. Same inputs, same graph, every run — fully reproducible and diffable in version control.

No reasoning cost

Direct dispatch skips the LLM entirely. Faster, cheaper, and not subject to model variance on the hot path.

Parameterised reuse

Everything you exposed as input becomes a runtime parameter. One composition, many sites.

Governable

A named workflow can be reviewed, approved, and run under Staff governance like any other capability.

The promotion path, conceptually:

  1. Confirm the plan is clean — passes all three validation phases and produces the composition you want.
  2. Name and parameterise it — decide which values stay input (the reusable knobs) and which are static (fixed for this composition).
  3. Register the composition as a virtual workflow so it appears in your catalog. See the virtual workflows guide for the authoring details.
  4. Run it directly going forward — via the engine API, the MCP integration (start_workflow), or wherever you orchestrate runs.

This is the core of the hybrid execution model: use AI to discover and design a flow once, then run a deterministic composition forever. DGI for the unknown; compiled compositions for the known.

A good rule of thumb: if you've asked DGI for roughly the same thing twice, promote it. The third invocation should be a parameterised run of a virtual workflow, not a fresh dialog.

Notes and current limitations

DGI sits on top of the virtual engine and the agent/Staff substrate, both of which continue to evolve. APIs, the VirtualWorkflow model shape, and the promotion ergonomics may change; treat the wire JSON (DAGWorkflow) as the more stable contract, with the Python builder API more likely to shift.

Known limitations to design around:

  • Catalog is snapshot-at-compile. DGI assembles against whatever workflow libraries are installed in the calling process at compile time. A workflow type added after a plan is compiled won't appear in that plan; one removed after compile will still be in the JSON and will fail at engine dispatch. Mitigation: keep author-side and runtime library versions pinned and aligned.
  • DGI only assembles what exists. It cannot invent capabilities. If your goal needs something not in the catalog, you'll get a references-phase error, not a partial result. Author the missing workflow first (see getting started).
  • Out-of-process catalog divergence. If the producer and the compiler run in different environments with different installed libraries, validation can pass against one catalog and fail against the other. Mitigation: compile in the same process that will dispatch, or treat the compiler as a gate service.
  • Model variance on the design path. AI reasoning can phrase a plan more than one way; refinement and the three-phase validator are your guardrails. The execution path stays deterministic regardless — variance lives only in design, never in run.
  • Naming is still settling. The DGI / Agents / Staff surfaces are converging; some workflow type names (dgi.*) and product boundaries may be renamed before GA.

Where to go next

Virtual workflows

Author, parameterise, and register the compositions DGI plans compile into.

Hybrid execution model

The deeper rationale for AI-design / deterministic-run separation.

MCP integration

Discover, start, and watch workflows from agents and tools.

Workflow types registry

Browse the live catalog of capabilities DGI can assemble.

Staff governance

Approvals and oversight for fleets of AI agents that build with DGI.

Observability with Lumen

Watch compiled compositions run and trace failures.

For per-workflow detail — exact types, inputs, and output fields — see the external catalog at reference.orkestia.dev.