Before adding AI to your SaaS, write the failure contract.Most AI feature briefs describe what should happen when the model works.Production problems begin when it doesn’t.Before adding AI to an existing SaaS product, I think the team should define: 1. LatencyHow long can the user wait before the product falls back, continues asynchronously, or offers another path?2. UncertaintyWhat happens when the output is incomplete or confidence is too low? Does the product ask for clarification, request human review, or refuse the action?3. PermissionsWhich records can the model access for this user, role, and organization? AI should inherit the product’s access rules rather than bypass them.4. Action boundariesCan the AI recommend, draft, or execute? Sending an email, changing a payment state, and updating a customer record should not share the same approval rules.5. CostWhat is the usage limit per user or tenant? Which model or workflow becomes the fallback when a request is too expensive?6. RecoveryCan the team see which model, prompt, data, and tool call produced the result? Can a failed workflow be retried without duplicating the action?Connecting an API is usually the easy part. The real product work is deciding how the feature behaves when reality does not match the demo.If you are building AI into a product, which part is hardest to define: latency, permissions, human approval, cost, or recovery?