Add travel-concierge example (cloud catalog + live session)#408
Add travel-concierge example (cloud catalog + live session)#408samanyugoyal2010 wants to merge 17 commits into
Conversation
… session) A voice travel concierge that answers from two Moss indexes at once: - a pre-loaded catalog (long-term, shared across every call) - a live session that captures what the traveler says on this call Each turn it recalls stated preferences from the session and recommends trips from the catalog. Facts are distilled from each turn before they are stored, so the session holds clean preferences rather than raw questions. The web UI shows both indexes side by side, lighting up per turn with per-query latency. Includes agent.py, seed_index.py, a Next.js web UI, README, and a demo script.
- next.config: use serverExternalPackages for livekit-server-sdk instead of a non-standard outputFileTracingRoot, matching insurance-adjuster - token route: require LIVEKIT_* env vars and return 500 on misconfig instead of silently falling back to well-known dev credentials - DualPanel: reuse a single TextDecoder across data-channel messages
- token route: use crypto.randomUUID() for room/identity (collision-resistant). - agent.py: await the previous turn's fact-remember task before recalling, so an immediate follow-up question sees the just-stored facts (no fire-and-forget race).
…seed_index), add uuid suffix to session name (no same-second collision), Node 18.18+ in README
…CRIPT quote block; fail fast if catalog index is missing
…; add roomName to token response type
…ilience Keep the voice loop responsive under slow fact extraction, include recalled preferences in catalog search, and make the web UI/token path safer for unexpected payloads and public deploys. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@cubic.dev |
@samanyugoyal2010 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 25 files
Tip: instead of fixing issues one by one fix them all with cubic
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
… and UI Replace the client-visible token secret with an httpOnly gate cookie, keep fact writes alive across turn timeouts, and tighten the demo UI (side-by-side panels, transcript scroll/a11y, mic-only grants, Python <3.15). Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
All reported issues were addressed across 15 files (changes from recent commits).
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
…lize preference writes Sign issuance time into the gate cookie, rate-limit unlock/token attempts, compare secrets in constant time, and drop stale category upserts so slow extracts cannot overwrite newer corrections. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
All reported issues were addressed across 8 files (changes from recent commits).
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
…preference races Ignore forwarding headers unless TRUST_PROXY=1, evict expired limiter buckets, clear the gate code as soon as the cookie is set, and only advance category/refresh sequencing after successful session writes. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
All reported issues were addressed across 5 files (changes from recent commits).
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
…imit identity Keep panel refresh off the write lock with write-gen ordering, claim category seq before store with a retry, ignore spoofable X-Forwarded-For in favor of platform IP headers, and reserve rate-limit capacity before insert. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
…l refresh Use an explicit TRUSTED_CLIENT_IP_HEADER instead of a multi-header TRUST_PROXY flag, and run session panel refresh on a detached task so slow publishes no longer extend the voice-turn remember wait. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Stop evicting unexpired client buckets to make room for new keys, which reset an active client's allowance early. Unknown keys are rejected until a slot expires. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Summary
Supersedes #347 with review fixes applied on top of that branch.
A new voice-agent example under
moss-live-labs/examples/travel-conciergethat shows Moss answering from two indexes in a single call:Each turn the agent recalls the traveler's stated preferences from the session and recommends matching trips from the catalog. Both result sets are published on a
moss.retrievaldata channel, and the web UI renders them side by side, lighting up per turn with per-query latency.Why it's interesting
Review fixes included (on top of #347)
moss.retrievalpayloads, room-live status, optionalAPP_SECRETon/api/token, generic 500s, a11y live region, contrast tokens, working eslint + Node 18 typesuv run python ...; UTF-8 catalog seedingContents
agent.py— LiveKit agent querying catalog + session each turnseed_index.py— seeds the catalog cloud indexdata/catalog.json— 14 destinationsweb/— Next.js UI showing both panelsREADME.md,DEMO_SCRIPT.mdTry it
Docs: https://docs.moss.dev/docs/integrate/sessions
Note for maintainers
Please close #347 in favor of this PR (same branch history + review hardening). GitHub does not auto-close PRs via
Closes #347.