Define Workers
A researcher with web access. An analyst for synthesis. A writer for polish. Each agent is a configuration: model, prompt, skills, permissions. You build the team.
A language model with tool access is a general-purpose computer. VVM lets you program it.
Simple tasks are fine as chat. Complex tasks need structure.
No regex. No keyword lists. The model reads the ticket and understands what it means.
# Route tickets by semantic understanding
ticket = {
id: "TKT-4821",
message: "I was charged twice for my subscription last month",
customer_tier: "premium"
}
match ticket:
case ?`billing, payment, or refund issue`:
team = "billing"
priority = "high"
case ?`account access or login problem`:
team = "security"
priority = "urgent"
case ?`bug report or technical error`:
team = "engineering"
priority = "medium"
case _:
team = "general-support"
priority = "medium"
export { ticket_id: ticket.id, assigned_team: team, priority: priority }Reviewer critiques. Coder improves. Repeat until it passes or you hit the limit.
# Iterative improvement with evaluator-optimizer
agent coder(model="sonnet", prompt="Write clean, well-tested code.")
agent reviewer(model="opus", prompt="Review code critically. Find bugs and issues.")
def passes_review(code, iteration):
review = @reviewer `Review this code. List any bugs or improvements needed.
If production-ready with no issues, respond with "APPROVED".`(code)
return ?`contains APPROVED with no significant issues listed`(review)
def apply_feedback(code, iteration):
review = @reviewer `Review this code critically. Focus on bugs,
edge cases, input validation, and clarity.`(code)
improved = @coder `Improve this code based on the review.
Code: {code}
Review: {review}`(pack(code, review))
return improved
final_code = refine(initial_code, max=5, done=passes_review, step=apply_feedback)
export final_codeFive translations at once. pmap fans out, waits for all, returns in order. No async/await.
# Translate a product launch to 5 languages simultaneously
agent translator(model="sonnet", prompt="Translate accurately, preserving tone.")
product_copy = "Introducing CloudSync Pro: real-time sync, end-to-end encryption, offline mode."
languages = ["Spanish", "French", "German", "Japanese", "Portuguese"]
def translate_to(language):
return @translator `Translate to {language}: {product_copy}`(pack(language, product_copy))
# pmap runs ALL translations concurrently - 5x faster than sequential
translations = pmap(languages, translate_to)
export translationsA researcher with web access. An analyst for synthesis. A writer for polish. Each agent is a configuration: model, prompt, skills, permissions. You build the team.
This depends on that. These run in parallel. Retry on failure. The workflow in your head, made explicit and unambiguous.
"At least five citations." "No hallucinations." "Executive reading level." Quality gates the runtime evaluates by comprehension, not by counting.
Hand your .vvm file to Claude Code. It parses, spawns subagents, manages context, enforces constraints. What comes out are artifacts you can use.