Documentation

What MetricMotive is, how a Guard is locked, and how a verdict is produced.

Introduction

MetricMotive verifies whether an autonomous agent honored the user's real objective, or gamed the metric it was optimizing.

It exists because Goodhart's law is now an operational risk: agents will hit the number you pay them for. GenLayer is used because the adjudication is semantic, contested, and should not be owned by a single server.

Concepts

Motive: the human objective.

Metric: the measurable proxy.

Guardrails: MUST (hard boundary) and QUALITY (must not be materially sacrificed).

Motive Lock: after arm, the definition is immutable on the Intelligent Contract.

Evidence: a bounded canonical JSON bundle. No secrets or PII.

Verdicts: FAITHFUL_SUCCESS, METRIC_GAMING, PARTIAL_ALIGNMENT, INSUFFICIENT_EVIDENCE.

Gaming patterns: QUALITY_SACRIFICE, CONSTRAINT_BYPASS, DUPLICATION, DECEPTIVE_COMPLETION, RISK_SHIFT, COST_SHIFT, PROXY_EXPLOIT, OTHER, or NONE.

Product

Create a Guard in six steps: motive, metric, guardrails, preflight, review, lock.

Motive Lock is arm_guard on the certified Studionet contract. The UI shows Motive Locked only after the contract status is ARMED.

Capture a run with the Run Recorder (start, append events, finish).

Submit evidence commits a fingerprint with submit_evidence. Evaluation consumes that commitment.

Verify with GenLayer sends evaluate_guard and waits for a finalized contract verdict. Preflight, loophole scan, drift, and remediation stay advisory.

Public receipts live at /verify/{id} and do not require a wallet.

Versioning creates V2 from a parent. History is not rewritten.

Remediation is advisory. Creating V2 is explicit.

Developers

Architecture: TanStack Start app, Postgres for drafts and indexing, GenLayer Intelligent Contract as verdict source of truth.

API: /api/v1/health, /api/v1/ready, /api/v1/contract, /api/v1/openapi.json, /api/v1/runs. TypeScript SDK: packages/sdk (@metricmotive/sdk v1.0.0, not published to npm). Example: examples/sales-agent.

Wallet: RainbowKit + wagmi + viem + GenLayerJS. Connect, disconnect, account switch, and Studionet detection are in the product chrome. Writes are signed in the browser. No private key is stored.

Evidence schema: metricmotive.evidence.v1 with SHA-256 canonical JSON hashing.

Contract source: contracts/metric-motive/src/metric_motive.py.

Off-chain AI never overwrites a finalized GenLayer verdict.

Security

Prompt injection: untrusted motive/metric/rails/evidence are isolated as data.

Access control: only the owner mutates drafts, arms, and submits evidence.

Evidence integrity: commitments cannot be replaced.

Malformed model output is rejected; the contract maps findings deterministically.

Public evidence paths must not contain secrets.

Report issues via SECURITY.md.

Contract

Network: Studionet. Chain ID 61999. RPC https://studio.genlayer.com/api.

Certified address: 0x9Fa308c399fA8c1566B4Da1e76825eAFC04d8d7C.

Hosted certification: Guard 1 FAITHFUL_SUCCESS; Guard 2 METRIC_GAMING (CONSTRAINT_BYPASS). These are official cases, not user history.

Deploy transaction: 0xb7cde061b32726e6abfafb2a83868b8d4993028769dc5c5f6fa6e90d89f7ffda.

Reads: get_contract_info, get_guard_count, get_guard_summary, get_guard_status, get_guard_definition, get_guard_lineage, get_guard_evidence, get_guard_findings, get_guard_verdict, get_guard, get_guards_by_owner. All verified on Studionet for missing IDs and empty state.

Writes: create_guard, update_draft, arm_guard, submit_evidence, evaluate_guard, create_version.

Open source

License: Apache-2.0.

Clone, install npm dependencies, run the documented start command.

Contract tests: python contracts/metric-motive/tests/test_verdict_mapping.py

Domain tests: node --experimental-strip-types --test src/lib/domain.test.ts