Files
pj0333-full-duplex/taskfile.yaml
T
Topherhindman cb13593fbc Update to livekit-agents 1.4, add Python 3.14 support (#47)
* Update to livekit-agents 1.4, add Python 3.14 support

* Use explicit dispatch by default

Set agent_name="my-agent" on the rtc_session decorator so the
agent must be explicitly dispatched to a room rather than
auto-joining every new room. Update the taskfile template
substitution to match the new decorator-based pattern.
2026-02-17 15:04:41 -08:00

59 lines
1.7 KiB
YAML

version: "3"
output: interleaved
dotenv: [".env.local"]
vars:
INDENT: 4
REL_PATH: "{{ relPath .USER_WORKING_DIR .ROOT_DIR }}"
VENV_DIR: ".venv"
PYTHON_MAIN: '{{ joinPath "./src" "agent.py" }}'
tasks:
post_create:
desc: "Runs after this template is instantiated as a Sandbox or Bootstrap"
cmds:
- echo 'To try the new agent directly in your terminal:'
- echo ''
- echo '{{ indent .INDENT "cd" }} {{ .REL_PATH }}'
- echo '{{ indent .INDENT "uv sync" }}'
- echo '{{ indent .INDENT "uv run" }} {{ .PYTHON_MAIN }} download-files'
- echo '{{ indent .INDENT "uv run" }} {{ .PYTHON_MAIN }} console'
- echo ''
- echo 'To deploy your agent to LiveKit cloud:'
- echo ''
- echo '{{ indent .INDENT "lk agent create" }}'
- echo ''
- task: set_agent_name_if_present
- task: help_open_sandbox_if_present
set_agent_name_if_present:
status:
- test -z "$LIVEKIT_AGENT_NAME"
cmds:
- |
old='agent_name="my-agent"'
new='agent_name="{{ .LIVEKIT_AGENT_NAME }}"'
file="{{ .PYTHON_MAIN }}"
tmp="$(mktemp)"
while IFS= read -r line; do
printf '%s\n' "${line//$old/$new}" >> "$tmp"
done < "$file"
mv "$tmp" "$file"
help_open_sandbox_if_present:
status:
- test -z "$LIVEKIT_SANDBOX_ID"
cmds:
- echo 'To chat with your running agent, visit:'
- echo ''
- echo '{{ indent .INDENT "https://" }}{{ .LIVEKIT_SANDBOX_ID }}.sandbox.livekit.io'
- echo ''
install:
desc: "Bootstrap application for local development"
cmds:
- "uv sync"
dev:
interactive: true
cmds:
- "uv run src/agent.py dev"