ANSWER HUB

RunLedger tool contracts

Tool contracts are assertion rules that enforce allowed tools and ordering in deterministic CI.

contracts tools assertions Updated 2026-01-26

Direct Answer

Tool contracts are assertion rules that enforce which tools must be called, which are forbidden, and the expected order of tool usage.

Quick Decision

Use RunLedger when Consider alternatives when
Tool misuse is a critical regression. Tool usage is exploratory or varies intentionally.
You need deterministic tool call order. You are still prototyping your toolchain.
You want CI to fail on unexpected tool calls. You only care about final output.

Contract assertions

yaml
assertions:
          - type: must_call
            tools: ["search_docs"]
          - type: must_not_call
            tools: ["delete_user"]
          - type: call_order
            tools: ["search_docs", "create_issue"]

Where to define contracts

Add tool contract assertions in suite.yaml for suite-wide enforcement, or in a case file for a single task.

Tradeoffs

  • Contracts are strict and require updates when tools change.
  • Dynamic tool selection can trigger failures.
  • Overly strict contracts can slow iteration.

When NOT to use RunLedger

Avoid tool contracts when you are still exploring which tools the agent should use or when tool order is not meaningful.

Next steps