Agents logo

Agents

Explore prebuilt AI Agents

Plug-n-play, ready-to-use AI agents to automate ideas & content.

Visit Agents

Dialectic Chains & Agents | Wity AI

Dialectic (or Prompt) Chains in Wity AI act as the manifest for Wity AI Agents. They define how an agent thinks, observes, transforms, and produces outputs across multiple AI steps at runtime.

Published Oct 22, 2025
By
RO

Overview

Dialectic (or Prompt) Chains in Wity AI act as the manifest for Wity AI Agents. They define how an agent thinks, observes, transforms, and produces outputs across multiple AI steps at runtime.

Unlike simple linear prompts, Dialectic Chains allow storing multi-step AI computation graphs as context agnostic, executable systems, with :

  • Declarative structure (defined steps, inputs, and outputs) (WUCE Spec ↗).
  • Controlled indeterminism (model creativity at each step)
  • Dynamic data flow (outputs of one step shaping others)
  • Dynamic context flow from external processes that can be connected at runtime

This enables agents that can reason, create, reflect, and iterate — not just generate one-shot or simple reactive responses.


Core Concept

A Wity AI Agent is executed from a Dialectic Chain. The Dialectic Chain defines:

  • What the agent observes
  • How it reasons or acts
  • What it yields
  • How outputs feed into subsequent steps

Think of a Dialectic Chain as:

A declarative blueprint for multi-step AI cognition and execution.

Why Dialectic Chains (Not Just Prompts)

Traditional prompts are:

  • Single-shot
  • Linear
  • Stateless

Wity Dialectic Chains are:

  • Multi-step
  • State-aware
  • Branch-capable
  • Reusable and composable

They are suitable for:

  • Sequential reasoning (step-by-step thinking)
  • Parallel ideation (multiple branches from one input)
  • Hybrid workflows (reasoning + generation + reflection)
  • Repeatable creative or operational processes

Dialectic (or Prompt) Chain Structure

A Dialectic (or Prompt) Chain is defined as an array of steps.

Each step represents one AI computation unit.

Step Schema

{
  "stepName": "unique-step-name",
  "observe": "input-key",
  "actionType": "contemplate",
  "actionString": "Instruction for the AI",
  "yield": ["output-key-1", "output-key-2"]
}

Key Fields Explained

stepName

A unique identifier for the step.

  • Used for debugging, tracing, and orchestration
  • Should be stable and descriptive

observe

Defines what input this step consumes.

This can be:

  • starting-thought (raw user input)
  • Output from a previous step
  • Any runtime-injected context

This is how data flows through the chain.


actionType

Describes the mode of reasoning or execution.

Common values:

  • contemplate — reasoning, synthesis, ideation, reflection

(Additional action types may be introduced by the runtime.)


actionString

The instruction payload sent to the model.

Best practices:

  • Be explicit about format and constraints
  • Specify tone, length, or structure when needed
  • Use placeholders like {{-parentThought}} to reference observed input

This is where creative control lives.


yield

Declares what this step produces.

Key properties:

  • Outputs are named
  • Outputs become addressable inputs for later steps
  • Multiple outputs per step are allowed

Special yield values:

  • no-render — output used internally, not shown to users
  • morphTarget=image — output is routed to an image model

Observe → Yield Model

Dialectic Chains operate on an observe → act → yield loop.

  • Each step observes state
  • Performs AI computation
  • Yields new state

This allows:

  • Partial determinism (structure is fixed)
  • Creative variance (model outputs differ per run)

Sequential vs Networked Execution

Although chains are written sequentially, execution is not limited to linear thinking.

Because:

  • Multiple steps can observe the same output
  • One step can yield multiple artifacts
  • Downstream steps may diverge or reconverge

Dialectic Chains can represent:

  • Trees
  • DAGs
  • Feedback loops

This makes them suitable for complex ideation and production workflows.


Agents as Runtime Containers

A Wity AI Agent:

  • Loads a Dialectic Chain
  • Injects runtime inputs (user input, identity, context)
  • Executes steps according to dependency graph
  • Collects yields as structured outputs

Agents are reusable across contexts with different inputs.


Example Use Cases

Dialectic Chains can encode:

  • Podcast generation pipelines
  • Character-driven visual narratives
  • Research → synthesis → publishing flows
  • SEO ideation → writing → formatting
  • Educational content creation
  • Reflection and journaling agents

If it can be broken into cognitive steps, it can be modeled.


Designing Good Dialectic Chains

1. Separate Thinking from Rendering

Use internal steps (no-render) to:

  • Analyze
  • Extract themes
  • Decide tone or structure

Then render content later.


2. Name Yields Carefully

Yield names are part of your API.

Good names:

  • story-theme
  • scene-2-visual
  • podcast-clip-4

Bad names:

  • output1
  • text

3. Keep Steps Focused

Each step should do one cognitive job.

Avoid:

  • Mixing analysis and final output
  • Overloading one step with multiple responsibilities

4. Be Explicit About Output Format

If you want:

  • One paragraph → say it
  • No title → say it
  • Exact sentence endings → specify them

Precision increases reliability.


Determinism vs Indeterminism

Wity Dialectic Chains balance:

  • Determinism: structure, step order, data flow
  • Indeterminism: creative generation at each step

This balance allows agents to:

  • Stay on task
  • Still feel alive and non-repetitive

Mental Model

You can think of Dialectic Chains as:

  • AI assembly instructions
  • Cognitive pipelines
  • Declarative agent blueprints

They are not scripts.
They are thinking systems.


Summary

Dialectic Chains power up executable AI Agents in Wity,
You can use them to -

  • Encode multi-step reasoning
  • Build reusable AI workflows
  • Combine structure with creativity
  • Scale ideation and content reliably