1. Building a Realistic AI Agent with a Face [0]

thumbnail An AI agent with a realistic face can be created using a single prompt and two tools: Synthesia for avatars and LiveKit for real-time conversation, all connected through Claude Code.

1.1. Connecting Synthesia and LiveKit APIs [4]

  1. Connecting tools in Claude Code [4]
    1. The first step is to connect Synthesia (for AI avatars) and LiveKit (for handling conversations like listening, thinking, and talking) within Claude Code. [4]
    2. An API key, which acts like a unique password, is needed to connect these two tools. [7]
  2. Obtaining the Synthesia API key [8]
    1. To get the Synthesia API key, navigate to the developers tab in the left sidebar of your Synthesia account and select the API key section. [10]
    2. Create a new API key, name it, and set "interactive avatars" to access while leaving "legacy V2" on no access. [12]
    3. Set the expiry to "never" to ensure the key remains active. [13]
    4. Copy the displayed API key immediately after creation, as it is shown only once, and paste it into a notepad. [14]
  3. Obtaining the LiveKit API key [16]
    1. For LiveKit, sign up for a free plan, which is sufficient for building and testing, and create a project. [16]
    2. Name the project, keep the data region as default, and set agent observability to disabled. [18]
    3. Skip building the first agent, as Claude Code will handle this part. [19]
    4. Go to "manage API keys," press "create key," add a description, and generate the key. [20]
    5. Copy the entire "environment variables" block, which contains the three parts of the password, and paste it into the notepad under the Synthesia key. [21]

1.2. Setting Up the Development Environment and Prompting the Agent [24]

  1. Installing Python and Claude Code [24]
    1. The agent runs on Python, but Claude Code handles all the programming, so no manual coding is required. [24]
    2. If Python 3.10 or newer is not installed, download and install the standalone installer for Python 3.14.7. [26]
    3. To get Claude Code, download Claude desktop, as Claude Code is built into it. [30]
    4. After signing in, create an empty project folder, open the code tab in Claude desktop, choose "local," and select the empty folder. [32]
    5. Set the mode to "auto" in Claude Code to allow it to run the entire build process without requiring permission for each step. [33]
  2. Prompting the AI Agent [34]
    1. The prompt is written in six parts, requiring only changes to the bracketed sections for the business name, products, and opening hours. [34]
    2. For a car dealership example, the prompt included "Northline Motors," three cars, and specified "Kenji" from the Synthesia library as the avatar. [36]
    3. The third part of the prompt is crucial because it installs Synthesia's official "skill," which guides Claude Code on how to connect the avatar to the agent. [38]
    4. Sending the prompt initiates the installation of the skill and the writing of the agent, which takes a few minutes. [39]
    5. Once completed, Claude Code confirms what it built, including the agent, a webpage with the avatar and a booking form, and the specified products. [41]
  3. Adding API Keys to the Project [44]
    1. Claude Code cannot add the API keys by itself, so it creates a small text file with empty slots for them and monitors this file. [44]
    2. To add the keys, open the .env file in the project folder using a notepad. [46]
    3. Paste the Synthesia key after "Synthesia API key=" without spaces or quote marks, and the LiveKit block into the designated LiveKit slots. [48]
    4. Save and close the file. [49]
    5. Claude Code detects the filled keys, starts the agent, and confirms a connection without errors, providing a local address (localhost 8080) to access the website. [50]
    6. Opening "localhost 8080" in a browser reveals the fully functional website, complete with the avatar, booking form, and product details. [52]
    7. Clicking "start conversation" and allowing microphone access brings the AI agent to life. [56]

2. Interacting with the AI Agent and Creating a Second Business [58]

thumbnail

The AI agent can engage in real-time conversations, answer questions, and complete tasks like booking test drives or classes, with the ability to create new business agents by reusing the existing setup.

2.1. Car Dealership Agent Interaction [58]

  1. Initial Interaction and Information Retrieval [58]
    1. The agent, Kenji, greets the user and offers options like hearing about cars or booking a test drive. [58]
    2. All spoken dialogue appears as captions under the video. [59]
    3. When asked about a specific car, like the "Lumen," Kenji provides detailed specifications. [60]
    4. The agent stops talking immediately if interrupted mid-sentence. [64]
  2. Booking a Test Drive [65]
    1. When the user expresses interest in a test drive for the Lumen, the car model is automatically filled into the booking form on the right side of the screen. [65]
    2. The agent actively guides the user through the booking process, updating the form in real-time. [69]
  3. Providing Personal Details and Scheduling [71]
    1. The agent asks the user to spell out their full name and email address letter by letter. [71]
    2. When asked for a date, the agent clarifies vague requests (e.g., "maybe next week" becomes "Monday, 5th October, 2026"). [77]
    3. The agent offers available time slots (e.g., "9:00 a.m. or 9:30 a.m.") and updates the form as details are confirmed. [81]
  4. Confirmation and Completion [89]
    1. The agent reads back the entire booking summary for confirmation. [89]
    2. If asked about unavailable times (e.g., Sundays), the agent explains the closure and offers alternative days. [91]
    3. Upon final confirmation, the booking form is completely filled, the status changes to "confirmed," and a test drive booked card with a reference code is displayed and spoken aloud. [93]
    4. This process demonstrates that a booking can be completed without any manual typing. [102]

2.2. Creating and Interacting with a Second Business Agent [104]

  1. Creating a New Business Agent [104]
    1. Once the first agent is running, creating a second agent for a different business requires only one more prompt, as it reuses the same keys and setup. [103]
    2. For a cooking school named "Saffron and Salt" with "May" as the avatar, a shorter prompt is used to instruct Claude Code to copy the existing project and change only the business details. [105]
    3. After a few minutes, the new agent is ready, displaying a cooking school page layout with classes and prices, reusing the structure from the first build. [107]
  2. Cooking School Agent Interaction [113]
    1. The new agent, May, greets the user and offers information about classes or booking a spot. [113]
    2. When asked about a specific class, like the "weekend sourdough class," May provides details. [116]
    3. The agent can answer follow-up questions, even if interrupted, such as confirming if the bread can be taken home. [118]
  3. Booking a Class with Specific Rules [122]
    1. The agent requests the user's name and email address, similar to the car dealership agent. [122]
    2. If the user requests a day when the school is closed (e.g., Monday), the agent informs them and offers alternative days (e.g., Tuesday to Saturday). [129]
    3. When a specific time is requested that doesn't match available slots (e.g., "3:00 p.m." when only "11:00 a.m. or 6:00 p.m." are available), the agent corrects the user and offers valid options. [133]
    4. The agent enforces class capacity limits, informing the user if their requested group size (e.g., "10 people") exceeds the maximum (e.g., "eight guests") and asks if they want to book for a smaller group. [139]
    5. The agent can handle multiple changes of mind, updating the booking form each time and reading back the revised details for confirmation. [145]
    6. Upon confirmation, the class is booked, a reference code is provided, the total cost is calculated, and a confirmation email is sent. [156]
    7. This demonstrates the agent's ability to enforce business rules and complete bookings efficiently. [161]
  4. Conclusion [162]
    1. Synthesia offers 500 free minutes for users to try building their own AI agents. [162]