Assistant for checking prices and answering product questions powered by Gemini Live. For products sold by weight, the agent can read the weight on the scale attached to the client (ESP32) via RPC.
Known products the agent is allowed to answers questions about are defined in database.py. This is provided for demonstration purposes; in a production agent, you would likely access products from a database.
Clone the repository and install dependencies to a virtual environment:
cd agent-starter-python
uv syncSign up for LiveKit Cloud then set up the environment by copying .env.example to .env.local and filling in the required keys:
LIVEKIT_URLLIVEKIT_API_KEYLIVEKIT_API_SECRETGOOGLE_API_KEY
You can load the LiveKit environment automatically using the LiveKit CLI:
lk cloud auth
lk app env -w -d .env.localBefore your first run, you must download certain models such as Silero VAD and the LiveKit turn detector:
uv run python src/agent.py download-filesNext, run this command to speak to your agent directly in your terminal:
uv run python src/agent.py consoleTo run the agent for use with a frontend or telephony, use the dev command:
uv run python src/agent.py devIn production, use the start command:
uv run python src/agent.py startThis agent is intended for use with the grocery_assistant example for the ESP32 SDK since the agent makes an RCP call to read the attached scale. However, it can be easily modified to work with another frontend and/or telephony.
This project is production-ready and includes a working Dockerfile. To deploy it to LiveKit Cloud or another environment, see the deploying to production guide.
You can also self-host LiveKit instead of using LiveKit Cloud. See the self-hosting guide for more information. If you choose to self-host, you'll need to also use model plugins instead of LiveKit Inference and will need to remove the LiveKit Cloud noise cancellation plugin.
This project is licensed under the MIT License - see the LICENSE file for details.