This example demonstrates a simple customer service agent built with Temporal. The agent can greet customers and provide order status information.
- Simple agent with two functions:
greet: Greets the customer by nameget_order_status: Retrieves status information for a given order ID
- runner.py: Defines the agent with its functions and starts the agent runner
- console.py: Provides a console interface for interacting with the agent
- Python 3.8+
- Temporal server running locally (default: localhost:7233)
- uv package manager (see installation instructions below)
-
Install uv if you don't have it already:
curl -sSf https://install.ultraviolet.rs | shFor other installation methods, see the uv documentation.
-
Make sure your Temporal server is running.
uv run -m examples.customer_service.runnerThis will start the agent runner, making the agent available for interactions.
uv run -m examples.customer_service.consoleThis will start a console interface where you can interact with the agent directly.
-
Greeting:
> Hello, my name is Alice hi Alice, how's your day been? -
Checking order status:
> What's the status of my order #12345? Your order #12345 is expected to be delivered Tomorrow.
You can extend this example by:
- Adding more functions to the agent
- Modifying the agent's instructions
- Connecting to a real order database
- Integrating with other communication channels