/api/agent/v1/categories
Returns visible categories and budget line-item options for personal and joint scopes.
Use a personal access token, a small CLI, or direct HTTP requests to read uncategorized transactions, ask for partner context, and write category assignments. You stay in control of access, expiry, and revocation.
npm install --global @slothmoney/agent-cli
sloth-agent auth login
sloth-agent auth status
sloth-agent transactions --uncategorized --limit 50
sloth-agent ask-partner --transaction-ref sloth_txn_...
sloth-agent assign --input assignments.json
sloth-agent assign --input assignments.json --apply
Create a personal access token in Settings, copy it once, and revoke it when your agent no longer needs access.
Pull categories and transactions first. Preview assignment JSON before sending a write request.
Agent access is scoped to the signed-in user and enabled joint account transactions for that Sloth Money account.
Agents can create a partner clarification link for a partner-shared or joint transaction. The CLI prints the message and link; it does not send WhatsApp messages.
Quickstart
Install the public CLI from npm. Review the source on GitHub. Direct HTTP calls use the same API.
Install the package with Node.js 22 or newer. The
sloth-agent
command works from any directory.
Open Settings, then Developer access. Choose an expiry and copy the token once.
Use the hidden login prompt to save it in your operating system's secure credential store.
Build an assignment file, preview the payload, then add
--apply
when it is correct.
npm install --global @slothmoney/agent-cli
sloth-agent auth login
sloth-agent auth status
sloth-agent categories
sloth-agent transactions --uncategorized --limit 50
sloth-agent transactions --q "tesco" --start-date 2026-05-01 --end-date 2026-05-31
sloth-agent assign --input assignments.json
sloth-agent assign --input assignments.json --apply
sloth-agent ask-partner --transaction-ref sloth_txn_...
sloth-agent auth logout
For CI or headless systems, set
SLOTH_AGENT_TOKEN
in your secret manager. It overrides a stored credential.
auth status
makes a live request and updates the token's last-used time.
auth logout
removes the local copy only. Revoke the token in Developer
access.
Every CLI command maps to the same versioned API. Send the token as a bearer header when another tool already handles HTTP.
curl "https://budget.slothmoney.app/api/agent/v1/categories" \
-H "Authorization: Bearer $SLOTH_AGENT_TOKEN"
API reference
Every request uses
Authorization: Bearer
with a Sloth personal access token.
/api/agent/v1/categories
Returns visible categories and budget line-item options for personal and joint scopes.
/api/agent/v1/transactions
Returns booked transactions with an opaque
transactionRef. Filter by date range, search text, account, category, or
uncategorized state.
/api/agent/v1/transaction-explanation-requests
Creates a 72-hour partner clarification link for one booked partner-shared or joint transaction. The response includes a shareable message and link.
/api/agent/v1/transaction-assignments
Applies 1 to 100 category assignments. The response may contain mixed successes and failures, so agents should inspect every result.
Assignment shape
Use the
transactionRef
from the transaction response. It is the stable reference the API
needs for assignment writes.
{
"assignments": [
{
"transactionRef": "sloth_txn_...",
"categoryId": "groceries",
"lineItemId": "weekly"
}
]
}
{
"assignments": [
{
"transactionRef": "sloth_txn_...",
"categorySplits": [
{ "categoryId": "groceries", "amountPence": 1500 },
{ "categoryId": "shopping", "amountPence": 500 }
]
}
]
}
Safety
The Agent API is built for user-run automation. Treat your token like a password. Never put it in chat, source control, shared logs, or shell history. Revoke it when you are done testing.
Agent endpoints follow the same paid-access rules as the Sloth Money app.
Choose 7, 30, or 90 days when creating a personal access token in Developer access.
Reads use stored booked transactions. Agent requests do not trigger a bank refresh.
Partner clarification links last 72 hours and accept one answer. Agents receive the payload but do not send messages.
Endpoint paths are versioned, but the developer surface may change while agent workflows settle.
Create a token in Sloth Money, connect your agent, and preview the first assignment payload before writing changes.
Open Sloth Money