Skip to main content

Reclassification API

Part of CLPI Phase 2: Card Lifecycle & Trust Recovery. The Reclassification API enables violation reclassification and trust score recovery.
The Reclassification API enables operators to reclassify checkpoint violations as card gaps or behavior gaps, trigger score recomputation, review amendment history, and export full compliance records for audit purposes. All reclassification data feeds into the Trust Rating pipeline and is reflected in the agent’s integrity chain. Base URL: https://api.mnemom.ai/v1

Authentication

All reclassification endpoints require API key authentication. Pass your key in the Authorization header:
Authorization: Bearer {api_key}
API keys can be created in your dashboard under Settings or via POST /v1/api-keys.
EndpointAuth RequiredNotes
POST /v1/agents/{agent_id}/reclassifyAPI keyReclassify a checkpoint violation
POST /v1/reputation/{agent_id}/recomputeAPI keyTrigger score recomputation
GET /v1/agents/{agent_id}/compliance-exportAPI keyExport compliance record
GET /v1/agents/{agent_id}/reclassificationsAPI keyList reclassification history
GET /v1/agents/{agent_id}/card-amendmentsAPI keyList card amendment history

Rate Limits

EndpointRate LimitWindow
POST /agents/{agent_id}/reclassify30 requestsper minute
POST /reputation/{agent_id}/recompute10 requestsper minute
GET /agents/{agent_id}/compliance-export10 requestsper minute
Other endpoints60 requestsper minute
Rate-limited responses return HTTP 429 with a Retry-After header.

Endpoints

POST /v1/agents//reclassify

Reclassify a checkpoint violation as card_gap or behavior_gap. Card-gap reclassifications indicate that the agent behaved correctly but the card definition was incomplete. Behavior-gap reclassifications indicate a genuine agent misbehavior that should remain on record. Parameters:
ParameterInTypeRequiredDescription
agent_idpathstringYesAgent identifier
Request body:
{
  "checkpoint_id": "ic-abc12345",
  "reason": "Agent correctly used mcp__browser__navigate for research, but web_fetch was missing from card bounded_actions",
  "card_amendment_id": "amend-xyz789"
}
FieldTypeRequiredDescription
checkpoint_idstringYesID of the checkpoint to reclassify
reasonstringYesHuman-readable explanation for the reclassification
card_amendment_idstringNoLink to a card amendment that fixes the gap
Response: 200 OK
{
  "reclassification_id": "rcl-def456",
  "checkpoint_id": "ic-abc12345",
  "agent_id": "smolt-a4c12709",
  "original_type": "UNMAPPED_TOOL",
  "new_type": "card_gap",
  "reason": "Agent correctly used mcp__browser__navigate for research, but web_fetch was missing from card bounded_actions",
  "card_amendment_id": "amend-xyz789",
  "approved_by": "user-abc123",
  "created_at": "2026-02-25T14:00:00.000Z",
  "score_impact": {
    "score_before": 650,
    "score_after": null,
    "recomputation_pending": true
  }
}
Response fields:
FieldTypeDescription
reclassification_idstringUnique identifier for this reclassification
checkpoint_idstringThe checkpoint that was reclassified
agent_idstringAgent identifier
original_typestringOriginal violation type before reclassification
new_typestringNew classification: card_gap or behavior_gap
reasonstringHuman-readable explanation
card_amendment_idstringLinked card amendment ID, if provided
approved_bystringUser who approved the reclassification
created_atstringISO 8601 timestamp
score_impactobjectScore impact summary
score_impact object:
FieldTypeDescription
score_beforenumberScore at time of reclassification
score_afternumber | nullScore after recomputation, or null if pending
recomputation_pendingbooleanWhether a recomputation is needed to reflect this change
Error responses:
StatusMeaning
400Missing or invalid parameters
401API key required
404Checkpoint or agent not found
409Checkpoint has already been reclassified

POST /v1/reputation//recompute

Trigger score recomputation after reclassification. Scores are recomputed with card_gap violations excluded from the compliance and drift stability components. Recomputation propagates through the agent’s delegation graph using the configured decay factor. Parameters:
ParameterInTypeRequiredDescription
agent_idpathstringYesAgent identifier
Response: 200 OK
{
  "agent_id": "smolt-a4c12709",
  "score_before": 650,
  "score_after": 782,
  "grade_before": "BBB",
  "grade_after": "A",
  "reclassifications_applied": 3,
  "propagation": {
    "agents_affected": 5,
    "max_depth": 2,
    "decay_factor": 0.85
  },
  "recomputed_at": "2026-02-25T14:01:00.000Z"
}
Response fields:
FieldTypeDescription
agent_idstringAgent identifier
score_beforenumberComposite score before recomputation
score_afternumberComposite score after recomputation
grade_beforestringLetter grade before recomputation
grade_afterstringLetter grade after recomputation
reclassifications_appliednumberNumber of reclassifications factored into this recomputation
propagationobjectDelegation graph propagation details
recomputed_atstringISO 8601 timestamp of recomputation
propagation object:
FieldTypeDescription
agents_affectednumberTotal agents whose scores were updated via delegation propagation
max_depthnumberMaximum depth reached in the delegation graph
decay_factornumberDecay factor applied at each delegation hop
Error responses:
StatusMeaning
401API key required
404Agent not found

