Repository navigation
feat(lk): send LK_SOURCE as X-LiveKit-Source on Public API requests - #1116
Merged
Merged
Conversation
Lets LiveKit's skills and templates tell a coding agent to set LK_SOURCE, so the request event shows which of them the agent followed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
Neither sets AI_AGENT. Codex sets CODEX_VERSION on every command it runs, and Cursor sets CURSOR_AGENT in its agent's terminal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rektdeckard
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The DevEx Q4 goal "80% of agents built by coding agents follow our skills and templates" needs a way to tell whether an agent followed them. The plan from #team-devex-internal is a watermark: a value that only our skills and templates tell the agent to send. When it arrives on a request, the agent was following them, and the value says which one.
What changed
LK_SOURCEis set, every Public API request sends it asX-LiveKit-Source, e.g.LK_SOURCE=skills lk analytics session list --user-auth. It's cleaned like the coding-agent name: lowercase letters, digits, dots and dashes, at most 64 characters.--helpmentions it. Only the skills and templates will, so a value on a request can't come from somewhere else.AI_AGENT, so both showed up as no agent. Codex setsCODEX_VERSIONon every command it runs (source), and Cursor setsCURSOR_AGENTin its agent's terminal (docs).livekit/public-api-server#160 records the header as
sourceon thepublic_api_requestevent.How I tested it
go test ./pkg/public/andgo vet ./pkg/public/ ./cmd/lk/pass.🤖 Generated with Claude Code