Skip to content

Add deployment field to agent dispatch in TokenSource#318

Open
xianshijing-lk wants to merge 2 commits into
mainfrom
shijing/add-agent-deployment
Open

Add deployment field to agent dispatch in TokenSource#318
xianshijing-lk wants to merge 2 commits into
mainfrom
shijing/add-agent-deployment

Conversation

@xianshijing-lk

Copy link
Copy Markdown
Contributor

Summary

  • Add AgentDeployment property to TokenSourceFetchOptions for specifying target deployment
  • Add Deployment field to AgentDispatch class with JSON serialization
  • Update BuildRequest() to include deployment when any agent field is set

Leave deployment empty to target the production deployment.

Related PRs

Verification Steps

  1. Create a Unity project with the LiveKit SDK
  2. Use TokenSourceEndpoint or TokenSourceSandbox with TokenSourceFetchOptions:
    var options = new TokenSourceFetchOptions
    {
        RoomName = "test-room",
        ParticipantIdentity = "user-1",
        AgentName = "my-agent",
        AgentDeployment = "staging"  // New field
    };
    var details = await tokenSource.FetchConnectionDetails(options);
  3. Verify the JSON request includes "deployment": "staging" in the agent dispatch
  4. Test with empty deployment (production default)

🤖 Generated with Claude Code

xianshijing-lk and others added 2 commits June 17, 2026 14:17
Add support for targeting specific agent deployments when using TokenSource:
- Add AgentDeployment property to TokenSourceFetchOptions
- Add Deployment field to AgentDispatch class
- Include deployment in BuildRequest when any agent field is set

Leave deployment empty to target the production deployment.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@MaxHeimbrock MaxHeimbrock force-pushed the shijing/add-agent-deployment branch from 15eae60 to fd20202 Compare June 17, 2026 12:17
@MaxHeimbrock

Copy link
Copy Markdown
Contributor

Right now my status is:
When I put anything in that field, the agent is not deployed. I tried production, staging, abcd. Whatever I do, I don't get an error but the agent is not deployed. If I leave the field empty, it is deployed. What is the expected behaviour of the field to test against?

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.

2 participants