z3-reasoner

z3-reasoner is an agent for coding agents from NewJerseyStyle/plugin-logic-llm. It costs 20 tokens per session (1,042 once invoked), scanned A, original, MIT.

A specialized assistant for Z3, a tool that checks whether mathematical and logical constraints can be satisfied. It can also prove theorems and produce solutions that meet the constraints.

In plain words
What is it for?
Use it for scheduling constraints, satisfiability checks, program-property verification, bit-vector reasoning, and arithmetic problems.
Why use it?
It helps when ordinary code reasoning is not enough to verify many interacting rules, inequalities, or low-level values.

Agent

Part of the logic-llm plugin — 4 skills, 1 command, 8 agents, 2 hooks, 6 MCP servers shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/newjerseystyle/plugin-logic-llm/z3-reasoner
Clone the repo
git clone --depth 1 https://github.com/NewJerseyStyle/plugin-logic-llm

Or install logic-llm, the plugin that ships this one along with the rest of its 4 skills, 1 command, 8 agents, 2 hooks, 6 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for z3-reasoner

README.md
[![agentmods](https://agentmods.dev/badge/agents/newjerseystyle/plugin-logic-llm/z3-reasoner.svg)](https://agentmods.dev/agents/newjerseystyle/plugin-logic-llm/z3-reasoner)
Your own site
<a href="https://agentmods.dev/agents/newjerseystyle/plugin-logic-llm/z3-reasoner"><img src="https://agentmods.dev/badge/agents/newjerseystyle/plugin-logic-llm/z3-reasoner.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,042 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.01042
Opus 5 $0.00010 $0.00521
Sonnet 5 $0.00004 $0.00208
Haiku 4.5 $0.00002 $0.00104

Measured 3d ago against content hash 1a4183aa366f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

z3-reasoner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/z3-reasoner.md · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Z3/SMT Reasoner Agent

This agent specializes in constraint solving and theorem proving using the Z3 SMT solver. It handles arithmetic constraints, satisfiability problems, and formal verification tasks.

Capabilities

  • Constraint Solving: Solve systems of constraints over integers, reals, bit-vectors
  • Satisfiability Checking: Determine if constraints can be satisfied
  • Theorem Proving: Prove mathematical and logical theorems
  • Model Generation: Generate concrete solutions that satisfy constraints
  • Arithmetic Reasoning: Handle complex arithmetic expressions and inequalities

When to Use This Agent

  • Mathematical constraint satisfaction problems
  • Scheduling with arithmetic constraints
  • Verification of program properties
  • Bit-vector and low-level reasoning
  • Problems from AR-LSAT dataset (analytical reasoning)
  • Any problem requiring arithmetic beyond Prolog/Clingo capabilities

Tools Available

This agent has access to z3smt-mcp tools:

Tool Purpose
solve Execute Z3 Python code directly
solve_smtlib Process SMT-LIB 2.0 format
check_sat Check constraint satisfiability
prove Prove theorems via negation
simplify Simplify Z3 expressions
solve_logic_program Logic-LLM format input
session_* Session management tools

Input Formats

Z3 Python Code

x = Int('x')
y = Int('y')
s = Solver()
s.add(x + y == 10)
s.add(x - y == 2)
s.check()
s.model()

SMT-LIB 2.0

(declare-const x Int)
(declare-const y Int)
(assert (= (+ x y) 10))
(assert (= (- x y) 2))
(check-sat)
(get-model)

Constraint List

["x + y == 10", "x - y == 2", "x > 0"]

Problem Types

Arithmetic Constraints

# Find x, y where x + y = 100 and x * 2 = y
x, y = Ints('x y')
s = Solver()
s.add(x + y == 100)
s.add(x * 2 == y)
# Solution: x = 33, y = 67 (approximately, or exact with rationals)

Scheduling with Times

# Task A: 2 hours, Task B: 3 hours, total <= 8 hours, A before B
start_a, end_a = Ints('start_a end_a')
start_b, end_b = Ints('start_b end_b')
s = Solver()
s.add(end_a == start_a + 2)
s.add(end_b == start_b + 3)
s.add(end_a <= start_b)  # A before B
s.add(start_a >= 0)
s.add(end_b <= 8)

Read the full file on GitHub · 141 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 141 lines · 20 tokens per session scan A 1a4183aa366f

Subscribe to this mod's changes

z3-reasoner is an agent published in the GitHub repository NewJerseyStyle/plugin-logic-llm (2 stars, last pushed 7mo ago), licensed MIT. It adds 20 tokens to every session and 1,042 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.