Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sirenspec.dev/llms.txt

Use this file to discover all available pages before exploring further.

A chain of five agents where each reads only the previous agent’s output, never the original prompt. Compare the final output to the starting message to measure how much (or how little) meaning drifted across five hops.

What it demonstrates

  • Long sequential chains and accumulated working.* context
  • Why careful writes: path design matters — each hop is traceable
  • How meaning degrades (or holds) under repeated paraphrase
  • Reusing the same agent definition across multiple nodes

Run it

sirenspec run docs/cookbook/telephone-game/workflow.yaml
# Try your own starting message:
sirenspec run docs/cookbook/telephone-game/workflow.yaml \
  --input "A short, fact-dense sentence of your choice."
Compare working.hop_1 through working.hop_4 against output.final in the trace to see drift at each step.

Workflow

docs/cookbook/telephone-game/workflow.yaml
version: "0.1"

agents:
  relay:
    model: "openai:gpt-4o-mini"
    system: |
      You will receive a message. Restate it in your own words — change the
      phrasing, sentence structure, and vocabulary completely, but preserve
      the core meaning. Do not add, remove, or invent any facts. Reply with
      only the restated message, nothing else.

nodes:
  hop_1:
    agent: relay
    writes: working.hop_1
  hop_2:
    agent: relay
    writes: working.hop_2
  hop_3:
    agent: relay
    writes: working.hop_3
  hop_4:
    agent: relay
    writes: working.hop_4
  hop_5:
    agent: relay
    writes: output.final

edges:
  - from: hop_1
    to: hop_2
  - from: hop_2
    to: hop_3
  - from: hop_3
    to: hop_4
  - from: hop_4
    to: hop_5

guardrails:
  - injection
  - length

Graph

Next steps

Compression Gauntlet

A chain that halves the text each step — how much can survive?

Sequential Pipeline

The two-node version of this pattern.