> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pathors.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Build a Complex Conversational Agent

> Learn how to design and implement a complex decision flow in Pathors (restaurant reservation example)

This appendix demonstrates how to use Pathors to build a more complex conversational scenario—a restaurant reservation flow with multiple decision branches and fallback options.

## Tutorial Video

<iframe width="100%" height="400" src="https://www.youtube.com/embed/MtPmJPxRTls" frameborder="0" allowfullscreen />

## Key Learning Points

* Multi-branch decision flow design
* Reservation node and information collection
* Seat availability check and fallback options
* Handling user acceptance/rejection of alternatives
* Node connections and flow completeness

## Steps

1. **Add a Reservation Node**
   * Add a "Reservation" node to the conversation flow to collect user info: number of people, time, special requests, etc.

2. **Branch Handling**
   * Check seat availability:
     * If available: go to "Register Reservation Info" node and complete the booking.
     * If not available: go to "Offer Alternative" node.

3. **Alternative Branches**
   * If user accepts the alternative: go to "Register Reservation Info" node.
   * If user rejects the alternative: go to "End" node and thank the user.

4. **Node Connections & Save**
   * Ensure all nodes are connected so the flow can be saved successfully.

5. **Test the Flow**
   * Test the reservation process, verify info collection, branching, and final booking result.

## Related Resources

* [Previous Tutorial: Create Conversational Agent](./pathors-tutorial-01-create-agent)
* [Next Tutorial: Connect Knowledge Base to Agent](./pathors-tutorial-02-knowledge-base)
