Build durable automations for your business.
Build with AI or your own agent. Get Python workflows you can inspect, extend, and run reliably—with your AI Builder integrations.
Human approval
AI does the busywork. You stay in control.
Follow an invoice from the inbox to the right approver. Read the underlying Python, then make the final call.
Example run: an invoice is received, checked by the agent, approved in Slack, and logged in Notion.
Extracts, checks, and routes
Extracted
- Vendor
- Northstar Studio
- Amount
- $2,400
- Due
- Oct 15
Checks
- Extract invoice details
- Check for duplicates
- Find the right approver
#finance
Invoice agent · to Morgan
Approve $2,400 to Northstar Studio? No duplicate found.
Records the decision next
ex06_invoices.pyView full sourcefrom reflex_workflow import Workflow, step, wait_for class Invoice(Base, Workflow): # Setup and database fields omitted. See full source. @step(retries=RETRIES, backoff=BACKOFF) async def extract(self): fields = await world.call( "ocr.extract", key=self.upload_id, upload=self.upload_id ) # A field the reader could not make out comes back as null, not absent. self.supplier = fields.get("supplier") or "unknown" self.number = fields.get("number") or self.upload_id self.amount_cents = int(fields.get("amount_cents") or 0) self.status = "extracted" return Invoice.check_duplicate @step(retries=RETRIES, backoff=BACKOFF) async def check_duplicate(self): already = await Invoice.by( Invoice.supplier == self.supplier, Invoice.number == self.number, Invoice.id != self.id, Invoice.bill_id.is_not(None), ).get() if already is not None: self.status = f"duplicate-of:{already.upload_id}" return None return Invoice.request_approval @step(retries=RETRIES, backoff=BACKOFF) async def request_approval(self): self.approver = ( "finance-director" if (self.amount_cents or 0) >= SECOND_SIGNATURE_CENTS else "team-lead" ) await world.call( "chat.post", key=f"approve-{self.upload_id}", to=self.approver, text=f"{self.supplier} {self.number}: {(self.amount_cents or 0) / 100:.2f}", ) self.status = "awaiting-approval" return wait_for( Invoice.decide, timeout=APPROVAL_DEADLINE, on_timeout=Invoice.escalate ) @step(retries=RETRIES, backoff=BACKOFF) async def decide(self, verdict: str, *, by: str): self.decided_by = by if verdict != "approve": self.status = "rejected" return None return Invoice.record_bill @step(retries=RETRIES, backoff=BACKOFF) async def record_bill(self): bill = await world.call( "ledger.record", key=self.reference, supplier=self.supplier, number=self.number, amount_cents=self.amount_cents, ) self.bill_id = bill["id"] self.status = "recorded" @step(retries=RETRIES, backoff=BACKOFF) async def escalate(self): await world.call( "chat.post", key=f"overdue-{self.upload_id}", to="finance-director", text=f"Invoice {self.number} from {self.supplier} has waited a week", ) self.status = "overdue"Connected from the start
The same integrations. More ways to automate.
We’re bringing AI Builder’s integration catalog to Workflows, so your automations can work across the tools, data, and models your business already uses.
Connect your CRM, prepare a document with AI, request approval, and send the result.
Explore AI Builder integrationsExtend with your own APIs and Python packages.
- HubSpotCustomer data
- NotionKnowledge
- ResendEmail delivery
- OpenAIAI steps
- StripePayments & billing
- DatabasesYour business data
Durable execution
Every step of your workflow, visible.
Your Python defines the work. The execution system tracks progress, waits for approvals, and retries failed steps. See what ran and what needs attention as your automations grow.
Keep people in the loop.
Pause for approval and continue with the decision.
Retry without starting over.
Keep completed work and retry the step that needs attention.
Know what happened.
Inspect the code and timing of each step.
Put your next workflow in motion.
Be first to run durable workflows on your own tools.
Workflows for your team
Start with the work you do every week.
From the first lead to the final approval, connect the steps that keep your business moving.
Sales
Get every lead to the right rep.
Qualify new inquiries, choose an owner, and update your CRM before the first follow-up.
Operations
Start Monday with the full picture.
Collect the week’s numbers, calculate totals, and send a report your team can act on.
Customer success
Turn a closed deal into a warm welcome.
Create the project and folders, assign the next steps, and send the client a welcome packet.
Support
Give each request the right next step.
Categorize incoming tickets, draft a reply, and bring in a person when the issue needs judgment.
Marketing
Move from a first draft to an approved post.
Prepare content, collect edits, and publish the version your team approved to each channel.
Finance
Keep invoices moving through approval.
Extract invoice details, check for duplicates, and route the request to the right approver.
Build your way
The ease of AI. The power of Python.
Start in Reflex AI Builder or work with your own coding agent. Either way, you get readable Python you can inspect and extend.
Describe the work. Shape the workflow.
Start in Reflex AI Builder. Explain the outcome, connect your tools, and refine the steps in conversation.
When a client signs, draft a kickoff brief from their contract. Get our project lead’s approval before sending the welcome email.
Added an AI draft, a human checkpoint, and a welcome email—all backed by Python.
@step()
async def request_review(self):
await services.request_review(self.brief)
return wait_for(Onboarding.approve_brief)
@step()
async def approve_brief(self, approved: bool):
if approved:
return Onboarding.send_welcome
return None
- Human approvalsWaits for people
- Automatic retriesFailed steps only
- Every run tracedEach step visible
A few things to know.
When can I try Reflex Workflows?
Join the waitlist and we’ll email you when early access is available.
Do I need to write Python?
You’ll be able to start with a prompt in AI Builder or work with your own coding agent. The workflow is backed by Python, so you can inspect or extend it whenever you want.
What makes a workflow durable?
Durability comes from the execution system tracking progress and handling waits and retries. Python defines the steps and business logic; it doesn’t make a script durable by itself.
Which integrations will Workflows use?
Workflows will use the AI Builder integration catalog, with Python and APIs available for custom connections. We’ll share availability details when early access opens.
Does every step need AI?
No. Use rules for predictable decisions and AI for tasks such as reading documents, classifying requests, or drafting replies. Human review belongs wherever your process needs it.
What should I automate first?
Start with a recurring process that has a clear trigger and outcome: routing a lead, preparing a weekly report, or approving an invoice. Add more steps as you learn what your team needs.