CP-Agent: Agentic Constraint Programming
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
The translation of natural language to formal constraint models requires expertise in the problem domain and modeling frameworks. To explore the effectiveness of agentic workflows, we propose CP-Agent, a Python coding agent that uses the ReAct framework with a persistent IPython kernel. We provide the relevant domain knowledge as a project prompt of under 50 lines. The algorithm works by iteratively executing code, observing the solver's feedback, and refining constraint models based on execution results. We evaluate CP-Agent on 101 constraint programming problems from CP-Bench. We made minor changes to the benchmark to address systematic ambiguities in the problem specifications and errors in the ground-truth models. On the clarified benchmark, CP-Agent achieves perfect accuracy on all 101 problems. Our experiments show that minimal guidance outperforms detailed procedural scaffolding. Our experiments also show that explicit task management tools can have both positive and negative effects on focused modeling tasks.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 15 of its 37 references that are in the map. First posted on arXiv 10 Aug 2025.
Builds on
15 of 37 references.
Closest ancestors · 3
Same direction, newest first
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repair25 Mar
- 2024Executable Code Actions Elicit Better LLM Agents1 Feb
Other references · 12
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2023Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Modelscited by 550
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 443
- 2025Model Context Protocol (MCP): Landscape, Security Threats, and Future Research Directionscited by 257
- 2023NL4Opt Competition: Formulating Optimization Problems Based on Their Natural Language Descriptionscited by 133
- 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
- 2023Holy Grail 2.0: From Natural Language to Constraint Modelscited by 24
- 2024Step-by-Step Reasoning to Solve Grid Puzzles: Where do LLMs Falter?cited by 18
- 2024Combining Constraint Programming Reasoning with Large Language Model Predictionscited by 8
Built on by
Citing papers per year: 2025: 1; 2026: 5.
6 papers.
- 2026Code as Agent Harnesscited by 40
- 2025Gala: Global LLM Agents for Text-to-Model Translationcited by 2
- 2026CP-SynC: Multi-Agent Zero-Shot Constraint Modeling in MiniZinc with Synthesized Checkerscited by 2
- 2026ASP-Bench: From Natural Language to Logic Programscited by 0
- 2026Improving Constraint Models with LLM Agentscited by 0
- 2026Agentic AI-Assisted Modeling for Production Scheduling: Assessment in Constraint Programmingcited by 0
- 2026Agentic AI-Assisted Modeling for Production Scheduling: Assessment in Constraint Programming7 Oct 2026
- 2026Improving Constraint Models with LLM Agents8 Aug 2026
- 2026Code as Agent Harness18 May 2026
- 2026CP-SynC: Multi-Agent Zero-Shot Constraint Modeling in MiniZinc with Synthesized Checkers3 May 2026
- 2026ASP-Bench: From Natural Language to Logic Programs1 Feb 2026
- 2025Gala: Global LLM Agents for Text-to-Model Translation10 Sep 2025
Similar, not cited
Close in wording, no citation either way
- 2026RunAgent: Interpreting Natural-Language Plans with Constraint-Guided Execution
- 2026Codoku: Renewable Program-Reasoning Challenges for Frontier Coding Agents
- 2026Synthesizing Feature Extractors: An Agentic Approach for Algorithm Selection
- 2026Agentic MIP Research: Accelerated Constraint Handler Generation
- 2026MAS-Algorithm: A Workflow for Solving Algorithmic Programming Problems with a Multi-Agent System
- 2025Polymath: A Self-Optimizing Agent with Dynamic Hierarchical Workflow
- 2025AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunities
- 2026AgentSPEX: An Agent SPecification and EXecution Language