Mnemom Reclassification API

Reclassification workflows.

GitHub OpenAPI

Operations 5

GET /agents/{agent_id}/card-amendments List card amendment history #
GET /agents/{agent_id}/compliance-export Export compliance record #
GET /agents/{agent_id}/reclassifications List reclassification history #
POST /agents/{agent_id}/reclassify Reclassify a checkpoint violation #
POST /reputation/{agent_id}/recompute Trigger score recomputation #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mnemom-ai:mnemom-ai-reclassification-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mnemom-ai-reclassification-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mnemom Reclassification API
  description: Trust infrastructure for AI agents. Transparent alignment verification, behavioral drift detection, and accountability primitives.
  version: 1.0.0
  contact:
    name: Mnemom
    url: https://mnemom.ai
    email: support@mnemom.ai
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://api.mnemom.ai/v1
  description: Production
security:
- BearerAuth: []
- ApiKeyAuth: []
tags:
- name: Reclassification
  description: Reclassification workflows.
paths:
  /agents/{agent_id}/card-amendments:
    get:
      operationId: listCardAmendments
      summary: List card amendment history
      description: 'Retrieve the history of all alignment card amendments for the specified agent. Card amendments are changes to the agent''s alignment card that were triggered by reclassifications, policy changes, or manual edits. Public: members of the agent''s org see the full records; every other caller (including anonymous) sees a redacted view with `id`, `agent_id`, `amendment_type`, `source` and `created_at` only. An unknown or deleted agent id returns 404, the same body as `GET /agents/{agent_id}`; a real agent with no records returns an empty list.'
      tags:
      - Reclassification
      security: []
      parameters:
      - $ref: '#/components/parameters/AgentId'
      - name: limit
        in: query
        schema:
          type: integer
          default: 20
          minimum: 1
          maximum: 100
        description: Maximum number of amendments to return
      - name: offset
        in: query
        schema:
          type: integer
          default: 0
          minimum: 0
        description: Number of amendments to skip for pagination
      responses:
        '200':
          description: Card amendment history, newest first, wrapped in an `amendments` envelope.
          content:
            application/json:
              schema:
                type: object
                required:
                - amendments
                properties:
                  amendments:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        agent_id:
                          type: string
                          description: Repointed to a deterministic `del-<hash>` pseudonym once the agent's account is deleted (MNE-6375 — the signed record survives erasure; the person is stripped).
                        amendment_type:
                          type: string
                          enum:
                          - bounded_action_added
                          - bounded_action_removed
                          - value_modified
                          - other
                        before_snapshot:
                          type: object
                          description: The alignment card before the edit (tamper-evidence).
                        after_snapshot:
                          type: object
                          description: The alignment card after the edit (tamper-evidence).
                        diff_summary:
                          type: string
                          nullable: true
                        reason:
                          type: string
                          nullable: true
                        source:
                          type: string
                          enum:
                          - ddr_auto
                          - manual
                          - policy_enforcement
                        created_by:
                          type: string
                          nullable: true
                          description: Nulled on account deletion — the person is stripped while the record is retained (MNE-6375).
                        created_at:
                          type: string
                          format: date-time
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /agents/{agent_id}/compliance-export:
    get:
      operationId: exportComplianceRecord
      summary: Export compliance record
      description: Export a comprehensive compliance record for the agent including all checkpoints, score history, reclassifications, card amendments, disagreement reviews and policy evaluations with card gaps. Returns a structured document suitable for regulatory audits and compliance reviews. Every record in the period is included, in both formats; a period with more than 10,000 records of one kind answers 413 `export_too_large`, and should be exported in parts with `from`/`to`. Members of the agent's org only.
      tags:
      - Reclassification
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      parameters:
      - $ref: '#/components/parameters/AgentId'
      - name: format
        in: query
        schema:
          type: string
          enum:
          - json
          - csv
          default: json
        description: Export format
      - name: from
        in: query
        schema:
          type: string
          format: date-time
        description: Start of time range (ISO-8601 date or date-time; anything else is a 400 `invalid_time_range`)
      - name: to
        in: query
        schema:
          type: string
          format: date-time
        description: End of time range (ISO-8601 date or date-time; anything else is a 400 `invalid_time_range`)
      responses:
        '200':
          description: Compliance export data
          headers:
            X-Mnemom-Export-Counts:
              description: 'CSV responses only: rows per section, as `checkpoints=N;score_history=N;reclassifications=N;card_amendments=N;disagreement_reviews=N;policy_evaluations_with_gaps=N`.'
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent_id:
                    type: string
                  export_id:
                    type: string
                  generated_at:
                    type: string
                    format: date-time
                  period:
                    type: object
                    properties:
                      from:
                        type:
                        - string
                        - 'null'
                        format: date-time
                      to:
                        type:
                        - string
                        - 'null'
                        format: date-time
                  counts:
                    type: object
                    description: Number of entries in each array of this export.
                    properties:
                      checkpoints:
                        type: integer
                      score_history:
                        type: integer
                      reclassifications:
                        type: integer
                      card_amendments:
                        type: integer
                      disagreement_reviews:
                        type: integer
                      policy_evaluations_with_gaps:
                        type: integer
                  checkpoints:
                    type: array
                    items:
                      type: object
                  reclassifications:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReclassificationResult'
                  card_amendments:
                    type: array
                    items:
                      type: object
                  score_history:
                    type: array
                    items:
                      type: object
                  disagreement_reviews:
                    type: array
                    items:
                      type: object
                  policy_evaluations_with_gaps:
                    type: array
                    items:
                      type: object
            text/csv:
              schema:
                type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '413':
          description: '`export_too_large`: the period holds more than 10,000 records of one kind. Narrow it with `from`/`to` and export it in parts.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /agents/{agent_id}/reclassifications:
    get:
      operationId: listReclassifications
      summary: List reclassification history
      description: 'Retrieve the history of all checkpoint reclassifications for the specified agent. Each entry includes the original and reclassified type, reason, and score impact. Public: members of the agent''s org see the full records; every other caller (including anonymous) sees a redacted view with `id`, `agent_id`, `before_verdict`, `after_classification`, `score_before`, `score_after` and `created_at` only. An unknown or deleted agent id returns 404, the same body as `GET /agents/{agent_id}`; a real agent with no records returns an empty list.'
      tags:
      - Reclassification
      security: []
      parameters:
      - $ref: '#/components/parameters/AgentId'
      - name: limit
        in: query
        schema:
          type: integer
          default: 20
          minimum: 1
          maximum: 100
        description: Maximum number of records to return
      - name: offset
        in: query
        schema:
          type: integer
          default: 0
          minimum: 0
        description: Number of records to skip for pagination
      responses:
        '200':
          description: Reclassification history — a bare array of reclassification records, newest first.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReclassificationResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /agents/{agent_id}/reclassify:
    post:
      operationId: reclassifyViolation
      summary: Reclassify a checkpoint violation
      description: Reclassify a previously recorded AIP checkpoint violation. This allows operators to correct false positives or adjust severity after manual review. The reclassification is recorded in the audit trail and can trigger a score recomputation.
      tags:
      - Reclassification
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      parameters:
      - $ref: '#/components/parameters/AgentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReclassificationRequest'
      responses:
        '200':
          description: Reclassification result with score impact
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReclassificationResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /reputation/{agent_id}/recompute:
    post:
      operationId: recomputeReputationScore
      summary: Trigger score recomputation
      description: Trigger a full recomputation of the agent's reputation and compliance scores. This re-evaluates all checkpoints, reclassifications, and card amendments to produce an updated score. Useful after bulk reclassifications or policy changes.
      tags:
      - Reclassification
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      parameters:
      - name: agent_id
        in: path
        required: true
        schema:
          type: string
        description: Agent identifier
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  description: Reason for triggering recomputation
                include_reclassifications:
                  type: boolean
                  default: true
                  description: Whether to include pending reclassifications in the recomputation
      responses:
        '200':
          description: Recomputation result with new scores
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent_id:
                    type: string
                  previous_score:
                    type: number
                  new_score:
                    type: number
                  delta:
                    type: number
                  reclassifications_applied:
                    type: integer
                  recomputed_at:
                    type: string
                    format: date-time
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Server error — request was well-formed but the server failed to fulfill it. Typically a downstream dependency (DB / RPC / external API) returned an unexpected error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Rate-limit exceeded. The global per-IP limiter (100 requests/minute, applied to every `/v1/*` route) rejected this request. Back off until the window resets — `Retry-After` carries the cooldown in seconds and `X-RateLimit-Reset` the absolute reset time.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            minimum: 1
        X-RateLimit-Limit:
          description: Requests permitted per window.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests remaining in the current window (0 on a 429).
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Reset:
          description: Unix epoch seconds at which the current window resets.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    ReclassificationResult:
      type: object
      description: Result of a checkpoint violation reclassification.
      properties:
        reclassification_id:
          type: string
          description: Unique identifier for this reclassification
        checkpoint_id:
          type: string
          description: Identifier of the reclassified checkpoint
        agent_id:
          type: string
          description: Agent whose checkpoint was reclassified
        original_type:
          type: string
          description: Original violation type before reclassification
        new_type:
          type: string
          description: New violation type after reclassification
        reason:
          type: string
          description: Justification provided for the reclassification
        score_impact:
          type: object
          properties:
            previous_score:
              type: number
            new_score:
              type: number
            delta:
              type: number
          description: Impact of the reclassification on the agent's score
    ReclassificationRequest:
      type: object
      description: Request to reclassify a checkpoint violation.
      required:
      - checkpoint_id
      - reason
      properties:
        checkpoint_id:
          type: string
          description: Identifier of the checkpoint to reclassify
        reason:
          type: string
          description: Human-readable justification for the reclassification
        card_amendment_id:
          type:
          - string
          - 'null'
          description: Optional ID of an alignment card amendment that triggered this reclassification
        after_classification:
          type: string
          enum:
          - clear
          - review_needed
          - boundary_violation
          default: clear
          description: 'Verdict the checkpoint is reclassified TO (MNE-2156). Omit for a full exoneration (''clear'', the historical behavior); send ''review_needed'' or ''boundary_violation'' when the review lowers the severity without clearing the agent. An unrecognized value is rejected with 400 — it is never coerced to ''clear''. This is deliberately a SUBSET of the checkpoint verdict enum: ''unverified'' means the integrity control did not run, which the system assigns and a reviewer cannot choose.'
    Error:
      type: object
      description: Canonical error envelope (ADR-API-001 conv 1). `error` is always an object — never a bare string. Every 4xx/5xx response across the API conforms to this shape; the runtime helper is `src/http-errors.ts::buildErrorBody`.
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              pattern: ^[a-z][a-z0-9_]*$
              description: 'Stable, machine-matchable failure identifier (lowercase snake_case). Clients may branch on this; the string is part of the contract.


                **Status-class defaults** — emitted when no caller code is supplied (`errorCodeForStatus(status)`): `bad_request` (400), `unauthorized` (401), `forbidden` (403), `not_found` (404), `method_not_allowed` (405), `conflict` (409), `gone` (410), `precondition_failed` (412), `payload_too_large` (413), `unsupported_media_type` (415), `unprocessable_entity` (422), `precondition_required` (428), `rate_limited` (429), `internal_error` (500), `not_implemented` (501), `bad_gateway` (502), `service_unavailable` (503), `gateway_timeout` (504). Fallback `error` for unmapped statuses.


                **Caller-supplied codes** — handlers may pass an explicit `code` for a specific failure class. Examples: `agent_not_found`, `invalid_hash_proof`, `already_linked`, `idempotency_conflict`, `feature_gated`, `schema_validation_failed`, `no_token`, `bad_canonical_payload`.


                **Care-framed sub-resource codes** — the cards-as-primitive surface passes its stable care code-string straight through as `error.code`. Examples: `if_match_absent`, `if_match_stale`, `if_match_malformed`, `primitive_validation_failed`.'
            message:
              type: string
              description: Human-readable, care-framed explanation of the failure.
            details:
              description: 'Optional structured context for the failure (any JSON value: object, array, or primitive). Common shapes: validation findings list, idempotency-conflict diff, `{presented_etag, current_etag}` on a stale `If-Match`, etc. Mirrors the helper''s `details?: unknown`.'
  parameters:
    AgentId:
      name: agent_id
      in: path
      required: true
      schema:
        type: string
      description: Agent identifier (e.g. smolt-abc123)
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Supabase JWT token in Authorization: Bearer header'
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Mnemom-Api-Key
      description: Mnemom API key (mnm_... format)
    ServiceRole:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Supabase service role bearer JWT. Used by /blog admin operations that talk directly to Supabase. NOT used by /internal/* or /v1/arena/internal/* — those use the custom-header schemes below.
    InternalKeyAuth:
      type: apiKey
      in: header
      name: X-Internal-Key
      description: Internal service-to-service shared secret, timing-safe compared against INTERNAL_API_KEY. Used by /internal/* gateway routes (compose, agents, webhooks emit).
    ServiceKeyAuth:
      type: apiKey
      in: header
      name: X-Service-Key
      description: Service-to-service shared secret, timing-safe compared against MNEMOM_SERVICE_KEY. Used by /v1/arena/internal/*, /v1/on-chain/*, and the /v1/internal/* readers consumed by the reputation cron.
    CoherenceTokenAuth:
      type: http
      scheme: bearer
      description: Per-cell coherence bearer token. Provisioned in 1Password vault `mnemom-coherence` (one item per receiver). Value compared against COHERENCE_<NAME>_SERVICE_TOKEN_EXPECTED. Used by /v1/internal/coherence/* and /v1/internal/governance/dispatch.
    ArenaCandidateTokenAuth:
      type: http
      scheme: bearer
      description: Dedicated arena writer token (ADR-004 §"Arena dedicated writer token"). Compared against ARENA_RECIPE_CANDIDATE_TOKEN. The token's only capability is writing recipe candidates with writer_identity='arena-bypass' (stamped server-side). Used by POST /v1/internal/recipe-candidates.
    CustomerVoiceTokenAuth:
      type: http
      scheme: bearer
      description: Customer Voice API bearer token. Timing-safe compared against CUSTOMER_VOICE_API_TOKEN. Grants access to all /v1/internal/feedback/* endpoints (MNE-1876). No customer-facing or reporter-read capability.
    CookieAuth:
      type: apiKey
      in: cookie
      name: mnemom_session
      description: 'HttpOnly, Secure, SameSite=Lax cookie issued by /v1/auth/sign-in (or the SSO / email-callback flows). The value is an AES-256-GCM-encrypted blob of {access_token, refresh_token, issued_at, auth_method}. Browser clients include this automatically with `credentials: "include"`.'
    LicenseJwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: License JWT (HS256, HMAC-signed with LICENSE_SIGNING_SECRET). Used by self-hosted deployment instances to authenticate `/v1/deployments/heartbeat`. Not interchangeable with the Supabase user JWT.
    AgentAuth:
      type: apiKey
      in: header
      name: X-Mnemom-Agent-Proof
      description: 'Agent possession proof: the full SHA-256 hex digest of `${apiKey}|${agentName}` (or `${apiKey}` for an unnamed singleton agent) — the same `hash_proof` primitive used by POST /v1/agents claim, link-agent, and verify-binding. The server resolves the agent by `agent_hash = proof[:16]`. The agent''s *own* identity (ADR-API-001 third auth class) — distinct from ApiKeyAuth (`X-Mnemom-Api-Key`, which resolves a user/account, not an agent).'