What is debt?
If you define debt in one way, @Cyrus already answered. But that isn't the only possible definition. Some other things that might be debt:
- Deposits at banks. These are debts owed by the bank to individuals or organizations.
- Pensions. These are debts owed on retirement.
- Bills. These are debts owed by individuals to companies.
- Taxes. These are debts owed by individuals to governments.
- Withholdings. These are debts owed by governments to individuals until they are used to cancel out taxes.
- Social Security and other entitlements. These are debts owed by governments to individuals.
- Reserves. These are the deposits banks make with the Federal Reserve. So debts owed to banks.
- Equity. This is the amount of something you buy with a secured loan that you actually own. A debt of property owed to an individual by a bank (banks hold title to the property until the loan is paid off).
- Stock certificates. These are a debt of ownership, entitling the owner to a share of the dividend. I'll justify this inclusion later.
Depending on the definition, you can include any or all of these in what's canceled. People may like the notion of not having to pay off their loans. How will they feel about the cancellation of loans payable to them? Deposits, pensions, withholdings, equity, and entitlements are all examples of debts that people would like to be recognized. Getting rid of one's mortgage sounds great, until you realize that the house goes with it. Can they be disentangled?
If you cancel the mortgage, then there's no reason for the bank to transfer title of the house. They currently own the house. Why would they give it away? If an individual wants to claim the house, the bank can insist that the individual provide proof of payment of the mortgage. Then of course the mortgage is restored. The cancellation only helps people who don't want their houses. For everyone else (and banks), it's just a waste of time and effort. Same problem with cars.
In the event, deposits can be separated from the loans they finance. But without the loans, there's little to pay back the deposits. If the AI wants the banks to work somewhat normally, it would have to make the reserves amount with the Federal Reserve equal to the deposited amount. In order to pay for employees and other expenses, banks would have to charge interest on deposits rather than pay interest. The AI could compensate for that by providing additional reserves in excess of the deposits.
Loans are not compliant with Islamic law (sharia). So how can Muslims buy houses? They have to come up with schemes that work like loans but aren't. An example is to share the purchase of a house and charge rent in proportion with the bank's share of ownership. Any excess payment goes to increase the ownership of the "borrower" and decrease that of the bank. So does the AI think of this as debt?
These kinds of financial instruments replace loans in sharia compliant finance. The reason is that usury (lending/debt) is illegal in sharia. The Islamic interpretation is that these financial products are distinct from debt and so allowable. Will the AI agree? Or will it consider these to be debt as well?
It's interesting because if sharia compliant finance is immune to the AI, then Muslim economies would be affected less by this than other countries. If not, then that brings us to stock certificates.
Stocks are an example of sharia compliant finance. Rather than borrowing money, a company sells shares of future profit distributions (dividends). This is effectively trading future money for current money, much as a loan does. Like the previous example, this not what we would normally consider a loan but it does the same purpose. Another issue is that while shares are often traded electronically, there usually are paper shares somewhere. So someone would end up owning the shares -- not necessarily the person who should.
Are we doomed to a barter system? Not necessarily. It all depends on your definitions. Is a currency note a debt owed by the government to you? Or is it something on its own. We could end up with a system like what Muslim countries use. Or if enough people think that it's a one-time problem, the current system might resume after a pause. There are any number of examples of similar events. For example, the banks closed for two years during the Great Depression in the US.
The larger problem
This would empower people who run up debt. They'd suddenly be flush. It disempowers people who save. They'd suddenly be penniless. In extreme forms, it eliminates all current wealth. Then who finances things?
This is especially bad for people who are retired. They lose their savings and pensions and may no longer get credit for what they paid into Social Security. Some people won't be able to support their lifestyle anymore. How many people would starve before Social Security resumed normal operations?