LUA WORKFLOW
Agents, tasks, dependency graphs, tools, human checkpoints.
01 / RUNTIME CONTRACT
Lua defines the work. Rust enforces the runtime boundary. Your providers, tools, and storage stay explicit.
02 / ARCHITECTURE
The workflow stays readable while the production obligations live in the runtime.
Agents, tasks, dependency graphs, tools, human checkpoints.
Scheduling, policy, validation, providers, run journals, HTTP and SSE.
Model providers, internal tools, PostgreSQL, and deployment controls.
03 / ORCHESTRATION
Parallel phases, delegated subcrews, roundtables, dialogs, and synthesis remain explicit in Lua.
local crew = Crew.new({
goal = "Assess release risk",
provider = "openai",
model = "gpt-5.6-luna",
require_approval = { "file_write" },
})
crew:add_agent(Agent.new({
name = "researcher",
goal = "Collect release evidence",
tools = { "ask_human" },
}))
crew:add_agent(Agent.new({
name = "reviewer",
goal = "Challenge evidence and decide",
tools = { "file_write" },
}))
crew:add_task({ name = "collect", description = "List the riskiest changes in this release." })
crew:add_task({
name = "decide",
agent = "reviewer",
depends_on = { "collect" },
description = "Write a go/no-go plan for: ${results.collect.output}",
})
crew:run()Run independent specialists together, then synthesize.
Let one agent delegate bounded work to specialists.
Rotate through expert views with an explicit moderator.
Pause for context or authorization before consequences.
ALSO IN THE RUNTIME
VISION / STREAMING / MODEL ROUTING / CROSS-RUN PERSISTENCEBrowse 40+ validated example flows04 / MEASURED
A reproducible 12-case evaluation pits one structured call against DAG and collaborative crews — same model, same schema, hashed corpus, pre-declared thresholds.
Grounded correctness 0.7833 vs 0.6500 for a single structured call — +13.3 points across 12 cases, 5 repetitions, 180/180 completed runs.
The qualifying DAG spends 3.2x the tokens and 4.6x the latency. Both ceilings were pre-declared, not fitted afterward.
The collaborative topology missed its confidence bar. The report says so instead of hiding it.
06 / DURABLE RUN REPLAY
The journal is shared. Active Lua execution stays with its owner. Resumption is not runtime failover.
Shared state, not a transferred runtime. Owner stays the same. Resumption continues the run; it is not failover.
02 / HOW IT WORKS
PostgreSQL coordinates ownership, idempotency, replay, and encrypted human answers.
CAVEAT: Active Lua execution stays on its owner.
07 / TOOLS + MCP
Use the narrowest tool surface that satisfies the crew. Everything consequential stays intentional.
Nine default tools cover files, HTTP, web scraping, hashing, templates, schema validation, and human input.
Inspect the contractShell execution exists, but remains disabled until an operator deliberately enables it.
Inspect the contractDefine custom Lua and server-side tools, connect strict discovery-first MCP servers, or delegate to sub-flows bounded by recursion caps and path validation.
Inspect the contractMCP 2026-07-28
DISCOVERY FIRST / NO LEGACY FALLBACKRead MCP policy08 / PROVIDERS
Provider selection is configuration, not an application rewrite. Purpose-based routing can send each task to a different model. Structured output uses a declared JSON Schema response format, and reasoning streams persist to run records where providers expose them.
09 / OPERATING SURFACES
Run attended crews, inspect traces, and answer agent questions from a real terminal.
ironcrew run crew.luaStart runs over HTTP, stream lifecycle events, and resume pending human questions.
REST + SSECoordinate ownership, idempotency, replay, and cross-replica HITL delivery.
PostgreSQL 15+Discover and call modern tools on the latest supported protocol—without legacy fallback.
2026-07-2810 / DEPLOY
Run non-root, bound resource limits, coordinate graceful shutdown, and choose the persistence contract the deployment needs.
GO FROM CONTRACT TO DEPLOYMENT