Skip to content

Generic Voice Agent with templating#245

Open
CoderOMaster wants to merge 5 commits into
mainfrom
keshav/voice-agent
Open

Generic Voice Agent with templating#245
CoderOMaster wants to merge 5 commits into
mainfrom
keshav/voice-agent

Conversation

@CoderOMaster
Copy link
Copy Markdown
Collaborator

Pull Request Checklist

Please ensure that your PR meets the following requirements:

  • I have read the CONTRIBUTING guide.
  • I have updated the documentation (if applicable).
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

Description

Adds a generic LiveKit voice agent example powered by MOSS semantic search. The agent is persona-agnostic it dynamically discovers all available MOSS indexes at the start of each conversation and routes user questions to the most relevant one.

The create_index.py utility was reworked to read from a directory of .txt/.md files (instead of a hardcoded faqs.json) and accepts --index-name and --docs-dir CLI arguments, so any knowledge base can be indexed with a descriptive name (e.g. customer_support, product_faq).

Fixes # (issue number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Files Changed

  • examples/cookbook/generic-voice-agent/agent.py — LiveKit voice agent with list_indexes and moss_search tools; lazy loads each index into memory on first use for sub-10ms retrieval
  • examples/cookbook/generic-voice-agent/create_index.py — reworked to ingest any directory of documents; index name is passed via CLI to reflect the use case
  • examples/cookbook/generic-voice-agent/pyproject.toml — dependency manifest (livekit-agents, livekit-plugins-*, moss-sdk)
  • examples/cookbook/generic-voice-agent/docs/ — sample knowledge base files demonstrating the two-index setup (customer_support, product_faq)

Copilot AI review requested due to automatic review settings May 13, 2026 09:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new cookbook example for a persona-agnostic LiveKit voice agent that uses MOSS semantic search, plus a CLI utility to build indexes from a directory of markdown/text documents and sample KB content.

Changes:

  • Introduces a LiveKit voice agent that lists available MOSS indexes and searches a selected index to ground answers.
  • Adds create_index.py to create/refresh an index from a provided --docs-dir with a provided --index-name.
  • Adds a standalone pyproject.toml and sample knowledge-base documents for two example indexes.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
examples/cookbook/generic-voice-agent/pyproject.toml Adds dependency manifest for the example app.
examples/cookbook/generic-voice-agent/agent.py Implements the generic LiveKit voice agent with list_indexes and moss_search tools.
examples/cookbook/generic-voice-agent/create_index.py Adds CLI tool to ingest .md/.txt docs from a directory into a MOSS index.
examples/cookbook/generic-voice-agent/docs/product_faq/pricing.md Sample KB content for pricing questions.
examples/cookbook/generic-voice-agent/docs/product_faq/features.md Sample KB content describing product features.
examples/cookbook/generic-voice-agent/docs/customer_support/shipping.md Sample KB content for shipping/delivery support.
examples/cookbook/generic-voice-agent/docs/customer_support/refunds.md Sample KB content for refunds support.
examples/cookbook/generic-voice-agent/docs/customer_support/account.md Sample KB content for account help.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/cookbook/generalist-moss-voice-agent/pyproject.toml
Comment thread examples/cookbook/generic-voice-agent/agent.py Outdated
Comment thread examples/cookbook/generalist-moss-voice-agent/agent.py
Comment thread examples/cookbook/generalist-moss-voice-agent/agent.py Outdated
Comment thread examples/cookbook/generalist-moss-voice-agent/create_index.py
Comment thread examples/cookbook/generalist-moss-voice-agent/create_index.py
Comment thread examples/cookbook/generic-voice-agent/pyproject.toml Outdated
Comment thread examples/cookbook/generalist-moss-voice-agent/pyproject.toml
Comment thread examples/cookbook/generalist-moss-voice-agent/agent.py Outdated
Comment thread examples/cookbook/generalist-moss-voice-agent/README.md
Comment thread examples/cookbook/generalist-moss-voice-agent/agent.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants