Agent Spending Limits

This functionality isn't publicly available yet. Reach out to [email protected] if you'd like an early look.

Agent Spending Limits is a powerful feature that empowers Skyfire agents to implement granular control over their expenditures on the Skyfire platform. This feature enables agents to set and manage spending limits at both the account and individual wallet levels, providing enhanced security and budget management capabilities.

With Agent Spending Limits, users can define specific rules for maximum spending amounts based on various criteria, including time periods and service providers. This document outlines the key aspects of the feature, its implementation details, and usage guidelines for both users and developers.

Overview

Agent Spending Limits offers the following key functionalities:

Limit Definition

  • Define limits based on time periods (daily, weekly, monthly, yearly)
  • Set maximum spending per transaction

Limit Targeting

  • Set agent account-level and wallet-specific limit rules
  • Apply limits to all service providers or target specific providers

Multiple Management Options

  • Manage spending limits via the Skyfire Dashboard or API

Agents can leverage these capabilities to enforce policies, prevent overspending, and maintain better control over their Skyfire transactions.

Limit Rules

Limits can be created with the following properties:

  • Source Wallet: For agents with multiple wallets, specify the wallet to which the limits should apply.
  • Service Provider: The service provider to which the rules should be limited.
  • Rules: A list of spending rules that form the core of the spending limit.
    • Each rule has the following configurable properties:
      • Amount: The amount in USDC
      • Frequency: Frequency of the rule. Options include "yearly", "weekly", "monthly", "daily", "per request", "all time"
    • Conflicting rules (i.e., two rules with the same frequency) cannot be created.
    • Agents can create and combine rules that target specific wallets and service providers, such as:
      • 1000 USDC per year, 100 USDC per week, with a max of 0.5 USC per request and 50k USDC in total spendings - targeting all providers.

Example Usage

Company X uses OpenRouter on Skyfire for their agent and wants to enforce the following spending limits for their OpenRouter proxy calls to better manage their expenses:

  1. Set a maximum amount of 2 USDC per request to avoid overspending on LLM calls with a high number of tokens.
  2. Set a weekly limit of 500 USDC on total spending to ensure costs remain under control.
  3. Apply these limits to all Skyfire payments initially, with the option to apply overrides for specific service providers in the future.

To implement these limits, Company X can follow these steps:

  1. Navigate to the "Spending Limits" section on the Skyfire Dashboard.
  2. Create a new limit with the following properties:
    • Source Wallet: All
    • Service Provider: All
    • Rule 1:
      • Frequency: weekly
      • Amount: 500 USDC
    • Rules 2:
      • Frequency: per request
      • Amount: 2 USDC

Once these limits are set, API calls to OpenRouter will throw an error if the limits are reached.

[Insert sample error response here]