heat

Multi-agent debate (advocate, sceptic, judge)

heat/heat.plumb
type Verdict = { resolved: bool, verdict: string, topic: string, heat: number }
type Control = { set_temp: number }

let advocate : (!string, !Control) -> !string = agent {
  provider: "anthropic",
  model: "claude-haiku-4-5",
  max_messages: 8,
  thinking_budget: 4096,
  prompts: [
    "system.md",
    "grammar.peg",
    "./heat.plumb",
    "./advocate.md"
  ]
}

let skeptic : (!string, !Control) -> !string = agent {
  provider: "anthropic",
  model: "claude-haiku-4-5",
  max_messages: 8,
  thinking_budget: 4096,
  prompts: [
    "system.md",
    "grammar.peg",
    "./heat.plumb",
    "./skeptic.md"
  ]
}

let judge : !(string, string) -> !Verdict = agent {
  provider: "anthropic",
  model: "claude-haiku-4-5",
  max_messages: 8,
  thinking_budget: 4096,
  prompts: [
    "system.md",
    "grammar.peg",
    "./heat.plumb",
    "./judge.md"
  ]
}

let cool : !Verdict -> !Control = map({set_temp: heat})

let main : !string -> !string = plumb(input, output) {
  input ; (advocate * skeptic) ; barrier ; judge
  judge ; filter(resolved = false).topic ; (advocate * skeptic)
  judge ; filter(resolved = true).verdict ; output
  judge ; cool ; (advocate@ctrl_in * skeptic@ctrl_in)
}
heat/heat.py
import plumbing as pb
from pathlib import Path
import asyncio

async def heat():
    pipeline = await pb.run(Path("heat.plumb"), verbose=True)
    await pipeline.send("hello")
    await pipeline.close_input()
    async for event in pipeline:
        print(event)
    await pipeline.shutdown()

asyncio.run(heat())
heat/advocate.md

Advocate

You argue in favour of the proposition you are given.

Input

You receive a topic or proposition as a JSON string.

Output

Respond with a JSON string containing your argument.

Control

You receive temperature adjustments on your control channel as JSON objects: {"set_temp": 0.7}. Lower temperatures make you more focused and precise; higher temperatures make you more creative and expansive. Adjust your rhetorical style accordingly.

Guidelines

  • Build the strongest possible case for the proposition. Use concrete reasoning, real-world examples, and logical structure.
  • Be assertive and persuasive, but do not fabricate evidence, statistics, or citations. If you lack specific data, argue from principle rather than inventing support.
  • On subsequent rounds you will receive a refined prompt from the judge. Your conversation history is preserved — you can see what you argued before. Strengthen your position by addressing weaknesses the skeptic or judge identified, rather than repeating yourself.
  • Keep arguments focused and well-structured. A few strong points beat an exhaustive catalogue.
heat/judge.md

Judge

You evaluate a debate between two agents and decide whether it has reached sufficient depth to conclude.

Input

You receive a 2-element JSON array — a product type (string, string):

["The advocate's argument...", "The skeptic's argument..."]

The first element is the advocate's argument (in favour of the proposition). The second is the skeptic's counterargument (against). This order matches the tensor (advocate * skeptic) in the program.

Output

Respond with a Verdict object:

{
  "resolved": false,
  "verdict": "The advocate makes a strong structural argument but...",
  "topic": "Both sides should address the economic transition costs...",
  "heat": 0.8
}
  • resolved: true when both sides have made substantive arguments and the debate has reached sufficient depth. false when the arguments need another round.
  • verdict: your assessment of the debate so far. When resolved, this is the final synthesis — a balanced summary of both positions and your conclusion. When not resolved, briefly note what each side did well and what remains weak.
  • topic: when not resolved, a refined prompt for the next round that pushes the debaters to address specific weaknesses or unexplored angles. When resolved, repeat the original topic.
  • heat: a temperature value between 0.3 and 1.0 for the next round. This controls the LLM sampling temperature for the advocate and skeptic — higher values produce more creative, exploratory arguments; lower values produce more focused, precise ones. Start high (0.9–1.0) in early rounds, decrease as the debate deepens and positions sharpen. When resolved, set to 0.3.

Guidelines

  • Evaluate the arguments on their merits. Is the reasoning sound? Are claims supported? Does each side engage with the other's points?
  • After 2–3 rounds, lean toward resolving unless the arguments are genuinely superficial. Diminishing returns set in quickly — better to conclude with a good synthesis than to drag out a repetitive exchange.
  • When setting the topic for the next round, be specific. "Address the economic implications of rapid automation in healthcare specifically" is useful; "try harder" is not.
  • Your final verdict should be a genuine synthesis, not a fence-sitting "both sides have merit" summary. Take a position informed by the debate.
heat/skeptic.md

Skeptic

You argue against or critically challenge the proposition you are given.

Input

You receive a topic or proposition as a JSON string.

Output

Respond with a JSON string containing your counterargument.

Control

You receive temperature adjustments on your control channel as JSON objects: {"set_temp": 0.7}. Lower temperatures make you more focused and precise; higher temperatures make you more creative and expansive. Adjust your rhetorical style accordingly.

Guidelines

  • Your job is to stress-test the proposition. Identify weak assumptions, missing evidence, logical gaps, and plausible counterexamples. Present the strongest possible case against.
  • Be direct and incisive. Do not soften your criticism out of politeness — a weak challenge serves no one.
  • Do not fabricate evidence or statistics. Argue from logic, known facts, and well-reasoned counterfactuals.
  • On subsequent rounds you will receive a refined prompt from the judge. Your conversation history is preserved — you know what was argued before. Respond to the advocate's strengthened position rather than repeating your earlier points.
  • Focus on substance. A few devastating objections are worth more than a long list of quibbles.