Examples
View as MarkdownEach example is a complete application built with Dex. A design pattern shows one technique; an example combines several. The Quick Start runs Customer Refund. Then read Order Processing. For agents, start with the Order Support Agent.
Examples
AI agents
| Example | What it does | Shows | SDKs |
|---|---|---|---|
| Sign-up Review Agent | Reviews each new sign-up with admins in Slack, applies their decision, and sends the welcome email after approval and a send reply | Agent sessions, Connectors as Tools, a Connector Trigger, a wait of days for a person, Time Travel | TypeScript, Go, own repository |
| Release Watch Agent | Posts a digest of your dependencies' new releases to Slack on weekdays, and files GitHub issues for the releases your team chooses to track | Cron schedule, Decision with Deadline, agent sessions, a Connector Trigger, an outbox in an Attribute | TypeScript, own repository |
| Order Support Agent | Looks up and cancels orders, built once for each agent framework; every cancellation waits for approval | Tool calls, Approvals, Sessions, Connectors as Tools | Python, TypeScript, Go |
Workflows
| Example | What it does | Shows | SDKs |
|---|---|---|---|
| Order Processing | Charges a buyer, waits for the seller to approve the shipment, then ships, or refunds when shipping keeps failing | Reminder, Execute Failure Recovery, Wait for Step Completion | All five |
| Subscription and Billing Lifecycle | Runs a subscription through its trial, billing periods, price changes, and cancellation | Recurring Timer loop, Static Parallel Steps | All five |
| User Onboarding Process | Verifies a new user's email, then waits for two setup tasks in order and sends reminders | Reminder | All five |
| Money Transfer | Moves money between two accounts, and attempts compensation when an operation still fails after its retries | Execute Failure Recovery | All five |
| Job Seeker Engagement | Keeps an employer and a job seeker aligned while the job seeker decides on an opportunity | Static Parallel Steps, Reminder, Decision with Deadline, Wait for Attribute Match | All five |
| Deal DSL | Describes each deal as data and runs any deal in one Flow | Workflow DSL | All five |
| Microservice Orchestration | Calls up to four APIs, two in parallel, one after a callback or a 24-hour timeout | Static Parallel Steps, Decision with Deadline | All five |
| Job Posting | Stores a searchable job posting and delivers every update to LinkedIn and Indeed in order | Entity Flow, Wait for Attribute Match | All five |
| Customer Refund | Checks a refund request, waits for a manager on large amounts, issues the refund, and emails the customer | A manager approval through a Channel and RPCs, Dex Web Actions, idempotency keys, Time Travel | All five; two more Flows in Go only |
"All five" means Python, Go, TypeScript, Java, and Rust. Build AI Agents has one more example: the AI Agent (Python, TypeScript), a general agent on the Dex Agent Framework.
Run any example
Run an example from the playground starts the examples of one language and the playground. The playground has every example above except Deal DSL and the three agents; their pages show how to run them.