Skip to content

Commitments

Commitments are the work items in Mentu. Each commitment has a lifecycle — open, claimed, in_review, closed, reopened — and an append-only history of every state transition.

Base URL: https://mentu-proxy.affihub.workers.dev

All requests require the standard authentication headers.


GET /commitments

Returns a paginated list of commitments in the workspace.

ParameterTypeDefaultDescription
statestring(all)Filter by state: open, claimed, in_review, closed, reopened
ownerstring(all)Filter by owner identifier
tagsstring(all)Comma-separated list of tags (matches any)
limitinteger50Number of results to return (max 100)
offsetinteger0Number of results to skip for pagination
sincestring(all)ISO 8601 timestamp; return only commitments updated after this time
Terminal window
curl -X GET "https://mentu-proxy.affihub.workers.dev/commitments?state=open&limit=10" \
-H "X-Proxy-Token: $MENTU_API_TOKEN" \
-H "X-Workspace-Id: $MENTU_WORKSPACE_ID"
{
"success": true,
"data": [
{
"id": "cmt_bcdef123",
"title": "Fix session token refresh after password change",
"body": "Session token is not refreshed when a user changes their password.",
"state": "open",
"owner": null,
"priority": "critical",
"tags": ["auth", "bug"],
"created_at": "2025-03-15T10:00:00Z",
"updated_at": "2025-03-15T10:00:00Z",
"meta": {}
},
{
"id": "cmt_cdefg456",
"title": "Add rate limiting to public API",
"body": null,
"state": "open",
"owner": null,
"priority": "high",
"tags": ["security", "api"],
"created_at": "2025-03-14T08:30:00Z",
"updated_at": "2025-03-14T08:30:00Z",
"meta": {}
}
],
"pagination": {
"limit": 10,
"offset": 0,
"total": 2
}
}

Commitments claimed by a specific agent:

Terminal window
curl -X GET "https://mentu-proxy.affihub.workers.dev/commitments?state=claimed&owner=agent-ralph" \
-H "X-Proxy-Token: $MENTU_API_TOKEN" \
-H "X-Workspace-Id: $MENTU_WORKSPACE_ID"

Commitments with specific tags:

Terminal window
curl -X GET "https://mentu-proxy.affihub.workers.dev/commitments?tags=auth,security" \
-H "X-Proxy-Token: $MENTU_API_TOKEN" \
-H "X-Workspace-Id: $MENTU_WORKSPACE_ID"

Commitments updated in the last hour:

Terminal window
curl -X GET "https://mentu-proxy.affihub.workers.dev/commitments?since=2025-03-15T09:00:00Z" \
-H "X-Proxy-Token: $MENTU_API_TOKEN" \
-H "X-Workspace-Id: $MENTU_WORKSPACE_ID"

Paginating through results:

Terminal window
# Page 1
curl -X GET "https://mentu-proxy.affihub.workers.dev/commitments?limit=20&offset=0" \
-H "X-Proxy-Token: $MENTU_API_TOKEN" \
-H "X-Workspace-Id: $MENTU_WORKSPACE_ID"
# Page 2
curl -X GET "https://mentu-proxy.affihub.workers.dev/commitments?limit=20&offset=20" \
-H "X-Proxy-Token: $MENTU_API_TOKEN" \
-H "X-Workspace-Id: $MENTU_WORKSPACE_ID"

GET /commitments/:id

Returns a single commitment with its full history of operations and annotations.

ParameterTypeDescription
idstringThe commitment ID (e.g., cmt_bcdef123)
Terminal window
curl -X GET "https://mentu-proxy.affihub.workers.dev/commitments/cmt_bcdef123" \
-H "X-Proxy-Token: $MENTU_API_TOKEN" \
-H "X-Workspace-Id: $MENTU_WORKSPACE_ID"
{
"success": true,
"data": {
"id": "cmt_bcdef123",
"title": "Fix session token refresh after password change",
"body": "Session token is not refreshed when a user changes their password.",
"state": "closed",
"result": "pass",
"owner": "agent-ralph",
"priority": "critical",
"tags": ["auth", "bug"],
"created_at": "2025-03-15T10:00:00Z",
"updated_at": "2025-03-15T14:30:00Z",
"meta": {},
"evidence": [
{
"type": "pr",
"url": "https://github.com/org/repo/pull/42",
"body": "PR merged, fixes session refresh logic"
},
{
"type": "build",
"url": "https://ci.example.com/builds/1234",
"body": "All tests passing"
}
],
"history": [
{
"op_id": "op_23456789",
"op": "commit",
"actor": "ci-pipeline",
"timestamp": "2025-03-15T10:00:00Z"
},
{
"op_id": "op_34567890",
"op": "claim",
"actor": "agent-ralph",
"owner": "agent-ralph",
"timestamp": "2025-03-15T10:15:00Z"
},
{
"op_id": "op_67890123",
"op": "annotate",
"actor": "agent-ralph",
"body": "Root cause identified: token cache not invalidated on password change event",
"kind": "progress",
"timestamp": "2025-03-15T12:00:00Z"
},
{
"op_id": "op_78901234",
"op": "submit",
"actor": "agent-ralph",
"timestamp": "2025-03-15T13:45:00Z"
},
{
"op_id": "op_89012345",
"op": "approve",
"actor": "rashid",
"body": "LGTM. Tests pass, code is clean.",
"timestamp": "2025-03-15T14:00:00Z"
},
{
"op_id": "op_56789012",
"op": "close",
"actor": "ci-pipeline",
"result": "pass",
"summary": "Session token now refreshes correctly after password change",
"timestamp": "2025-03-15T14:30:00Z"
}
],
"linked_memories": [
{
"id": "mem_abcdef12",
"body": "Found bug in auth flow: session token not refreshed after password change",
"kind": "bug-report"
}
]
}
}
FieldTypeDescription
idstringUnique commitment identifier
titlestringShort title
bodystring or nullDetailed description
statestringCurrent state: open, claimed, in_review, closed, reopened
resultstring or nullOutcome when closed: pass or fail
ownerstring or nullCurrent owner identifier
prioritystring or nullPriority level
tagsstring[]Array of tags
created_atstringISO 8601 creation timestamp
updated_atstringISO 8601 last-update timestamp
metaobjectArbitrary metadata
evidencearrayEvidence objects attached at close
historyarrayOrdered list of all operations on this commitment
linked_memoriesarrayMemories linked to this commitment

All list endpoints use limit and offset pagination.

  • limit controls how many records are returned per request (default: 50, max: 100).
  • offset controls how many records to skip.
  • The pagination object in the response includes total so you can calculate the number of pages.
Total pages = ceil(pagination.total / limit)
Current page = floor(offset / limit) + 1

To iterate through all results:

let offset = 0;
const limit = 50;
let allCommitments = [];
while (true) {
const res = await fetch(
`https://mentu-proxy.affihub.workers.dev/commitments?limit=${limit}&offset=${offset}`,
{ headers }
);
const { data, pagination } = await res.json();
allCommitments = allCommitments.concat(data);
if (offset + limit >= pagination.total) break;
offset += limit;
}