Metadata-Version: 2.4
Name: sipi-bot
Version: 0.1.0
Summary: The spend firewall for autonomous AI agents — approve, block, or flag every transaction before a dollar moves.
Author-email: Sipi <sales@sipiteno.com>
License: MIT
Project-URL: Homepage, https://sipi.bot
Project-URL: Repository, https://github.com/kindrat86/sipi-bot
Project-URL: Live Dashboard, https://sipi.bot/dashboard
Project-URL: Eval Report, https://sipi.bot/eval
Keywords: ai-agents,agent-economy,mcp,spend-control,guardrails,agent-safety,x402,autonomous-agents
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Security
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: mcp
Requires-Dist: mcp>=1.0.0; extra == "mcp"
Dynamic: license-file

# sipi.bot — the spend firewall for autonomous AI agents

> You gave an autonomous agent your credit card and no spending limit.
> **sipi.bot** is the firewall that approves, blocks, or flags every
> transaction against *your* rules — before a single dollar moves.

One capability, three surfaces:

- **MCP tool** — Claude Code / Cursor / Hermes call `evaluate_spend` natively.
- **HTTP API** — any agent `POST /v1/transactions/evaluate`.
- **CLI** — verify without an agent.

## 10-second test

```bash
pip install sipi-bot
sipi-bot eval --amount 6200 --merchant unknown-gpu.ru --category compute
# -> {"decision": "BLOCKED", "reason": "Transaction $6,200.00 exceeds per-transaction limit $500.00."}

sipi-bot serve --port 8080   # landing + dashboard + API
```

Or from source:

```bash
python3.11 -m spendfirewall.cli eval --amount 6200 --merchant unknown-gpu.ru --category compute
```

Then open http://localhost:8080 (landing), http://localhost:8080/dashboard (control room), http://localhost:8080/pricing (Team $99 / Business $499).

**Hosted:** [sipi.bot](https://sipi.bot) · [dashboard](https://sipi.bot/dashboard) · [get an API key →](https://sipi.bot/pricing)

## The core call an agent makes before spending

```bash
curl -X POST https://sipi.bot/v1/transactions/evaluate \
  -H "Authorization: Bearer sk_live_..." \
  -d '{"amount": 6200, "merchant": "unknown-gpu.ru", "category": "compute"}'
```

Returns one of: `APPROVED` (go), `BLOCKED` (do not spend), `FLAGGED` (human must approve).

## Rule types

`per_transaction`, `daily_total`, `velocity` (runaway protection), `merchant_block`,
`merchant_allow` (allowlist), `category_limit`, `time_window`, `approval_threshold`.

First `BLOCKED` wins. `FLAGGED` is non-blocking (queued for human approval).

## Eval gym (the guarantee + the sales asset)

```bash
python3.11 -m spendfirewall.eval.run_eval   # 53 scenarios -> eval_report.json + .md
```

53/53 passing. Served live at `/eval`. This is what backs the guarantee:
*if the firewall green-lights a spend that breaks your rule, that month is free.*

## MCP config

```json
{ "mcpServers": { "sipi-bot": { "command": "python", "args": ["-m", "spendfirewall.mcp_server"] } } }
```

## Framework integrations

Drop-in "spend guardrails" recipes — each verified live against https://sipi.bot:

- [LangChain & CrewAI](integrations/SPEND_GUARDRAILS_RECIPE.md) — `@tool` / `BaseTool` wrappers + zero-dep `sipi_guard.py` client
- [OpenAI Agents SDK](integrations/openai-agents-sdk.md) — `@function_tool` guard
- [Vercel AI SDK](integrations/vercel-ai-sdk.md) — `tool({execute})` guard + `sipiGuard.ts` client

The core call is always the same: `evaluate(amount, merchant, category)` → `APPROVED` / `BLOCKED` / `FLAGGED`.

## Deploy (Fly.io)

```bash
flyctl launch --no-deploy --copy-config --name sipi-bot-firewall
flyctl volumes create sf_data --size 1 --region iad --yes
flyctl deploy
flyctl certs add sipi.bot
```

Stdlib-only (http.server, sqlite3). No framework, trivial deploy. `pip install mcp` only for the MCP surface.
