PolicyKit

AWS IAM for AI Agent Spending

PolicyKit is a financial authorization layer for autonomous AI agents. Before an agent can make any paid API call, provision cloud resources, or execute a financial transaction, PolicyKit evaluates the request against configurable policies, budgets, and approval workflows.


Why?

AI agents can spend real money, but they lack financial access controls.

Without authorization, a prompt injection, hallucination, or software bug can lead to:

  • Uncontrolled API spending
  • Unexpected cloud costs
  • Unauthorized vendors
  • Missing audit trails
  • Compliance risks

PolicyKit ensures every spending decision is authorized before funds leave the wallet.


Features

  • πŸ”’ Policy-based authorization
  • πŸ’° Task, hourly, daily & monthly budgets
  • 🏒 Vendor allowlists & blocklists
  • πŸ“‚ Category restrictions
  • πŸ‘€ Human approval workflows
  • πŸ“œ Immutable audit logs
  • ⚑ x402 payment authorization
  • 🚨 Real-time anomaly detection
  • πŸ“Š Admin dashboard

Architecture

AI Agent
    β”‚
Spend Request
    β”‚
    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚     PolicyKit      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Policy Engine      β”‚
β”‚ Budget Engine      β”‚
β”‚ Spend Controls     β”‚
β”‚ Human Approval     β”‚
β”‚ Audit Logs         β”‚
β”‚ x402 Payments      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    β”‚
Approve / Reject
    β”‚
    β–Ό
APIs β€’ Cloud β€’ Services

Tech Stack

Backend

  • Node.js
  • TypeScript
  • Fastify
  • Prisma
  • PostgreSQL
  • Redis

Frontend

  • Next.js
  • Tailwind CSS
  • wagmi

Payments

  • x402
  • Base
  • USDC
  • Coinbase CDP SDK

Workflow

AI Agent
    β”‚
Spend Request
    β”‚
Policy Evaluation
    β”œβ”€β”€ Budget
    β”œβ”€β”€ Vendor
    β”œβ”€β”€ Category
    └── Rules
    β”‚
    β–Ό
Approve?
β”œβ”€β”€ No  β†’ Reject + Audit
└── Yes β†’ Execute Payment

Performance

Metric Value
Authorization Latency <30 ms
Payment Protocol x402
Blockchain Base
Settlement USDC

Roadmap

  • TypeScript SDK
  • Python SDK
  • LangChain integration
  • CrewAI integration
  • Multi-tenant support
  • Policy versioning
  • Natural language policies

Vision

PolicyKit aims to become the financial authorization layer for autonomous AI, bringing governance, security, and compliance to AI spendingβ€”just as AWS IAM did for cloud infrastructure.


Built with: Node.js Β· Fastify Β· PostgreSQL Β· Redis Β· Next.js Β· x402 Β· Base Β· USDC

Built With

Share this project:

Updates