Skip to content

Latest commit

 

History

History
75 lines (48 loc) · 2.75 KB

File metadata and controls

75 lines (48 loc) · 2.75 KB

Grocery Assistant

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.

Product Database

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.

Dev Setup

Clone the repository and install dependencies to a virtual environment:

cd agent-starter-python
uv sync

Sign up for LiveKit Cloud then set up the environment by copying .env.example to .env.local and filling in the required keys:

  • LIVEKIT_URL
  • LIVEKIT_API_KEY
  • LIVEKIT_API_SECRET
  • GOOGLE_API_KEY

You can load the LiveKit environment automatically using the LiveKit CLI:

lk cloud auth
lk app env -w -d .env.local

Run the agent

Before your first run, you must download certain models such as Silero VAD and the LiveKit turn detector:

uv run python src/agent.py download-files

Next, run this command to speak to your agent directly in your terminal:

uv run python src/agent.py console

To run the agent for use with a frontend or telephony, use the dev command:

uv run python src/agent.py dev

In production, use the start command:

uv run python src/agent.py start

Frontend & Telephony

This 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.

Deploying to production

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.

Self-hosted LiveKit

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.