NOW LET US – AI RAG SaaS Studio TP.HCM
NOW LET US
Digital Product Studio
Back to news
AGENTIC-SYSTEMS...1 min read

Lean4Agent: Formal Modeling and Verification for Agent Workflow and Trajectory

Share
NOW LET US Article – Lean4Agent: Formal Modeling and Verification for Agent Workflow and Trajectory

Researchers have introduced Lean4Agent, the first framework that leverages the Lean4 formal language to model and verify AI agent workflows. By addressing natural language ambiguity, it significantly enhances the reliability and execution performance of LLMs.

Computer Science > Artificial Intelligence

Title:Lean4Agent: Formal Modeling and Verification for Agent Workflow and Trajectory

View PDF HTML (experimental)Abstract:Equipping Large Language Models (LLMs) to execute reliable multi-step workflows has become a central challenge in artificial intelligence. Despite recent advances in LLMs' agentic capabilities, most agent systems still lack formal methods for specifying, verifying, and debugging their workflow and execution trajectories. This challenge mirrors a long-standing problem in mathematics, where the ambiguity of natural languages (NLs) motivates the development of formal languages (FLs). Inspired by this paradigm, we propose Lean4Agent, to the best of our knowledge, the first framework that uses Lean4, a dependent-type FL to model and verify agent behavior. Lean4Agent launches FormalAgentLib, an extensible Lean4 library for formally modeling and verifying agent workflows' semantic consistency under explicit assumptions, and enabling localization of execution-time failures revealed by trajectories. Building on FormalAgentLib, we further develop LeanEvolve, which applies results in FormalAgentLib to revise workflows to enhance its capability. Extensive experiments on a hard problem subset of SWE-Bench-Verified and a subset of ELAIP-Bench across 5 leading LLMs indicate that the verification-passing workflows outperform the failing ones by an average of 11.94%, and LeanEvolve further improves SWE performance by 7.47% on average. Furthermore, Lean4Agent establishes a foundation for a new field of using expressive dependent-type FL to formally model and verify agent behavior.

Current browse context:

Bibliographic and Citation Tools

Code, Data and Media Associated with this Article

Demos

Recommenders and Search Tools

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

© 2026 Now Let Us. All rights reserved.

Source: arXiv cs.AI Recent

Advertisement
Ad slot ready: 5887729102

More in this category

NOW LET US Related – Attack Selection in Agentic AI Control Evaluations Meaningfully Decreases Safety

agentic-systems

Attack Selection in Agentic AI Control Evaluations Meaningfully Decreases Safety

A new study reveals that current AI safety evaluation frameworks overestimate security by assuming non-strategic attackers. By strategically choosing when to start and abort attacks, rogue AI agents can easily evade monitoring systems, significantly reducing empirical safety.

NOW LET US Related – Accelerated Fourier SAT (AFSAT): Fully Realising a GPU-based Symmetric Pseudo-Boolean SAT Solver

agentic-systems

Accelerated Fourier SAT (AFSAT): Fully Realising a GPU-based Symmetric Pseudo-Boolean SAT Solver

Researchers have introduced AFSAT, a GPU-accelerated pseudo-Boolean solver based on continuous local search. By leveraging the JAX compiler, AFSAT overcomes memory and floating-point limitations, delivering superior performance and near-linear scaling across multiple accelerators.

NOW LET US Related – CrowdMath: A Dataset of Crowdsourced Mathematical Research Discussions

agentic-systems

CrowdMath: A Dataset of Crowdsourced Mathematical Research Discussions

The newly introduced CrowdMath dataset evaluates AI's ability in collaborative mathematical problem-solving. While frontier LLMs excel at individual reasoning, they struggle to understand the functional roles of contributions in collaborative research discussions.

NOW LET US Related – Exploring Agentic Tool-Calling Decisions via Uncertainty-Aligned Reinforcement Learning

agentic-systems

Exploring Agentic Tool-Calling Decisions via Uncertainty-Aligned Reinforcement Learning

Researchers have proposed TRUST, a novel reinforcement learning framework that aligns uncertainty quantification with reward design to improve tool-calling decisions in LLM agents, preventing overconfident mistakes.

NOW LET US Related – Detecting and Mitigating Bias by Treating Fairness as a Symmetry Operation

agentic-systems

Detecting and Mitigating Bias by Treating Fairness as a Symmetry Operation

Researchers propose a novel framework that treats fairness in machine learning as a symmetry operation, mitigating bias by over 90% with minimal impact on accuracy.

NOW LET US Related – A Study of Parallel Continuous Local Search

agentic-systems

A Study of Parallel Continuous Local Search

A new study explores parallel Continuous Local Search (CLS) as an efficient approach for solving Boolean satisfiability (SAT) problems, offering key insights for implementation on modern accelerator hardware.

EXPLORE TOPICS

Discover All Categories

Deep dive into the specific technology sectors that matter most to you.