npm install --global @slothmoney/agent-cli
sloth-agent auth login
sloth-agent auth status
sloth-agent accounts
sloth-agent goals
sloth-agent goals create --name "Emergency fund" --target-amount 12000 --target-month 2027-06 --type keep --account-ref PASTE_THE_EXACT_ACCOUNT_REF_HERE
sloth-agent goals create --name "Emergency fund" --target-amount 12000 --target-month 2027-06 --type keep --account-ref PASTE_THE_EXACT_ACCOUNT_REF_HERE --apply
sloth-agent goals update --goal-id GOAL_ID --type spend
sloth-agent goals update --goal-id GOAL_ID --type spend --apply
sloth-agent goals update --goal-id GOAL_ID --account-ref PASTE_THE_EXACT_ACCOUNT_REF_HERE
sloth-agent goals update --goal-id GOAL_ID --account-ref PASTE_THE_EXACT_ACCOUNT_REF_HERE --apply
sloth-agent goals update --goal-id GOAL_ID --priority 2
sloth-agent goals update --goal-id GOAL_ID --priority 2 --apply
sloth-agent goals mark-spent --goal-id GOAL_ID
sloth-agent goals mark-spent --goal-id GOAL_ID --apply
sloth-agent goals restore --goal-id GOAL_ID
sloth-agent goals restore --goal-id GOAL_ID --apply
sloth-agent goals delete --goal-id GOAL_ID
sloth-agent goals delete --goal-id GOAL_ID --apply
Goal creates require a positive target amount, an explicit Keep
or Spend type, and one personal Goal-funding account. Goal
results include
goalType and nullable spentAt. Keep
goals cannot be marked spent. Restore a spent goal before
changing its type.
Goal priority is one-based, so 1 is highest. Moving one goal
shifts the intervening goals automatically. Without
--apply, goal creation authenticates and asks Sloth
to calculate forecastMonthKey without saving the
Goal. Applying reruns the same planner before saving.
targetMonthKey is your optional desired month.
forecastMonthKey is Sloth’s calculated month. Only
the active scenario is calculated. A null
forecastMonthKey means Sloth did not find a month
within the projection boundary; check
projectionThroughMonthKey for the final month
tested.
sloth-agent scenarios
sloth-agent scenarios create --month 2026-09 --name "Deposit £100 into the shopping pot each month?" --account-ref PASTE_THE_EXACT_ACCOUNT_REF_HERE --recurring-amount 100
sloth-agent scenarios create --month 2026-09 --name "Add a £50 bonus?" --account-ref PASTE_THE_EXACT_ACCOUNT_REF_HERE --one-off-amount 50 --apply
sloth-agent scenarios update --month 2026-09 --option-id yes --account-ref PASTE_THE_EXACT_ACCOUNT_REF_HERE --recurring-amount 125
sloth-agent scenarios update --month 2026-09 --option-id yes --account-ref PASTE_THE_EXACT_ACCOUNT_REF_HERE --clear-recurring --apply
sloth-agent scenarios activate --month 2026-09 --option-id no --apply
sloth-agent scenarios delete --month 2026-09 --apply
A scenario is a month-anchored choice in the Goal forecast.
Creating one adds No and Yes options and activates Yes. A
recurring contribution continues until a later active scenario
changes it. A one-off contribution applies only in that month.
Scenarios change the forecast. They do not move money.
Scenario previews use view-only access and perform zero
writes. They return the proposed scenario and recalculated
Goals. Add
--apply only after reviewing that result. On
update, --recurring-amount 0 stops the earlier
amount, while --clear-recurring inherits the
earlier amount. Contribution changes use the active option
when --option-id is omitted.
sloth-agent budget --scope personal --period 2026-08
sloth-agent budget status --scope personal
sloth-agent budget status --scope personal --period 2026-07
sloth-agent budget update --scope personal --period 2026-08 --input budget.json
sloth-agent budget update --scope personal --period 2026-08 --input budget.json --apply
sloth-agent budget move --scope personal --from-category-id activities --to-category-id groceries --amount 52.95
sloth-agent budget move --scope personal --from-category-id activities --to-category-id groceries --amount 52.95 --apply
Budget status is read-only. Omit --period for the
current Sloth budget period, or pass YYYY-MM for a historical
period. Each activity row has nonnegative
moneyInPence and moneyOutPence, plus
their difference as netPence.
Current status uses Sloth's normal transaction refresh policy.
Historical budget status is cache-only and returns refresh as
null. Income, Transfer, and explicit None are normal activity
rows. A transaction with no category appears under
activity.uncategorized. budget is null
when no trustworthy plan exists, but activity still returns.
When an eligible current-period refresh completes, Sloth adds
the latest configured backing-account check to your Budget
balance audit. A same-day cached read does not add another
checkpoint.
A budget update file contains 1 to 100 unique allocations. Each
one identifies an existing category and line item and sets its
whole-number plannedPence.
{
"allocations": [
{
"categoryId": "groceries",
"lineItemId": "weekly",
"plannedPence": 45000
}
]
}
Budget previews validate the file locally without loading a
token or contacting Sloth Money. Applying starts from the full
selected-period budget and patches the listed amounts. Saving X
overwrites X and every explicit future plan. A later save from Y
overwrites Y and everything after it. Earlier and historical
periods stay unchanged.
budget move transfers current assigned money
between categories. Use to-assign as either the
source or destination to include To Assign. The decimal digits
are converted exactly to positive safe-integer pence. A preview
does not load a token or contact Sloth Money.
Applying records the movement and updates both balances in one
operation. It does not change planned amounts or future budget
plans. The source can become negative, so automated workflows
should choose donors from an available-balance policy.
sloth-agent categories
sloth-agent categories create --name "Holidays" --icon-key plane --type Wants
sloth-agent categories create --name "Holidays" --icon-key plane --type Wants --apply
sloth-agent categories rename --category-id CATEGORY_ID --name "Travel fund" --apply
sloth-agent line-items create --scope personal --category-id CATEGORY_ID --name "Flights" --apply
sloth-agent line-items rename --scope personal --category-id CATEGORY_ID --line-item-id LINE_ITEM_ID --name "Travel" --apply
sloth-agent transactions --assignment-scope personal --uncategorized --limit 50
sloth-agent transactions --assignment-scope joint --uncategorized --limit 50
sloth-agent transactions --include-pending
sloth-agent partner status
Review pending and partner payments
--include-pending reuses the transaction command's
normal refresh; it does not force another refresh. Booked rows
stay under transactions. Pending rows appear in a
separate pending block with
writable: false and
writeBlockReason: pending, so they cannot be
categorised until they book. Sloth Money keeps the latest
complete pending observation so the same result remains
available to a later daily review without another bank refresh.
A current empty list means no matching pending rows were
observed. An unavailable snapshot does not prove
there are none.
partner status is read-only. It returns the current
settlement direction and amount plus recent recorded partner
payments, which lets an agent reconcile an incoming payment
without guessing from the bank counterparty alone. It does not
refresh bank accounts or change partner records.
Copy the exact transactionRef for the transaction
and the matching categoryId and
lineItemId from these outputs into
assignments.json. Choose the most specific suitable
line item. If none fits, use that category's
Other line item. Historical assignments without a
line item are not a recommendation to omit one.
{
"assignments": [
{
"transactionRef": "PASTE_THE_EXACT_TRANSACTION_REF_HERE",
"assignmentScope": "personal",
"categoryId": "PASTE_A_CATEGORY_ID_HERE",
"lineItemId": "PASTE_A_LINE_ITEM_ID_HERE"
}
]
}
These are placeholders. Do not submit the example values.
Preview the file
sloth-agent assign --input assignments.json
Without --apply, the CLI checks that the file is
valid and returns the payload it would send. It does not contact
Sloth Money, verify the transactionRef or category
values, or write anything. A successful preview does not
guarantee that applying the assignment will succeed.
Apply the assignment
sloth-agent assign --input assignments.json --apply
Applying 1 to 100 assignments creates a durable operation and
returns a receipt promptly. The CLI polls the authenticated
status endpoint for you. If the command is interrupted, rerun
the same command with the same input file to recover the
operation. The command stays
sloth-agent assign --input assignments.json --apply
and its final output stays succeeded and
failed. Completed item results stay in the same
order as the input file. Inspect every result.
Each transactionRef can appear only once in a file.
Duplicate refs reject the whole submission before anything is
written.
Check the result
Check the result in the same assignment scope that you changed.
Successful assignments update the original transaction. See the
category in Sloth Money → Transactions, or
re-run the original transaction query without
--uncategorized. The transaction should also
disappear from the matching uncategorized query. Confirm that an
existing assignment in the other scope was not changed.
Assignments do not create a separate list.
sloth-agent transactions --assignment-scope personal --limit 50
Filter one account
sloth-agent accounts
sloth-agent transactions --account-ref PASTE_THE_EXACT_ACCOUNT_REF_HERE --limit 50
Every transaction result includes the same
accountRef used by
sloth-agent accounts. Copy the exact opaque value
into --account-ref to keep later pages and reads on
that account. accountRef is the public account
filter for CLI and HTTP transaction reads.
Watch a payment
Rules watch future payments that match an existing transaction.
They do not create transactions or recurring predictions.
{
"amountChange": {
"enabled": true,
"comparison": "increase",
"baselinePence": 3184
},
"renewalReminder": {
"enabled": true,
"renewalDate": "2027-07-30",
"leadDays": 30
},
"delivery": { "email": true }
}
baselinePence is the comparison amount.
renewalDate uses YYYY-MM-DD, and
leadDays accepts an integer from 1 to 365. In-app
delivery is always on. Set delivery.email to add
email delivery. Returned rules include the computed
remindOn date.
Save this as rule.json. Copy the exact
transactionRef from
sloth-agent transactions, then preview and apply
the rule:
sloth-agent rules list
sloth-agent rules get --transaction-ref PASTE_THE_EXACT_TRANSACTION_REF_HERE
sloth-agent rules set --transaction-ref PASTE_THE_EXACT_TRANSACTION_REF_HERE --input rule.json
sloth-agent rules set --transaction-ref PASTE_THE_EXACT_TRANSACTION_REF_HERE --input rule.json --apply
sloth-agent rules delete --transaction-ref PASTE_THE_EXACT_TRANSACTION_REF_HERE
sloth-agent rules delete --transaction-ref PASTE_THE_EXACT_TRANSACTION_REF_HERE --apply
Without --apply, rules set validates
the file locally without loading a token or contacting Sloth
Money.
sloth-agent rules scan-contract --contract contract.pdf
sloth-agent rules scan-contract --contract contract.pdf --apply
A contract must be a PDF no larger than 6 MB. Without
--apply, it stays on your device. With
--apply, Sloth sends it for one-time extraction.
Scanning returns a renewalDate and confidence. It
does not save a rule. renewalDate is null when
Sloth cannot find a date in the PDF. The PDF is discarded after
extraction and is not stored.
Attach receipt items
sloth-agent receipts extract --image /path/to/receipt.jpg > receipt-draft.json
sloth-agent receipts attach --transaction-ref PASTE_THE_EXACT_TRANSACTION_REF_HERE --input receipt.json
sloth-agent receipts attach --transaction-ref PASTE_THE_EXACT_TRANSACTION_REF_HERE --input receipt.json --apply
sloth-agent receipts get --transaction-ref PASTE_THE_EXACT_TRANSACTION_REF_HERE
sloth-agent receipts remove --transaction-ref PASTE_THE_EXACT_TRANSACTION_REF_HERE --revision 1 --apply
Extraction accepts one JPEG, PNG, or WebP image up to 8 MB and
returns a draft. Sloth does not save the image or the draft.
Review every receipt item, then keep only
schemaVersion, currency, and
receiptItems in the attach file. Each receipt item
contains only an id, label, and signed amount in pence. Use a
positive amount for a purchase or charge and a negative amount
for a discount. Leave out subtotals, payment, change, and VAT
already included in the item prices so they are not counted
twice.
Attach previews are local and do not load a token or contact
Sloth Money until you add --apply. Confirmed
receipt items are evidence only. They do not change the
transaction's category, sharing, partner balance, or budget
treatment. Use the saved revision when replacing or removing
evidence so an older edit cannot overwrite a newer one.
Share and categorise
sloth-agent transactions --shared=false --q "sainsbury" --limit 20
{
"assignments": [
{
"transactionRef": "PASTE_THE_EXACT_TRANSACTION_REF_HERE",
"sharing": {
"isShared": true,
"shareRatio": 0.6,
"userExclusiveAmountPence": 500,
"partnerExclusiveAmountPence": 0
},
"assignmentScope": "joint",
"categoryId": "groceries"
}
]
}
sharing.isShared is required. The optional
shareRatio is your share, from 0 to 1. Exclusive
amounts use userExclusiveAmountPence and
partnerExclusiveAmountPence as nonnegative integer
pence. Preview stays local and does not load a token. Apply with
--apply, then read the saved result with
--shared=true.
A first share uses your saved couple ratio, falling back to 0.5,
and zero exclusive amounts when split fields are omitted. On an
existing share, omitted split fields keep their saved values. A
combined category uses Joint when you have no exclusive amount
and Personal when you do, unless you set
assignmentScope explicitly.
Send { "isShared": false } without split fields to
unshare. Sloth keeps the Joint category dormant for a later
re-share. Only your booked personal-account transactions can be
changed. Partner-owned and native joint-account transactions
remain read-only. Foreign-currency sharing remains available for
settlement but is not included in the Joint budget.
Other commands
sloth-agent transactions --assignment-scope joint --line-item-id LINE_ITEM_ID
sloth-agent transactions --assignment-scope joint --uncategorized
sloth-agent ask-partner --transaction-ref PASTE_THE_EXACT_TRANSACTION_REF_HERE
sloth-agent auth logout
The transaction reference shown above is also a placeholder.
Copy the exact value from
sloth-agent transactions output.
For CI or headless systems, set
SLOTH_AGENT_TOKEN
in your secret manager. It overrides a stored credential.
auth logout removes only the local copy; revoke the
token in Developer access.