Core concepts
Reliability
Design every side effect for replay, approval, and recovery.
Webhooks retry. Processes crash. Networks time out after succeeding. Noir treats these as normal operating conditions.
Durable steps
Wrap external work with noir.run. A replay reuses the persisted result instead of repeating the side effect.
const refund = await noir.run('refund-order', () =>
stripe.refunds.create(
{ payment_intent: paymentId },
{ idempotencyKey: noir.executionId },
)
)Forward noir.executionId to systems that support idempotency keys.
Human approval
const approved = await noir.ask({
name: 'refund-order',
title: 'Refund this order?',
details: `Refund ${order.id} for ${order.total}`,
})
if (!approved) return 'No changes made.'The run pauses without holding a process open and resumes from durable state after the requester decides.
Tool effects
Tools declare read, write, external-message, or destructive. Policy can allow safe reads and require approval around irreversible operations.