Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/commands/run.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ export function registerRun(program: Command): void {
'-t, --template <slug>',
'start from a maintained run template (e.g. welcome-to-ellipsis)',
)
.option('-b, --budget <usd>', 'per-run budget override in USD', parseFloat)
.option(
'-b, --budget <usd>',
"per-run budget override in USD (sets the config's limits.run for this run)",
parseFloat,
)
.option(
'-m, --metadata <key=value>',
'attach metadata (repeatable)',
Expand Down Expand Up @@ -81,7 +85,11 @@ export function registerRun(program: Command): void {
if (opts.config) req.config_id = opts.config
if (opts.configFile) req.config = readJsonFile(opts.configFile)
if (opts.template) req.template_id = opts.template
if (opts.budget !== undefined) req.budget_usd = opts.budget
// A budget is expressed as a config override of limits.run (the server
// merges it onto the chosen config and re-validates).
if (opts.budget !== undefined) {
req.config_override_yaml = `limits:\n run: ${opts.budget}`
}

const api = new ApiClient()
const run = await api.startAgentRun(req)
Expand Down
5 changes: 4 additions & 1 deletion src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ export interface StartAgentRunRequest {
template_id?: string
source?: AgentRunSource
metadata?: Record<string, string>
budget_usd?: number
// A partial agent config (YAML) merged onto the chosen config and re-validated
// server-side, e.g. "limits:\n run: 5.0" to set just this run's budget. Only
// meaningful with config_id/template_id.
config_override_yaml?: string
}

export interface ListAgentRunsResponse {
Expand Down
Loading