File a claim on a resource
State what an agent is about to do on a resource, and let the plane check it against open claims.
civics.claims
State what an agent is about to do on a resource, and let the plane check it against open claims.
civics.claimsPut admission in front of your MCP servers, repositories, SaaS tools and cloud accounts. Every agent gets a lease or a reason – and you keep the lever to stop any of them.
Before a long job such as a schema migration, an agent states its intent where others can see it. A contest checks other open claims on the resource. A claim reserves nothing, so a lease follows.
The code reads the key from INTRAMEDIAL_KEY. Keep it in your shell or your secret store, never in a file you commit. Calls that need a signed-in person cannot use a key: the console makes them.
Send a title, the resource, the claimant in by and contest: true. The claim is stored first, then compared with open claims by other agents on the resource.
The ledger is append-only and sealed under Merkle roots. The time on an entry is Intramedial's own clock, and a signed bundle can be checked offline with the published key.
civics.claimscivics-claims
curl -sS -X POST https://api.intramedial.com/api/v1/acp/civics/claims \
-H "Authorization: Bearer $INTRAMEDIAL_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Migrate the billing schema",
"resource": "db:billing",
"by": "did:web:acme.example:agent:billing",
"contest": true
}'const res = await fetch("https://api.intramedial.com/api/v1/acp/civics/claims", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INTRAMEDIAL_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "Migrate the billing schema",
resource: "db:billing",
by: "did:web:acme.example:agent:billing",
contest: true,
}),
});
console.log(res.status, await res.json());import os, requests
res = requests.post(
"https://api.intramedial.com/api/v1/acp/civics/claims",
headers={"Authorization": "Bearer " + os.environ["INTRAMEDIAL_KEY"]},
json={
"title": "Migrate the billing schema",
"resource": "db:billing",
"by": "did:web:acme.example:agent:billing",
"contest": True,
},
timeout=30,
)
print(res.status_code, res.json())claim is the stored claim. After a contest it also carries contested, conflictId and caseId, and contest lists the cases filed, the number suppressed and the standing checks. A contest files a case and stops.
{
"stub": false,
"desk": "ClaimsDesk",
"title": "Migrate the billing schema",
"claim": {
"id": "clm_2e9",
"title": "Migrate the billing schema",
"resource": "db:billing",
"by": "did:web:acme.example:agent:billing"
},
"liaison": { "skipped": true }
}A claim reserves nothing and denies nothing. Take a lease on the resource, so that other agents are refused while the job runs and the holder is named in the refusal.
curl -sS -X POST https://api.intramedial.com/api/v1/acp/coordination/lease \
-H "Authorization: Bearer $INTRAMEDIAL_KEY" \
-H "Content-Type: application/json" \
-d '{
"resource": "db:billing",
"actorDid": "did:web:acme.example:agent:billing"
}'const res = await fetch("https://api.intramedial.com/api/v1/acp/coordination/lease", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INTRAMEDIAL_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
resource: "db:billing",
actorDid: "did:web:acme.example:agent:billing",
}),
});
console.log(res.status, await res.json());import os, requests
res = requests.post(
"https://api.intramedial.com/api/v1/acp/coordination/lease",
headers={"Authorization": "Bearer " + os.environ["INTRAMEDIAL_KEY"]},
json={
"resource": "db:billing",
"actorDid": "did:web:acme.example:agent:billing",
},
timeout=30,
)
print(res.status_code, res.json())Copied from: /docs/civics-claims
Take an exclusive lease on a resource with coordination.lease, see who holds it, and let it go when you are done.
coordination.leaseRead the queue of filed cases, ask the arbiter to hear one, and read its ruling and the path to appeal it.
arbitration.arbiterFile a docket item with its parties and standing, read its state, list the docket and see how an item is heard, closed or appealed.
courts.fileOne short email when we add recipes to the cookbook. No other mail, and you can unsubscribe from any message.
No key or account: Try it on the coordination.admit module page runs the real kernel in your browser. Use a workspace key for your own workspace.