Agentic AI

Inside the Machine — Part 2: How the Dataworkz DSL Implements Neuro-Symbolic AI

Every construct in the Dataworkz DSL maps onto a classical symbolic AI idea, and the runtime turns that small language into a production neuro-symbolic system.

Key takeaways

  • Every construct in the Dataworkz DSL maps onto a classical symbolic AI concept, from assign as a working-memory update to if as a production rule.
  • The workflow generator performs neural-to-symbolic compilation, turning ambiguous plain-language intent into a formal, executable program.
  • When the generator cannot resolve a detail it inserts a placeholder that validation catches as a compile-time error before the workflow runs.
  • The waitForUserInput statement makes human approval first-class, so every decision is typed, timestamped, attributable, and part of the execution trace.
  • The runtime is organized into three layers, and a uniform tool adapter lets any tool, sub-agent, or MCP service compose without changing the orchestration.
On this pagesections

    We didn’t set out to build a neuro-symbolic AI system. We set out to solve a stubborn engineering problem—orchestrating multi-step AI workflows with execution we could trust and audit. But when you look at the resulting language through the lens of classical symbolic AI, something striking appears: every single construct already maps onto a concept the field has known for decades. That alignment isn’t a coincidence. It’s evidence that the requirements for reliable orchestration and the requirements for symbolic reasoning are, at bottom, the same requirements.

    This is the second half of a two-part series. Part 1 argued why enterprise agents need a symbolic backbone and what neuro-symbolic AI means in practice. Here we get concrete: the language constructs, the generator that writes them, the human-in-the-loop primitive, and the runtime that ties it all together.

    Each construct is a classical idea in disguise

    The DW DSL has a small, fixed set of statements. Read them as a workflow author and they look ordinary. Read them as someone who’s studied production rule systems and planners, and each one snaps into a familiar slot.

    DSL construct Symbolic concept What it’s really doing
    assign Working memory update Modifies the program’s shared state, exactly as a rule’s action side updates working memory in CLIPS or Drools.
    if Production rule A condition–action pair: when the condition (LHS) holds, run the action (RHS / thenBody).
    for Inference iteration Applies a computation exhaustively across a collection: the match-fire cycle over a fact set.
    call Knowledge acquisition Reaches outside current knowledge to acquire new facts from an API, an LLM, a database, or a sub-agent.
    waitForUserInput Oracle consultation Suspends inference to consult a human expert for a certified decision the machine can’t derive.
    return Goal achievement Declares the inference has reached a terminal state with a known answer.
    out variable Goal variable The distinguished value that constitutes the program’s answer: the goal node of the graph.
    arguments Initial fact set The facts supplied at invocation from which inference begins.
    validation Consistency check Pre-execution proof that the program is well-formed and every reference resolves.
    log Inference trace Records intermediate states for post-hoc analysis: a proof trace, in effect.

    Take the most common pairing. An if statement is a production rule: its condition is the left-hand side, evaluated against the current variables (the working memory); its thenBody is the right-hand side, fired when the pattern holds. The difference from a classic rule engine is that the DSL runs imperatively and in order, so there’s no conflict-resolution machinery to reason about—which makes it dramatically easier to debug.

    // a production rule: premium customers get 15% off
    {
      "if:_": {
        "condition": "customer['tier'] == 'premium'",   // LHS
        "thenBody": [
          { "assign:discount": "order['total'] * 0.15" }  // RHS
        ],
        "elseBody": [
          { "assign:discount": "0" }
        ]
      }
    }

    And call is knowledge acquisition in the textbook sense: it leaves the program’s current world, consults an external source, and folds the new fact back into working memory. Its returnType field even lets you decide how to handle epistemic uncertainty—whether a failed lookup should halt everything, fall back to null, or return a structured success/failure record you can branch on.

    From plain English to a formal program

    You rarely write these programs by hand. Instead you describe what you want—”when an invoice arrives, extract its line items, check each against the vendor’s approved list, flag anomalies, and email a summary to finance”—and the workflow generator produces the DSL for you, using the tools available in your workspace.

    Look at what’s actually happening there. The input is neural: unstructured, ambiguous, intent-bearing language. The output is symbolic: a structured, formally specified, executable program. That is neural-to-symbolic compilation. The model does the semantic work—understanding intent, choosing tools, sequencing steps, anticipating edge cases—and the artifact it emits is something a deterministic runtime can analyze and execute.

    The model’s flexibility designs the plan. The runtime’s determinism carries it out. Neither is asked to do the other’s job.

    NEURAL INPUT Plain-language intent LLM · GENERATOR Compiles intent to a program gaps → ‘__DW_?’ VALIDATE Static checks refs · params · syntax SYMBOLIC RUNTIME Deterministic execution flexible & fuzzy predictable & provable
    Figure 2. The generator compiles fuzzy intent into a formal program; validation gates it; the runtime executes it deterministically.

    When the generator can’t resolve something from your instructions, it doesn’t guess. It drops a '__DW_?' placeholder and a comment explaining what’s missing. That placeholder is effectively a compile-time error: validation flags it before the workflow ever runs, forcing you to fill the gap at design time rather than discovering it mid-execution when a payment step has already fired. A model that signals “I don’t know” beats a model that confidently invents an answer—and the architecture makes that honesty structural.

    The human oracle isn’t a UI afterthought

    Plenty of platforms bolt human approval on as a notification or a dialog box. The problem is that the link between the human’s decision and the workflow stays informal—you end up reconstructing the flow by hand afterward, with no durable record of who approved what, or why.

    In the DSL, waitForUserInput is a statement in the execution language itself. It pauses the program, surfaces a structured decision request, and resumes only once a person responds. Crucially, the response comes back as a typed value in the program’s memory—a selected option, possibly with edited parameters—so it flows into subsequent logic as cleanly as the result of any tool call.

    {
      "waitForUserInput:checks": {
        "requests": [{
          "name": "'paymentApproval'",
          "type": "APPROVAL_REQUIRED",
          "question": "`Approve payment of $${amount} to ${vendor}?`",
          "contextData": { "amount":"amount", "vendor":"vendor", "budgetCode":"budgetCode" }
        }]
      }
    },
    {
      "if:_": {
        "condition": "checks['paymentApproval']['selectedOption'] == 'approve'",
        "thenBody": [ { "call:_": { "toolId": "disburse-payment" } } ]  // only on approval
      }
    }

    Why context is a governance decision. The contextData you attach isn’t metadata—it’s the matching surface that automated approval rules read. Design it like an API: include stable, business-meaningful facts (vendor, amount, budget code) and skip volatile ones (timestamps, session IDs). A rule can only be as specific as the context allows.

    That design pays off twice. Because the gate lives in the program, every approval is timestamped, attributable, and part of the execution trace—the documentary evidence regulated industries require. And because the request carries structured context, users can author auto-resolution rules (“auto-approve payments under $500 to approved vendors on the OPEX budget”) that quietly resolve future requests without a human in the loop. Over time, human judgment hardens into institutional rules without ever losing the audit trail on any single decision.

    How the runtime ties it together

    Step back and the platform resolves into three layers with clean interfaces between them. At the bottom, the neural layer—LLM tools, embedding retrievers, document stores—turns the unstructured world into symbolic outputs the program can hold: maps, strings, numbers. In the middle, the symbolic execution layer runs programs deterministically, manages the variable namespace, evaluates expressions, branches, loops, and enforces validation. At the top, the human layer surfaces decisions through waitForUserInput and folds the answers back in as first-class values.

    HUMAN LAYER Approval & input Auto-resolution rules Clarification Probe / audit view SYMBOLIC EXECUTION LAYER DSL Executor sequence · state · dispatch JEXL Engine sandboxed expressions Validator structural checks, pre-run Workflow Generator neural → symbolic compile HITL Manager suspend · collect · resume Tool Adapter Layer REST · gRPC · in-process · A2A NEURAL LAYER & TOOLS LLM toolsunderstand · generate Embedding retrievaldense + sparse search Document storesextract structure Data APIs / KGfacts & relationships
    Figure 3. Three layers, clean interfaces: humans decide, the symbolic runtime controls, neural tools perceive and generate.

    A single execution moves through a clear lifecycle. The runtime receives the program and its arguments, then validates—if anything is structurally wrong, it refuses to run rather than failing halfway. It initializes the namespace with the incoming arguments and sets out to null. Then it executes statement by statement, evaluating expressions and dispatching tool calls. If it hits a waitForUserInput, it suspends, hands the request to the HITL manager, and resumes when the human responds. When the last statement finishes—or a return fires—the value of out is the result.

    The tool adapter layer is what makes this composable. From the executor’s point of view, every tool is identical: it takes named parameters and returns a value or fails. Whether that tool is an LLM, a REST endpoint, another DSL program, or an external MCP agent is invisible to the orchestration logic. So a workflow built today against a local tool stays forward-compatible—swap in an MCP-exposed service later and the orchestration doesn’t change a line. The same property turns multi-agent systems into ordinary composition: a supervisor program simply calls specialist sub-agents as tools, and the whole hierarchy stays traceable and validated at every level.

    Why this earns its place in the enterprise

    Everything above converges on properties that pure LLM orchestration can’t offer. Because programs are static, human-readable artifacts, they’re auditable at the source—an auditor reads exactly what happens, with no hidden reasoning that drifts day to day. Because all data access flows through named tools, security and access control have a natural enforcement point the program can’t bypass. Because behavior is reproducible—same inputs and same tool responses yield the same output, every time—you can certify it, not merely test it. And because business rules live in explicit conditions rather than model interpretations, policy becomes code you can verify.

    The model is brilliant but unaccountable. The runtime is rigid but trustworthy. Put the model to work writing programs the runtime executes, and you stop having to choose.

    That’s the whole thesis of this series, now visible end to end. Neuro-symbolic AI isn’t a research curiosity to file away for later—it’s the practical architecture that lets you put genuinely capable models into processes that demand guarantees. The Dataworkz DSL is a small language precisely so it can carry a large responsibility: being the part of the system you’re allowed to trust.

    Start from the beginning: ← Part 1 — Why Enterprise AI Needs a Symbolic Backbone

    Frequently asked questions

    How does the Dataworkz DSL relate to classical symbolic AI?

    Each DSL construct corresponds to a long-established symbolic concept: assign is a working-memory update, if is a production rule, for is inference iteration, call is knowledge acquisition, waitForUserInput is oracle consultation, and return marks goal achievement.

    What is neural-to-symbolic compilation?

    It is the workflow generator taking unstructured, intent-bearing language and producing a structured, formally specified, executable program. The model does the semantic work of understanding intent and choosing tools, and the runtime analyzes and executes the artifact it emits.

    How does human-in-the-loop approval work in the DSL?

    The waitForUserInput statement pauses the program, surfaces a structured decision request, and resumes when a person responds. The response returns as a typed value in the program's memory, and the structured contextData lets teams write auto-resolution rules for future requests.

    Why is this architecture suitable for regulated enterprises?

    Programs are static and human-readable so they are auditable, all data access flows through named tools so access control has an enforcement point, and behavior is reproducible so it can be certified rather than only tested.

    See what your engineers can ship in production

    Dataworkz is the agentic AI platform enterprises trust to put AI agents into production. Teams build production-ready agents in days, every decision stays traceable, and every agent has ROI attached.

    Explore the platform