Documentation Index
Fetch the complete documentation index at: https://superwire.dev/llms.txt
Use this file to discover all available pages before exploring further.
Agent loops
Use for ... in when each item in a collection should be processed with the same agent.
input {
tasks: [{ id: number, title: string }]
}
agent summarize_each for task in input.tasks {
model: model.fast
instruction: "Summarize task {{ task.title }}."
output {
task_id: number
summary: string
}
}
output {
summaries: agent.summarize_each
}
Destructuring loop bindings
Loop headers may destructure object-shaped items.
agent summarize_each for { id, title } in input.tasks {
model: model.fast
instruction: "Summarize task {{ id }}: {{ title }}."
output {
task_id: number
summary: string
}
}
Dynamic match
Use match when a dynamic value depends on a variant-like result. Branches must return the same type.
dynamic {
selected_message: match agent.event.kind {
user_created: agent.event.created_message
user_deleted: agent.event.deleted_message
_: agent.event.default_message
}
}
Use _ as the catch-all branch.