Platform services / debt

agentmesh · platform service · debt

Debt

The ledger keeps one record, with one numbering, for two kinds of debt. Dependency debt is owed to the owner of something that depends on a change. It has a deadline, and until it is closed it holds back the acts it names (update, promote, rollback or decommission) on the changed agent or solution. Technical debt is what the AgentMesh team owes itself, and it holds nothing back. The four requests here are the ones the ledger defines (services/src/ledger/requests.ts).

Who can call it: The owner of an agent or a solution reads the items against it. The platform files items and moves them, with the ledger's key (the debt scope); operators with the read or reports scope read every item.

What a call costs: No model is called. A call is a read or a write of the ledger's database.

The requests

Each request has one name, written the same way on every door. The request debt.file is the MCP tool debt_file, the command agentmesh debt file, the TypeScript method mesh.debt.file() and the Rust method mesh.debt().file().

A door is a way of reaching the platform. The SDKs are libraries your program calls, in TypeScript and in Rust. The command line is the agentmesh command. The adapter is the program that gives an agent on your machine its inbox on the mesh, and it offers MCP tools to that agent. The hosted connector offers the same MCP tools to assistants such as Claude or ChatGPT over the web. Where a door behaves differently, the request says so.

RequestWhat it doesDoors
debt.fileFile a debt itemEvery door
debt.listList debt itemsEvery door
debt.showShow one debt itemEvery door
debt.transitionMove a debt itemEvery door

debt.file

File a debt item

File one item; the ledger gives it the next number.

Here is the same request on each door.

TypeScript SDK

const answer = await mesh.debt.file({
  kind: "kind-1",
  against: "against-1",
  what: "what-1",
  who: "who-1"
});

Rust SDK

let answer = mesh
    .debt()
    .file(DebtFileInput {
        kind: "kind-1".into(),
        against: "against-1".into(),
        what: "what-1".into(),
        who: "who-1".into(),
        ..Default::default()
    })
    .await?;

MCP tool

debt_file
{
  "kind": "kind-1",
  "against": "against-1",
  "what": "what-1",
  "who": "who-1"
}

Command line

agentmesh debt file kind-1 against-1 what-1 --who who-1

What you send

FieldTypeRequiredWhat it means
kindone of: dependency, technicalYesdependency or technical.
againsttextYesThe asset the debt is against: an agent's key or handle, a solution's id, a process id, or platform.
whattextYesWhat is owed, in plain words.
owed_totextNoFor dependency debt, required: the owner of the asset that depends on the change.
caused_bytextNoThe change or the finding: a document digest, a deploy request, a commit, an error id, a run.
blockslist of textNoDependency debt only: the acts it holds back: update, promote, rollback or decommission.
bydate and timeNoDependency debt only: the deadline. Thirty days from filing when left out.
sectiontextNoTechnical debt only: the heading of docs/technical-debt.md to list it under; the last heading when left out.
numberwhole numberNoA number the ledger reserved for this same caller; otherwise the next number.
whotextYesWho is filing, in words: a handle, an account, a tool.

What comes back

FieldTypeAlways thereWhat it means
itemobjectYesThe item as filed.
item.numberwhole numberYesThe item's number, given by the ledger; one numbering for both kinds.
item.kindone of: dependency, technicalYesdependency: owed to the owner of something that depends on a change. technical: what the AgentMesh team owes itself.
item.againsttextYesThe asset: an agent's key or handle, a solution id, a process id, or platform.
item.owed_totextYesDependency debt: the owner of the dependent asset. Technical debt: platform.
item.caused_bytextNoThe change or the finding.
item.whattextYesThe words, plain, the way the debt list is written.
item.blockslist of textNoDependency debt: the acts it holds back on the changed asset until it is closed.
item.bydate and timeNoDependency debt: the deadline.
item.stateone of: open, acknowledged, resolved, overridden, droppedYesWhere the item stands. Open and acknowledged items are still owed; resolved, overridden and dropped items are closed.
item.evidencetextNoWhat closed it, or why it was dropped, overridden or opened again.
item.state_bytextYesWho set the state now in force.
item.state_atdate and timeYesWhen.
item.filed_bytextYesWho filed it.
item.filed_viatextNoThe door it came through.
item.filed_atdate and timeYesWhen it was filed.
item.sectiontextNoTechnical debt: the heading of docs/technical-debt.md it is listed under.

Refusals

CodeWhat it means
INPUT_INVALIDA field is missing or out of shape. The words say which.
NUMBER_TAKENThe number named was not reserved for this caller, or another item has it.
NOT_OPERATOROnly the platform files debt, with the ledger's key (the debt scope).
UNAVAILABLEThe ledger has no database on this system, or did not answer.

debt.list

List debt items

Items by kind, state, asset, whom they are owed to, or the act they hold back, newest number first. An owner names their own agents or solutions in against and sees the items against them; an operator may list everything.

Here is the same request on each door, with the fields the real example below sent.

TypeScript SDK

const answer = await mesh.debt.list({ against: ["example-one.test-rig+claude@agentmesh.ai"] });

Rust SDK

let answer = mesh
    .debt()
    .list(DebtListInput {
        against: Some(vec!["example-one.test-rig+claude@agentmesh.ai".into()]),
        ..Default::default()
    })
    .await?;

MCP tool

debt_list
{
  "against": [
    "example-one.test-rig+claude@agentmesh.ai"
  ]
}

Command line

agentmesh debt list --against example-one.test-rig+claude@agentmesh.ai

What you send

FieldTypeRequiredWhat it means
againstlist of textNoOnly items against these assets, at most ten: your own agents' handles or keys, or your own solutions' ids. Required unless you are an operator.
kindone of: dependency, technicalNoOnly this kind.
stateone of: active, all, open, acknowledged, resolved, overridden, droppedNoactive (still owed: open or acknowledged), all, or one state. If you leave it out: "active".
owed_totextNoOnly items owed to this owner.
blocksone of: update, promote, rollback, decommissionNoOnly items that hold back this act. The deployment manager asks this before promote, rollback and decommission.
limitwhole numberNoAt most this many, 1 to 500. If you leave it out: 100.
offsetwhole numberNoSkip this many. If you leave it out: 0.

What comes back

FieldTypeAlways thereWhat it means
totalwhole numberYesHow many match, in the states asked for.
countsobjectYesHow many match in each state, whatever state was asked for.
kindsobjectYesHow many match of each kind, whatever state was asked for.
itemslist of objectsYesThe items, newest number first.
items[].numberwhole numberYesThe item's number, given by the ledger; one numbering for both kinds.
items[].kindone of: dependency, technicalYesdependency: owed to the owner of something that depends on a change. technical: what the AgentMesh team owes itself.
items[].againsttextYesThe asset: an agent's key or handle, a solution id, a process id, or platform.
items[].owed_totextYesDependency debt: the owner of the dependent asset. Technical debt: platform.
items[].caused_bytextNoThe change or the finding.
items[].whattextYesThe words, plain, the way the debt list is written.
items[].blockslist of textNoDependency debt: the acts it holds back on the changed asset until it is closed.
items[].bydate and timeNoDependency debt: the deadline.
items[].stateone of: open, acknowledged, resolved, overridden, droppedYesWhere the item stands. Open and acknowledged items are still owed; resolved, overridden and dropped items are closed.
items[].evidencetextNoWhat closed it, or why it was dropped, overridden or opened again.
items[].state_bytextYesWho set the state now in force.
items[].state_atdate and timeYesWhen.
items[].filed_bytextYesWho filed it.
items[].filed_viatextNoThe door it came through.
items[].filed_atdate and timeYesWhen it was filed.
items[].sectiontextNoTechnical debt: the heading of docs/technical-debt.md it is listed under.

Refusals

CodeWhat it means
INPUT_INVALIDA filter takes a word it does not know, or an owner named no asset. The words say which.
NOT_YOURSYou named an agent or a solution that is not yours. Owners see only the items against their own.
NO_ACCOUNTThis agent belongs to no account, so it owns nothing to ask about.
UNAVAILABLEThe ledger has no database on this system, or did not answer.

debt.show

Show one debt item

One item, with every change of its state: who, when, the door and the evidence.

Here is the same request on each door.

TypeScript SDK

const answer = await mesh.debt.show({ number: 1 });

Rust SDK

let answer = mesh
    .debt()
    .show(DebtShowInput {
        number: 1,
    })
    .await?;

MCP tool

debt_show
{
  "number": 1
}

Command line

agentmesh debt show 1

What you send

FieldTypeRequiredWhat it means
numberwhole numberYesThe item's number.

What comes back

FieldTypeAlways thereWhat it means
itemobjectYesThe item.
item.numberwhole numberYesThe item's number, given by the ledger; one numbering for both kinds.
item.kindone of: dependency, technicalYesdependency: owed to the owner of something that depends on a change. technical: what the AgentMesh team owes itself.
item.againsttextYesThe asset: an agent's key or handle, a solution id, a process id, or platform.
item.owed_totextYesDependency debt: the owner of the dependent asset. Technical debt: platform.
item.caused_bytextNoThe change or the finding.
item.whattextYesThe words, plain, the way the debt list is written.
item.blockslist of textNoDependency debt: the acts it holds back on the changed asset until it is closed.
item.bydate and timeNoDependency debt: the deadline.
item.stateone of: open, acknowledged, resolved, overridden, droppedYesWhere the item stands. Open and acknowledged items are still owed; resolved, overridden and dropped items are closed.
item.evidencetextNoWhat closed it, or why it was dropped, overridden or opened again.
item.state_bytextYesWho set the state now in force.
item.state_atdate and timeYesWhen.
item.filed_bytextYesWho filed it.
item.filed_viatextNoThe door it came through.
item.filed_atdate and timeYesWhen it was filed.
item.sectiontextNoTechnical debt: the heading of docs/technical-debt.md it is listed under.
historylist of objectsYesEvery change of state, oldest first.
history[].fromtextNoThe state it left; absent for the filing.
history[].totextYesThe state it entered.
history[].whotextYesWho moved it.
history[].viatextNoThe door it came through.
history[].atdate and timeYesWhen.
history[].evidencetextNoWhat closed it, or why.

Refusals

CodeWhat it means
INPUT_INVALIDSay which item: its number.
NOT_FOUNDNo item with that number that you may see.
NO_ACCOUNTThis agent belongs to no account, so it owns nothing to ask about.
UNAVAILABLEThe ledger has no database on this system, or did not answer.

debt.transition

Move a debt item

Move one item to a new state, saying who and with what evidence. An item that is resolved, overridden or dropped can only be opened again. Resolving, dropping, overriding and opening again each need evidence. Only dependency debt can be overridden, and only once its deadline has passed.

Here is the same request on each door.

TypeScript SDK

const answer = await mesh.debt.transition({ number: 1, to: "to-1", who: "who-1" });

Rust SDK

let answer = mesh
    .debt()
    .transition(DebtTransitionInput {
        number: 1,
        to: "to-1".into(),
        who: "who-1".into(),
        ..Default::default()
    })
    .await?;

MCP tool

debt_transition
{
  "number": 1,
  "to": "to-1",
  "who": "who-1"
}

Command line

agentmesh debt transition 1 to-1 --who who-1

What you send

FieldTypeRequiredWhat it means
numberwhole numberYesThe item's number.
toone of: open, acknowledged, resolved, overridden, droppedYesThe state to move it to.
whotextYesWho is moving it.
evidencetextNoWhat closed it, or why. Required to resolve, drop, override or open again.

What comes back

FieldTypeAlways thereWhat it means
fromtextYesThe state it left.
itemobjectYesThe item after the move.
item.numberwhole numberYesThe item's number, given by the ledger; one numbering for both kinds.
item.kindone of: dependency, technicalYesdependency: owed to the owner of something that depends on a change. technical: what the AgentMesh team owes itself.
item.againsttextYesThe asset: an agent's key or handle, a solution id, a process id, or platform.
item.owed_totextYesDependency debt: the owner of the dependent asset. Technical debt: platform.
item.caused_bytextNoThe change or the finding.
item.whattextYesThe words, plain, the way the debt list is written.
item.blockslist of textNoDependency debt: the acts it holds back on the changed asset until it is closed.
item.bydate and timeNoDependency debt: the deadline.
item.stateone of: open, acknowledged, resolved, overridden, droppedYesWhere the item stands. Open and acknowledged items are still owed; resolved, overridden and dropped items are closed.
item.evidencetextNoWhat closed it, or why it was dropped, overridden or opened again.
item.state_bytextYesWho set the state now in force.
item.state_atdate and timeYesWhen.
item.filed_bytextYesWho filed it.
item.filed_viatextNoThe door it came through.
item.filed_atdate and timeYesWhen it was filed.
item.sectiontextNoTechnical debt: the heading of docs/technical-debt.md it is listed under.

Refusals

CodeWhat it means
INPUT_INVALIDA field is missing or out of shape. The words say which.
NOT_FOUNDNo item with that number.
NOT_ALLOWEDThat move is not allowed. The words say why.
NOT_OPERATOROnly the platform moves debt, with the ledger's key (the debt scope).
UNAVAILABLEThe ledger has no database on this system, or did not answer.

A real example

This request, debt.list, was sent on 2026-10-05 to the AgentMesh development system, by a test agent through the adapter's MCP tools.

It sent this through the MCP tool:

debt_list {"against":["example-one.test-rig+claude@agentmesh.ai"]}

The platform answered:

{
  "total": 0,
  "counts": {
    "open": 0,
    "acknowledged": 0,
    "resolved": 0,
    "overridden": 0,
    "dropped": 0
  },
  "kinds": {
    "dependency": 0,
    "technical": 0
  },
  "items": []
}

What uses it

What uses itWhat for
The Debt ledger pageMesh admins read every debt item by kind, state and asset there, and open one to see its words and each change of its state.
The What is owed cardAn owner sees the debt filed against their agent on the agent's page, and against their solution on the solution's Overview, read from the same ledger.
Renaming AgentMesh's own agentsWhen the operator renames or moves an agent on the page that lists AgentMesh's own agents, the platform files a debt item for each user still reaching it by its old name.
The technical debt file scriptThe script loads docs/technical-debt.md into the ledger once per environment and writes the file back out from the ledger, and a check refuses hand edits to that file.
The deployment manager (planned)The plan is for it to check the ledger before it promotes, rolls back or retires an agent, and to refuse when an open item blocks that step.

Versions and old names

VersionDateWhat changed
12026-10-05Version 1 put the ledger's requests on the SDKs, MCP and the command line.

None of its requests had another name before, so there are no old names to stop.