Declarative pipelines
Agents, tools, policies, and schemas are language constructs. Pipelines chain them with operators for piping, gates, branches, fan-out, loops, and human approval.
Declare agents, tools, policies, and pipelines in a .halo file. The Bun runtime runs them with policies enforced, results traced, and humans in the loop.
policy Safe : Block(PromptInjection) & Redact(Email)
policy Budget : MaxSpend(0.50)
schema Assessment {
fraudRisk: Number,
summary: String,
}
agent Assessor [anthropic/claude-haiku-4-5, temp: 0.2]
system "You assess insurance claims. Reply with JSON only."
requires Safe, Budget
pipeline ProcessClaim(claim: String) -> Assessment:
claim
|> Assessor.assess("""
Assess this claim. Reply as {"fraudRisk": <0-1>, "summary": "<one sentence>"}.
Claim: {{claim}}
""") as assessmenthalo run claim.halo --arg claim="Rear-ended at a stop light, bumper damage"
halo test claim.halo --arg claim="..." # offline: every call mockedThe run fails with a SchemaValidationError if the answer isn't JSON matching Assessment. It fails with a PolicyViolation if the input contains an injection attempt or the run has already spent $0.50.
runtime.signal().