Wallet
Sub-wallets (agentes)
CRUD de agentes bajo la wallet.
Un sub-wallet es un agente: un cap lógico sobre el CVU principal.
Listar / crear
GET /api/v1/wallet/sub-wallets
POST /api/v1/wallet/sub-walletsBody de creación (todo opcional salvo agent_label):
{
"agent_label": "compras",
"purpose": "Insumos de oficina",
"payees": ["proveedor.principal"],
"threshold_cents": 500000,
"initial_amount": 5000.00,
"approval_config": {
"auto_approve_under_cents": 100000,
"whatsapp_threshold_cents": 500000,
"panic_limit_24h_cents": 5000000
}
}initial_amountva en unidades (no centavos);threshold_centsyapproval_config, en centavos.threshold_centsmapea awhatsapp_threshold_centsdel approval config.- Si no mandás
approval_config, el sub-wallet hereda del padre. Ver Límites.
Devuelve 201 con el sub-wallet creado:
{
"id": "sub_1b2c3d4e5f60718293a4b5c6d7e8f900",
"agent": "compras",
"purpose": "Insumos de oficina",
"payees": ["proveedor.principal"],
"payeeItems": [{ "alias": "proveedor.principal", "enabled": true }],
"cvu": "0000076500000012345678",
"balance": 5000.00,
"currency": "ARS",
"status": "active",
"approval_config": {
"auto_approve_under_cents": 100000,
"whatsapp_threshold_cents": 500000,
"panic_limit_24h_cents": 5000000
},
"created_at": "2026-08-20T09:15:45.000Z"
}Errores de creación:
| Status | Body |
|---|---|
400 | { "error": "invalid_json" } |
400 | { "error": "agent_label_required" } |
400 | { "error": "initial_amount_invalid" } |
401 | { "error": "unauthorized" } |
500 | { "error": "sub_wallet_creation_failed", "detail": "<mensaje>" } |
Detalle / editar / cerrar
GET /api/v1/wallet/sub-wallets/{id}
PATCH /api/v1/wallet/sub-wallets/{id}
DELETE /api/v1/wallet/sub-wallets/{id}GET y PATCH devuelven el sub-wallet (mismo shape que arriba). DELETE devuelve
{ "ok": true }. Recurso ajeno/inexistente → 404 not_found.
Estados: active, paused, closed. Cerrar un agente no borra su historial.
En MCP:
wallet_list_agents, wallet_create_agent (prohibida para agent keys).