The Employment Contract Between You and Your Agent.

Give your AI agent a signed scope. Not a system prompt. A contract.

MandateClaw is an open-core Ruby library and registry for defining, signing, and auditing programmatic contracts that govern AI agent behaviour in regulated workflows.

Built for engineers deploying agents in fintech, legal, healthcare, and government — where “the model told me it wouldn’t do that” is not a compliance posture.


The Problem

Every serious AI agent deployment in a consequential workflow hits the same wall:

What you need is a layer that is signed before work begins, deterministic in what it permits, readable by humans, and auditable by regulators.


How It Works

class InvoiceContract < MandateClaw::DSL::Contract
  contract :invoice do
    party :buyer,    identifies_by: :customer_id
    party :seller,   identifies_by: :merchant_id
    party :ai_agent, identifies_by: :agent_did, kind: :autonomous

    obligation  :pay_invoice,      on: :buyer,    within: 30.days, breach: :late_payment_penalty
    permission  :dispute,          on: :buyer,    within: 7.days
    prohibition :unilateral_amend, on: :ai_agent, breach: :void_transition

    agent_bounds :ai_agent do
      may      :issue_invoice, :send_reminder
      must_not :modify_amount, :waive_penalty
      must_log_to :contract_registry
    end

    attestation do
      require_signature_from :buyer, :seller, :ai_agent
      sign_with :ed25519
    end
  end
end

The same definition that the runtime enforces renders as a human-readable contract document — readable by lawyers, auditable by regulators.


Components

Gem Role License
mandateclaw-dsl Contract DSL + Markdown renderer MIT
mandateclaw-registry Signing, storage, breach log, audit API FSL-1.1-Apache-2.0

Get Started →