Metadata-Version: 2.4
Name: sardis-browser-use
Version: 1.1.0
Summary: Sardis payment tools for Browser Use - enable browser agents to make policy-controlled payments
Project-URL: Homepage, https://sardis.sh
Project-URL: Documentation, https://sardis.sh/docs/integrations/browser-use
Project-URL: Repository, https://github.com/EfeDurmaz16/sardis
Author-email: Sardis <efe@sardis.sh>
License: MIT
License-File: LICENSE
Keywords: ai-agents,browser-use,payments,sardis,stablecoin
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: browser-use>=0.1.0
Requires-Dist: sardis>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# sardis-browser-use

Sardis payment tools for [Browser Use](https://github.com/browser-use/browser-use) — enable browser automation agents to make policy-controlled USDC payments with built-in spending limits and audit trails.

## Install

```bash
pip install sardis-browser-use
```

## Quick Start

**Step 1:** Create a Sardis wallet with a spending policy.

**Step 2:** Register Sardis actions on your Browser Use controller.

**Step 3:** Run your agent — it can now check balances, verify policies, and pay.

```python
import asyncio, os
from browser_use import Agent, Controller
from sardis import SardisClient
from sardis_browser_use import register_sardis_actions

controller = Controller()

# Simulation mode — no API key required
client = SardisClient()
wallet = client.wallets.create(name="shopping-agent", policy="Max $100/day")
os.environ["SARDIS_WALLET_ID"] = wallet.id

register_sardis_actions(controller)

async def main():
    agent = Agent(
        task="Find the cheapest USB-C cable on Amazon and buy it if under $15",
        controller=controller,
    )
    await agent.run()

asyncio.run(main())
```

This gives your agent three actions:
- `sardis_pay(amount, merchant, purpose)` — execute a payment
- `sardis_balance(token)` — check current wallet balance
- `sardis_check_policy(amount, merchant)` — verify a purchase before committing

## Docs

[sardis.sh/docs/integrations/browser-use](https://sardis.sh/docs/integrations/browser-use)