GET /v1/agents//compliance-export

Export the full compliance record for an agent, including all violations, reclassifications, card amendments, and score history. Designed for audit purposes and regulatory compliance workflows. Parameters:
ParameterInTypeRequiredDescription
agent_idpathstringYesAgent identifier
Response: 200 OK
{
  "agent_id": "smolt-a4c12709",
  "export_date": "2026-02-25T14:00:00.000Z",
  "violations": [...],
  "reclassifications": [...],
  "card_amendments": [...],
  "score_history": [...],
  "integrity_chain_valid": true
}
Response fields:
FieldTypeDescription
agent_idstringAgent identifier
export_datestringISO 8601 timestamp of the export
violationsarrayAll recorded violations for this agent
reclassificationsarrayAll reclassification records
card_amendmentsarrayAll card amendment records
score_historyarrayHistorical score snapshots
integrity_chain_validbooleanWhether the integrity chain is intact and tamper-free
Error responses:
StatusMeaning
401API key required
404Agent not found

GET /v1/agents//reclassifications

List reclassification history for an agent. Returns paginated results ordered by creation date (newest first). Parameters:
ParameterInTypeRequiredDescription
agent_idpathstringYesAgent identifier
pagequerynumberNoPage number (default: 1)
per_pagequerynumberNoResults per page (default: 20, max: 100)
Response: 200 OK
{
  "reclassifications": [
    {
      "reclassification_id": "rcl-def456",
      "checkpoint_id": "ic-abc12345",
      "original_type": "UNMAPPED_TOOL",
      "new_type": "card_gap",
      "reason": "Agent correctly used mcp__browser__navigate for research, but web_fetch was missing from card bounded_actions",
      "card_amendment_id": "amend-xyz789",
      "approved_by": "user-abc123",
      "created_at": "2026-02-25T14:00:00.000Z"
    }
  ],
  "total": 1,
  "page": 1,
  "per_page": 20
}
Error responses:
StatusMeaning
401API key required
404Agent not found

GET /v1/agents//card-amendments

List card amendment history for an agent. Returns paginated results ordered by creation date (newest first). Parameters:
ParameterInTypeRequiredDescription
agent_idpathstringYesAgent identifier
pagequerynumberNoPage number (default: 1)
per_pagequerynumberNoResults per page (default: 20, max: 100)
Response: 200 OK
{
  "card_amendments": [
    {
      "amendment_id": "amend-xyz789",
      "agent_id": "smolt-a4c12709",
      "field_changed": "bounded_actions",
      "previous_value": ["mcp__browser__click", "mcp__browser__type"],
      "new_value": ["mcp__browser__click", "mcp__browser__type", "mcp__browser__navigate"],
      "reason": "Added mcp__browser__navigate to bounded_actions to reflect legitimate research workflow",
      "linked_reclassification_id": "rcl-def456",
      "created_at": "2026-02-25T13:55:00.000Z"
    }
  ],
  "total": 1,
  "page": 1,
  "per_page": 20
}
Error responses:
StatusMeaning
401API key required
404Agent not found

Error Codes

StatusCodeDescription
400invalid_requestMissing or invalid parameters
401unauthorizedAPI key required but not provided or invalid
404checkpoint_not_foundCheckpoint ID does not exist
404agent_not_foundAgent ID does not exist
409already_reclassifiedCheckpoint has already been reclassified
429rate_limitedToo many requests; check Retry-After header
500internal_errorServer error; retry with exponential backoff
All error responses follow the standard envelope:
{
  "error": "checkpoint_not_found",
  "message": "No checkpoint found with ID 'ic-abc12345'"
}

SDK Usage

import { MnemomClient } from '@mnemom/sdk';

const client = new MnemomClient({ apiKey: process.env.MNEMOM_API_KEY });

// Reclassify a checkpoint violation
const reclassification = await client.agents.reclassify('smolt-a4c12709', {
  checkpoint_id: 'ic-abc12345',
  reason: 'Agent correctly used mcp__browser__navigate for research, but web_fetch was missing from card bounded_actions',
  card_amendment_id: 'amend-xyz789',
});
console.log(`Reclassified: ${reclassification.reclassification_id}`);

// Trigger score recomputation
const result = await client.reputation.recompute('smolt-a4c12709');
console.log(`Score: ${result.score_before}${result.score_after}`);
console.log(`Grade: ${result.grade_before}${result.grade_after}`);

// Export compliance record
const exportData = await client.agents.complianceExport('smolt-a4c12709');
console.log(`Chain valid: ${exportData.integrity_chain_valid}`);
console.log(`Violations: ${exportData.violations.length}`);
console.log(`Reclassifications: ${exportData.reclassifications.length}`);

See Also