Skip to content

Add command so agents can register a new workload on the gateway #36

Description

@lluisinthedesert

Problem

The OSS CLI has workloads route to configure traffic routing for an existing workload, but no workloads create command to register a new workload on the gateway. This blocks the end-to-end flow described in skills/use-understudy-gateway/SKILL.md:

  1. An agent runs understudy capture-evidence workload-card → local workload-card.json is created ✅
  2. Agent tries to route traffic: understudy workloads route workload-001 --model-id gemma-4-31b-it --traffic-pct 100 → 404 "Workload not found" ❌
  3. The workload was never registered on the gateway server.

Current behavior

$ understudy workloads route workload-001 --project-id proj_xxx --model-id gemma-4-31b-it --traffic-pct 100
error: Workload not found.

The workload-card.json exists locally but the gateway has no record of it.

Expected behavior

# Register the local workload card on the gateway
understudy workloads create --project-id proj_xxx --from-card .understudy/workload-discovery/workload-card.json

# Then route traffic to it
understudy workloads route workload-001 --project-id proj_xxx --model-id gemma-4-31b-it --traffic-pct 100

Impact

Without this, an agent using only the OSS CLI cannot:

  • Set up a workload route through the gateway
  • Use understudy run with the gateway to drive an eval against an Understudy model
  • Follow the A/B model routing recipe in the skill

The workaround is to either use the private CLI (which has automationbench run-official --provider lilac that handles this internally) or bypass the gateway entirely and call a provider API directly.

Related

Suggested implementation

Add a workloads create subcommand to src/commands/workloads.ts that:

  1. Reads a local workload-card.json
  2. Calls the gateway API to register the workload
  3. Returns the server-assigned workload-id for use with workloads route

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions