Platform services / debt
agentmesh · platform service · debtDebt
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.
| Request | What it does | Doors |
|---|---|---|
debt.file | File a debt item | Every door |
debt.list | List debt items | Every door |
debt.show | Show one debt item | Every door |
debt.transition | Move a debt item | Every 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
| Field | Type | Required | What it means |
|---|---|---|---|
kind | one of: dependency, technical | Yes | dependency or technical. |
against | text | Yes | The asset the debt is against: an agent's key or handle, a solution's id, a process id, or platform. |
what | text | Yes | What is owed, in plain words. |
owed_to | text | No | For dependency debt, required: the owner of the asset that depends on the change. |
caused_by | text | No | The change or the finding: a document digest, a deploy request, a commit, an error id, a run. |
blocks | list of text | No | Dependency debt only: the acts it holds back: update, promote, rollback or decommission. |
by | date and time | No | Dependency debt only: the deadline. Thirty days from filing when left out. |
section | text | No | Technical debt only: the heading of docs/technical-debt.md to list it under; the last heading when left out. |
number | whole number | No | A number the ledger reserved for this same caller; otherwise the next number. |
who | text | Yes | Who is filing, in words: a handle, an account, a tool. |
What comes back
| Field | Type | Always there | What it means |
|---|---|---|---|
item | object | Yes | The item as filed. |
item.number | whole number | Yes | The item's number, given by the ledger; one numbering for both kinds. |
item.kind | one of: dependency, technical | Yes | dependency: owed to the owner of something that depends on a change. technical: what the AgentMesh team owes itself. |
item.against | text | Yes | The asset: an agent's key or handle, a solution id, a process id, or platform. |
item.owed_to | text | Yes | Dependency debt: the owner of the dependent asset. Technical debt: platform. |
item.caused_by | text | No | The change or the finding. |
item.what | text | Yes | The words, plain, the way the debt list is written. |
item.blocks | list of text | No | Dependency debt: the acts it holds back on the changed asset until it is closed. |
item.by | date and time | No | Dependency debt: the deadline. |
item.state | one of: open, acknowledged, resolved, overridden, dropped | Yes | Where the item stands. Open and acknowledged items are still owed; resolved, overridden and dropped items are closed. |
item.evidence | text | No | What closed it, or why it was dropped, overridden or opened again. |
item.state_by | text | Yes | Who set the state now in force. |
item.state_at | date and time | Yes | When. |
item.filed_by | text | Yes | Who filed it. |
item.filed_via | text | No | The door it came through. |
item.filed_at | date and time | Yes | When it was filed. |
item.section | text | No | Technical debt: the heading of docs/technical-debt.md it is listed under. |
Refusals
| Code | What it means |
|---|---|
INPUT_INVALID | A field is missing or out of shape. The words say which. |
NUMBER_TAKEN | The number named was not reserved for this caller, or another item has it. |
NOT_OPERATOR | Only the platform files debt, with the ledger's key (the debt scope). |
UNAVAILABLE | The 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
| Field | Type | Required | What it means |
|---|---|---|---|
against | list of text | No | Only items against these assets, at most ten: your own agents' handles or keys, or your own solutions' ids. Required unless you are an operator. |
kind | one of: dependency, technical | No | Only this kind. |
state | one of: active, all, open, acknowledged, resolved, overridden, dropped | No | active (still owed: open or acknowledged), all, or one state. If you leave it out: "active". |
owed_to | text | No | Only items owed to this owner. |
blocks | one of: update, promote, rollback, decommission | No | Only items that hold back this act. The deployment manager asks this before promote, rollback and decommission. |
limit | whole number | No | At most this many, 1 to 500. If you leave it out: 100. |
offset | whole number | No | Skip this many. If you leave it out: 0. |
What comes back
| Field | Type | Always there | What it means |
|---|---|---|---|
total | whole number | Yes | How many match, in the states asked for. |
counts | object | Yes | How many match in each state, whatever state was asked for. |
kinds | object | Yes | How many match of each kind, whatever state was asked for. |
items | list of objects | Yes | The items, newest number first. |
items[].number | whole number | Yes | The item's number, given by the ledger; one numbering for both kinds. |
items[].kind | one of: dependency, technical | Yes | dependency: owed to the owner of something that depends on a change. technical: what the AgentMesh team owes itself. |
items[].against | text | Yes | The asset: an agent's key or handle, a solution id, a process id, or platform. |
items[].owed_to | text | Yes | Dependency debt: the owner of the dependent asset. Technical debt: platform. |
items[].caused_by | text | No | The change or the finding. |
items[].what | text | Yes | The words, plain, the way the debt list is written. |
items[].blocks | list of text | No | Dependency debt: the acts it holds back on the changed asset until it is closed. |
items[].by | date and time | No | Dependency debt: the deadline. |
items[].state | one of: open, acknowledged, resolved, overridden, dropped | Yes | Where the item stands. Open and acknowledged items are still owed; resolved, overridden and dropped items are closed. |
items[].evidence | text | No | What closed it, or why it was dropped, overridden or opened again. |
items[].state_by | text | Yes | Who set the state now in force. |
items[].state_at | date and time | Yes | When. |
items[].filed_by | text | Yes | Who filed it. |
items[].filed_via | text | No | The door it came through. |
items[].filed_at | date and time | Yes | When it was filed. |
items[].section | text | No | Technical debt: the heading of docs/technical-debt.md it is listed under. |
Refusals
| Code | What it means |
|---|---|
INPUT_INVALID | A filter takes a word it does not know, or an owner named no asset. The words say which. |
NOT_YOURS | You named an agent or a solution that is not yours. Owners see only the items against their own. |
NO_ACCOUNT | This agent belongs to no account, so it owns nothing to ask about. |
UNAVAILABLE | The 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
| Field | Type | Required | What it means |
|---|---|---|---|
number | whole number | Yes | The item's number. |
What comes back
| Field | Type | Always there | What it means |
|---|---|---|---|
item | object | Yes | The item. |
item.number | whole number | Yes | The item's number, given by the ledger; one numbering for both kinds. |
item.kind | one of: dependency, technical | Yes | dependency: owed to the owner of something that depends on a change. technical: what the AgentMesh team owes itself. |
item.against | text | Yes | The asset: an agent's key or handle, a solution id, a process id, or platform. |
item.owed_to | text | Yes | Dependency debt: the owner of the dependent asset. Technical debt: platform. |
item.caused_by | text | No | The change or the finding. |
item.what | text | Yes | The words, plain, the way the debt list is written. |
item.blocks | list of text | No | Dependency debt: the acts it holds back on the changed asset until it is closed. |
item.by | date and time | No | Dependency debt: the deadline. |
item.state | one of: open, acknowledged, resolved, overridden, dropped | Yes | Where the item stands. Open and acknowledged items are still owed; resolved, overridden and dropped items are closed. |
item.evidence | text | No | What closed it, or why it was dropped, overridden or opened again. |
item.state_by | text | Yes | Who set the state now in force. |
item.state_at | date and time | Yes | When. |
item.filed_by | text | Yes | Who filed it. |
item.filed_via | text | No | The door it came through. |
item.filed_at | date and time | Yes | When it was filed. |
item.section | text | No | Technical debt: the heading of docs/technical-debt.md it is listed under. |
history | list of objects | Yes | Every change of state, oldest first. |
history[].from | text | No | The state it left; absent for the filing. |
history[].to | text | Yes | The state it entered. |
history[].who | text | Yes | Who moved it. |
history[].via | text | No | The door it came through. |
history[].at | date and time | Yes | When. |
history[].evidence | text | No | What closed it, or why. |
Refusals
| Code | What it means |
|---|---|
INPUT_INVALID | Say which item: its number. |
NOT_FOUND | No item with that number that you may see. |
NO_ACCOUNT | This agent belongs to no account, so it owns nothing to ask about. |
UNAVAILABLE | The 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
| Field | Type | Required | What it means |
|---|---|---|---|
number | whole number | Yes | The item's number. |
to | one of: open, acknowledged, resolved, overridden, dropped | Yes | The state to move it to. |
who | text | Yes | Who is moving it. |
evidence | text | No | What closed it, or why. Required to resolve, drop, override or open again. |
What comes back
| Field | Type | Always there | What it means |
|---|---|---|---|
from | text | Yes | The state it left. |
item | object | Yes | The item after the move. |
item.number | whole number | Yes | The item's number, given by the ledger; one numbering for both kinds. |
item.kind | one of: dependency, technical | Yes | dependency: owed to the owner of something that depends on a change. technical: what the AgentMesh team owes itself. |
item.against | text | Yes | The asset: an agent's key or handle, a solution id, a process id, or platform. |
item.owed_to | text | Yes | Dependency debt: the owner of the dependent asset. Technical debt: platform. |
item.caused_by | text | No | The change or the finding. |
item.what | text | Yes | The words, plain, the way the debt list is written. |
item.blocks | list of text | No | Dependency debt: the acts it holds back on the changed asset until it is closed. |
item.by | date and time | No | Dependency debt: the deadline. |
item.state | one of: open, acknowledged, resolved, overridden, dropped | Yes | Where the item stands. Open and acknowledged items are still owed; resolved, overridden and dropped items are closed. |
item.evidence | text | No | What closed it, or why it was dropped, overridden or opened again. |
item.state_by | text | Yes | Who set the state now in force. |
item.state_at | date and time | Yes | When. |
item.filed_by | text | Yes | Who filed it. |
item.filed_via | text | No | The door it came through. |
item.filed_at | date and time | Yes | When it was filed. |
item.section | text | No | Technical debt: the heading of docs/technical-debt.md it is listed under. |
Refusals
| Code | What it means |
|---|---|
INPUT_INVALID | A field is missing or out of shape. The words say which. |
NOT_FOUND | No item with that number. |
NOT_ALLOWED | That move is not allowed. The words say why. |
NOT_OPERATOR | Only the platform moves debt, with the ledger's key (the debt scope). |
UNAVAILABLE | The 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 it | What for |
|---|---|
| The Debt ledger page | Mesh 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 card | An 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 agents | When 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 script | The 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
| Version | Date | What changed |
|---|---|---|
| 1 | 2026-10-05 | Version 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.