version: v1

# Group-chat workflow with a human-approval participant (0.12.0 § D — group-chat
# shape). A group chat runs N rounds of sequential turns (every participant per
# round, sharing the running transcript); a `kind=human` participant pauses on
# its turn: the run returns a `blocked` result and persists a continuation,
# resumable with the reviewer's response. On resume the conversation continues at
# the turns still to run. Non-human participants use canned functions so the
# example runs end-to-end without a provider; retarget them before any real use.

agent:
  name: group-chat-approval-root
  system_prompt: Root agent for the group-chat approval workflow.
  model:
    provider: openai
    name: gpt-4o-mini
  strategy:
    type: simple
  runtime_preferences:
    preferred_mode: bridge
    allowed_modes: [bridge]

workflow:
  type: group-chat
  name: group-chat-approval-workflow
  rounds: 1
  participants:
    - id: draft
      kind: function
      ref: draft_report
    - id: approve
      kind: human
      ref: approval-reviewer
    - id: publish
      kind: function
      ref: publish_report

components:
  functions:
    draft_report:
      implementation: examples.human_functions.draft_report
    publish_report:
      implementation: examples.human_functions.publish_report
  humans:
    approval-reviewer:
      description: Please approve or reject the drafted report.
      assignee: reviewer@example.com
      timeout_seconds: 86400
      on_timeout: escalate
