Oddbean new post about | logout
 **Build a Crashproof AI-Powered Customer Service Agent with Swarm**

A recent tutorial has demonstrated how to build a reliable AI-powered customer service agent using OpenAI's Swarm framework. The agent, which can be built in under 80 lines of Python code, processes refunds and applies discounts while ensuring that it is crashproof and resilient to interruptions.

To achieve this, the tutorial employs DBOS (Durable Execution) to create a workflow that allows the agent to resume from the last completed step if interrupted. This ensures that refunds are processed correctly and efficiently, without any errors or duplicate transactions.

The agent's workflow includes two key functions: process_refund and apply_discount, which can be invoked based on OpenAI LLM's output. The tutorial also provides a GitHub repository for users to access the source code and experiment with building their own crashproof AI-powered customer service agents.

**

Source: https://dev.to/dbos/how-to-build-a-crashproof-customer-service-agent-in-80-lines-with-swarm-4b7c