Skip to main content

OpenAI Agents SDK tool for hard spending limits on AI agents via Valta

Project description

openai-agents-valta

Hard spending limits for OpenAI Agents SDK. Enforces budget policies before any paid operation fires.

Install

pip install openai-agents-valta

Quickstart

from openai_agents_valta import make_valta_tool
from agents import Agent, Runner

guard = make_valta_tool(
    api_key="vk_live_...",   # from valta.co/dashboard/api-keys
    agent_id="research-agent",
)

agent = Agent(
    name="Research Agent",
    instructions=(
        "Before any paid operation, call check_spend with the estimated cost. "
        "Only proceed if the result is 'approved'."
    ),
    tools=[guard, ...your_other_tools],
)

result = await Runner.run(agent, "Research the latest AI news")

How it works

The agent calls check_spend before any paid operation. Valta evaluates the request against the user's policy and returns approved or denied: <reason> before the charge fires.

Response Meaning
approved Spend is within policy — proceed
denied: daily_limit_exceeded Would exceed daily budget
denied: insufficient_balance Wallet balance too low
denied: requires human approval Above approval threshold — check dashboard

Policy management

Set limits at valta.co/dashboard/policies. Changes take effect immediately — no redeploy needed.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openai_agents_valta-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openai_agents_valta-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file openai_agents_valta-0.1.0.tar.gz.

File metadata

  • Download URL: openai_agents_valta-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for openai_agents_valta-0.1.0.tar.gz
Algorithm Hash digest
SHA256 484640edd3643b608c85fb482b74d707fbe1c60482299b7a9fe0df42c80b4c8d
MD5 a91957c6853466545acb8ef7ef469858
BLAKE2b-256 4ed62811ab7f6b32bb571c58a5fcc03f02184dec763b5416b15495d50924bc9f

See more details on using hashes here.

File details

Details for the file openai_agents_valta-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openai_agents_valta-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 778616d752fcad0061299b7cd8ac072b35a9030826cc53a1f2bb874c8caa629a
MD5 b26c1f4f6a363bba40d7feb9852691f4
BLAKE2b-256 4af49436218f645d3be02893488336fde51e09cd0de45960cc09cd1fab1b01c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page