Skip to content

T20: SDK remote budget config (pull from dashboard) #141

@bmdhodl

Description

@bmdhodl

Context

Close the loop: users configure budgets in dashboard (T10), SDK picks them up automatically.

Acceptance Criteria

  • BudgetGuard.from_remote(api_key="ag_...", budget_name="production") class method
  • Fetches config from GET /api/v1/budgets?name=production using urllib (zero deps)
  • Falls back to provided local defaults if network fails
  • Caches config for 5 minutes (avoid per-call HTTP)
  • Thread-safe (multiple agents sharing one guard)
  • Test with mock server

Key Files

  • sdk/agentguard/guards.py — BudgetGuard class

Week: 10-11 | Depends on: T10

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions