spendguard-strict-budget-runner

Run application agents through SpendGuard with strict hard budget caps. Use when setting up `spendguard-sidecar`, creating agent IDs, setting or topping budgets, sending OpenAI/Grok/Gemini/Anthropic calls through SpendGuard endpoints, and troubleshooting budget enforcement errors like insufficient budget, in-flight lock conflicts, missing `x-cynsta-agent-id`, or remote pricing signature failures.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "spendguard-strict-budget-runner" with this command: npx skills add cynsta/spendguard-sdk/cynsta-spendguard-sdk-spendguard-strict-budget-runner

SpendGuard Strict Budget Runner

Overview

Use this skill to operationalize strict-budget execution.

Quick Start

  1. Load references/strict-budget-quickstart.md.
  2. Start sidecar in strict remote-pricing mode.
  3. Create agent and set hard budget with CLI or scripts/bootstrap_strict_budget.py.
  4. Route model calls through SpendGuard and include required headers.
  5. Confirm budget decrement and handle failures using references/error-playbook.md.

Workflow

1) Start SpendGuard in strict mode

Use sidecar mode with remote signed pricing verification enabled. Do not bypass signature checks for normal usage.

See full env setup in references/strict-budget-quickstart.md.

2) Create budgeted agent identity

Prefer CLI:

spendguard agent create --name "my-agent"
spendguard budget set --agent <agent_id> --limit 5000 --topup 5000
spendguard budget get --agent <agent_id>

Use script when deterministic JSON output is needed:

python scripts/bootstrap_strict_budget.py --name my-agent --limit 5000 --topup 5000

3) Route model calls through SpendGuard

Send requests to sidecar .../v1/... routes, not directly to provider APIs.

Required:

  • Header x-cynsta-agent-id: <agent_id>
  • Optional x-cynsta-run-id: <run_id> for explicit run tracking

Load references/routing-patterns.md for OpenAI SDK and direct HTTP patterns.

4) Enforce strict budget behavior

Expect:

  • 402 when budget is insufficient for reserve
  • 409 when same agent budget is locked by another in-flight run
  • 400 for malformed payload or missing required headers

Apply fixes from references/error-playbook.md.

5) Validate before finishing

Run these checks after setup:

  1. Health endpoint returns {"status":"ok"}.
  2. budget get returns expected remaining_cents.
  3. One real or mocked model call succeeds through sidecar.
  4. Remaining budget decreases after settled usage.

Guardrails

  • Use one agent per isolated budget domain; do not share agent IDs across unrelated workloads.
  • Keep budgets in cents and treat hard_limit_cents as the strict cap.
  • Keep CAP_PRICING_VERIFY_SIGNATURE=true in normal operation.
  • In hosted mode, pass API key via --api-key or CAP_API_KEY.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

spendguard-strict-budget-runner

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

clinic-visit-prep

帮助患者整理就诊前问题、既往记录、检查清单与时间线,不提供诊断。;use for healthcare, intake, prep workflows;do not use for 给诊断结论, 替代医生意见.

Archived SourceRecently Updated
Automation

changelog-curator

从变更记录、提交摘要或发布说明中整理对外 changelog,并区分用户价值与内部改动。;use for changelog, release-notes, docs workflows;do not use for 捏造未发布功能, 替代正式合规审批.

Archived SourceRecently Updated
Automation

klaviyo

Klaviyo API integration with managed OAuth. Access profiles, lists, segments, campaigns, flows, events, metrics, templates, catalogs, and webhooks. Use this skill when users want to manage email marketing, customer data, or integrate with Klaviyo workflows. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).

Archived SourceRecently Updated