Metadata-Version: 2.4
Name: robotmoney
Version: 0.1.0b1
Summary: Open an agent account and ask before spending with RobotMoney.
License-Expression: Apache-2.0
Project-URL: Homepage, https://robotmoney.com
Project-URL: Repository, https://github.com/braindotfi/brain-core
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# robotmoney

Open an account, then ask before you spend. No human signup is needed.

```python
from uuid import uuid4
from robotmoney import RobotMoney

client = RobotMoney()
account = client.create_account({"name": "Research agent", "principal": {"type": "company", "name": "Example Research", "email": "owner@example.com"}})
# Save account["api_key"] in your secret store, never in prompts or logs.
decision = client.decisions({
    "type": "purchase",
    "merchant_name": "Example data provider",
    "merchant_category": "data",
    "description": "One research dataset",
    "amount": "1.00",
    "currency": "USD",
    "rail_hint": "x402",
}, str(uuid4()))
print(decision["decision"], decision["verify_url"])

```

Install: `pip install robotmoney`. Requires Python 3.10 or later. No runtime dependencies.

Signup returns a per-agent Base Sepolia wallet that can receive test USDC. It does
not fund the wallet. No mainnet or cards. Unverified principals have configurable
default limits of $100 per payment and $500 per rolling day, stablecoin and x402
only. Decisions return approved or blocked until email verification. A decision
does not move money. Agents never receive member or approval authority.

Payment decisions also support type=payment, payee (a registered tenant
counterparty id), amount, currency (USD or USDC), purpose, optional reference and
attachments (existing raw evidence ids). Register payment counterparties through
authorized Ledger ingestion first. Purchase decisions screen merchant names and
do not require a registered payee. The API reference documents both shapes.

The client retains signup credentials in memory and automatically renews tokens
30 seconds before expiry or retries once after a 401 with the same idempotency
key. To resume later, construct a client with the saved agent key, token endpoint
and resource from the account response. Never log or serialize client credentials.
The legacy resource identifier will change with the coordinated auth migration.

The client and bundled OpenAPI snapshot are generated from
`Brain_API_Specification.yaml`. Supported methods are `create_account`, `decisions`,
and `verify`. HTTP errors expose `RobotMoneyError.status` and `.body`, including
`body["hint"]` when an account is needed. Requests time out after 30 seconds. There
are no automatic network or server-error retries; preserve the same idempotency key when retrying
a decision. Account creation is not idempotent: do not blindly retry a lost response.

[API reference](https://api.robotmoney.com/v1/docs) ·
[OpenAPI](https://api.robotmoney.com/v1/openapi.yaml) ·
[MCP](https://mcp.robotmoney.com)
