kindrat86

agentshield: Control AI Agent Spending

AgentShield is a Python library for evaluating AI agent spending against configurable rules before transactions proceed. It suits teams that need deterministic spend checks in their own systems without adding network or storage dependencies.

Stars
2
Forks
9
Stars, last 8 days
+0

Our take

Health score

44/100

How it is scored
Activity
46
Community
20
Issues
47
Pull requests
64

+0 stars in the last 8 days

  • Fewer contributors than 82% of the projects we track

Overview

AgentShield is a Python library for checking proposed AI agent expenses against spend-control rules. It helps teams catch oversized transactions, spending bursts, or other policy violations before they proceed.

The evaluator is described as stateless and deterministic, with no network or file I/O. The repository says this work has been consolidated into sipi.bot; the package and test fixtures remain available, while new implementation work runs through its paid pilot.

Key Features

  • Evaluates transactions against 10 rule types, including transaction limits, daily caps, velocity checks, and provider allowlists.
  • Supports controls for session budgets, duplicate transactions, circuit state, and human review thresholds.
  • Uses Decimal for money calculations.
  • Runs without network access, file I/O, global state, or third-party dependencies, according to the project documentation.
  • Includes an evaluation suite with 74 test scenarios.
  • Returns a decision and reason for a transaction evaluation.

Use Cases

  • AI application developers can block individual API calls that exceed a configured spend limit.
  • Teams operating agents can apply daily caps or detect bursts of transactions before costs accumulate.
  • Platform owners can restrict which merchants or spending categories an agent may use.
  • Developers building their own spend-control systems can use the included evaluation scenarios as test fixtures.

Getting Started

Install the package:

pip install agentshield-spend

See the README for usage details and rule configuration.

Considerations

  • The repository describes sub-millisecond evaluation, but this is a project claim, not an independent benchmark.
  • The evaluator is stateless, so callers must supply prior transactions for rules that depend on history.
  • The README says AgentShield's spend-control work has moved to sipi.bot. The Python package and fixtures remain available, but AgentShield no longer has a separate hosted offer or distribution program.
  • The repository has 2 stars, 9 forks, and 10 open issues. These counts are from the supplied repository metadata.

Found this useful?

Share it with someone who would like agentshield.