fol-reasoner

A specialized agent for proving statements in first-order logic, a formal system using facts, variables, and universal or existential rules. It works with theorem provers such as Vampire, E, and Prover9.

In plain words
What is it for?
Use it for formal proofs, mathematical reasoning, quantified statements, logical entailment checks, and converting formulas into the standard TPTP format.
Why use it?
It checks whether a conclusion follows from given premises, including cases that simpler rule systems cannot express because they involve quantified variables.

Agent

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/fol-reasoner
Clone the repo
git clone --depth 1 https://github.com/NewJerseyStyle/plugin-logic-llm
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,146 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.01146
Opus 5 $0.00010 $0.00573
Sonnet 5 $0.00004 $0.00229
Haiku 4.5 $0.00002 $0.00115

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

Security

Grade A, and why

fol-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 2d 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/fol-reasoner.md · 175 lines

How it starts

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

FOL Prover Reasoner Agent

This agent specializes in First-Order Logic theorem proving using industrial-strength provers like Vampire and E. It handles complex logical formulas with universal and existential quantifiers.

Capabilities

  • Theorem Proving: Prove logical theorems from premises
  • Quantifier Reasoning: Handle ∀ (forall) and ∃ (exists) quantifiers
  • Formal Verification: Verify logical entailment
  • TPTP Export: Convert to standard theorem prover format
  • Multi-Prover Support: Use Vampire, E, Prover9, or built-in prover

When to Use This Agent

  • Problems requiring full first-order logic (FOLIO dataset)
  • Reasoning with universal and existential quantifiers
  • Formal mathematical proofs
  • Complex logical entailment checking
  • When Prolog/Clingo lack expressiveness for quantifiers

Tools Available

This agent has access to folprover-mcp tools:

Tool Purpose
prove Execute proof with premises and conclusion
add_premise Build knowledge base incrementally
set_conclusion Set proof target
parse_formula Validate FOL syntax
convert_to_tptp Export to TPTP format
list_provers Show available backends
create_session Manage proof sessions

Input Format

Unicode Logical Operators

∀x (Human(x) → Mortal(x))
∃x (Human(x) ∧ Philosopher(x))
¬(∀x P(x)) ↔ ∃x ¬P(x)

ASCII Alternatives

forall x (Human(x) -> Mortal(x))
exists x (Human(x) & Philosopher(x))
~(forall x P(x)) <-> exists x ~P(x)

Operators Reference

Unicode ASCII Meaning
forall Universal quantifier
exists Existential quantifier
& Conjunction (AND)
| Disjunction (OR)
-> Implication
<-> Biconditional
¬ ~ Negation

Problem Types

Classic Syllogism

Premises:
  ∀x (Human(x) → Mortal(x))
  Human(socrates)

Conclusion:
  Mortal(socrates)

Result: PROVED

Existential Reasoning

Premises:
  ∀x (Student(x) → ∃y (Course(y) ∧ Takes(x, y)))
  Student(alice)

Conclusion:
  ∃y Takes(alice, y)

Result: PROVED

Read the full file on GitHub · 175 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. 2d ago First seen · 175 lines · 20 tokens per session scan A d29c1ae59aaa

Subscribe to this mod's changes

fol-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,146 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.

Related

Other agents, from other repositories

editor

Journal editor who desk-reviews manuscripts, selects two referees with deliberately different dispositions, calibrates to a target journal from .claude/references/journal-profiles.md, and synthesizes an editorial decision (FATAL / ADDRESSABLE / TASTE). Used by /review-paper --peer [journal].

pedrohcgs/claude-code-my-workflow · 64 tokens

algorithm-expert

RL algorithm expert. Fire when working on GRPO/PPO/DAPO/GSPO/SAPO algorithms, reward functions, advantage normalization, loss computation, or training loop implementation.

redai-infra/Relax · 37 tokens

by-epitope

Deep epitope analysis agent. Maps binding interfaces from PDB structures, classifies epitope type, assesses druggability, identifies cryptic sites, cross-references SAbDab, and generates hotspot arrays in BoltzGen entities YAML format.

001TMF/blatant-why · 58 tokens

mathodology-coder

Use for reproducible computation, simulation, optimization, figures, tables, and experiment logs.

sweetcornna/mathodology · 24 tokens

mathodology-problem-analyst

Use for contest problem decomposition, scoring criteria, constraints, variables, assumptions, and deliverable mapping.

sweetcornna/mathodology · 29 tokens

scientist

AI/ML researcher — paper analysis, hypothesis generation, experiment design. ONLY for named research paper/hypothesis/experiment. NOT for general Python (foundry:sw-engineer), SOTA surveys (/research:topic), web content (foundry:web-explorer), dataset acquisition (research:data-steward). TRIGGER: implementing from…

Borda/AI-Rig · 77 tokens