File size: 1,174 Bytes
cf30ded
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
# ─────────────────────────────────────────────────────────────────────────────
#  scripts/start_agent.sh
#
#  Starts the voice assistant.
#  Assumes the MCP server is already running (./scripts/start_server.sh).
#
#  Usage:
#    chmod +x scripts/start_agent.sh
#    ./scripts/start_agent.sh
#
#  Optional: point to a remote HF Spaces MCP server:
#    MCP_SERVER_URL=https://your-hf-space.hf.space/sse ./scripts/start_agent.sh
# ─────────────────────────────────────────────────────────────────────────────
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"

MCP_URL="${MCP_SERVER_URL:-}"

if [ -n "$MCP_URL" ]; then
  echo "πŸ”—  Using remote MCP server: $MCP_URL"
  uv run voice-agent --mcp-url "$MCP_URL"
else
  echo "πŸ”—  Using local MCP server (http://localhost:8000/sse)"
  uv run voice-agent
fi