PRO-LONG: Programmatic Memory for Long-Horizon Reasoning in LLM Agents

PRO-LONG boosts LLM agent performance on long-horizon tasks by 18% using programmatic memory, achieving up to 97.4% on ARC-AGI-3 with fewer tokens.

viernes, 24 de julio de 2026 • 5 min read • Q2BSTUDIO Team

Memoria programática: clave para tareas de largo plazo en IA

Long-horizon reasoning remains one of the greatest challenges for agents based on large language models (LLMs). Tasks that require sustained perception, exploration, and multi-step deduction —such as visual puzzles, logistics planning, or continuous data analysis— expose the limitations of these systems when evaluated out of the box without specific adaptations. The ARC-AGI-3 benchmark, designed to measure general intelligence in agents, shows significant performance drops in off-the-shelf models. In response, various harnesses have emerged to close this gap, but all face a fundamental dilemma: what information from the environment should be saved and how should it be loaded into the model's context? Saving too much makes retrieval of relevant details intractable; saving too little sacrifices critical information. In this article, we analyze an innovative solution, PRO-LONG, which proposes a programmatic memory approach to overcome this tradeoff, and explore how this concept can transform real-world business applications.

PRO-LONG is based on a simple yet powerful premise: maintain a complete, structured interaction log —a programmatic journal— and leverage recent advances in coding agents to efficiently search this history. Instead of compressing or summarizing observations, the system preserves all information in a format accessible to an automated search engine. When the agent needs to retrieve a relevant piece of data, it triggers a query process that quickly traverses the programmatic memory. This design eliminates the compromise between information richness and retrieval tractability. Results on the public ARC-AGI-3 set are compelling: PRO-LONG improves a base coding agent by an average of 18.0 percentage points across frontier models, matches or surpasses state-of-the-art specialized harnesses (up to 76.1% pass@1), and uses 4.2 to 5.8 times fewer tokens. Furthermore, with the Fable 5 model it achieves 97.4% best@2 at a total cost of only $1,750.

From a technical perspective, what makes PRO-LONG special is its minimalism. It requires no complex external memories or costly context transformations. A structured representation of interactions —for example, in JSON or a programming language— and an agent that knows how to write queries over that structure suffice. This approach is directly applicable to enterprise environments where AI agents must operate over long periods, such as monitoring systems, data analysis assistants, or autonomous decision platforms. The key is that memory is not a passive store but an active resource accessed via code, allowing natural integration with existing workflows.

At Q2BSTudio, we understand that such innovations make a difference in digital transformation projects. That is why our artificial intelligence services focus on designing agents with prolonged reasoning capabilities, tailored to each client's specific needs. For example, an agent analyzing sales data over months can benefit from a programmatic memory that allows it to recall seasonal patterns without losing response speed. Similarly, in cybersecurity, a persistent monitoring agent tracking threats over time needs exactly this type of architecture to correlate distant events without saturating its context. Token efficiency translates directly into lower cloud operational costs, as fewer data must be processed in each model call.

The cloud plays a fundamental role in deploying solutions like PRO-LONG. By hosting agents with programmatic memory on cloud AWS/Azure infrastructure, it is possible to scale history storage and computing capacity for search queries. Our team at Q2BSTudio helps companies set up cloud architectures that maximize the performance of these agents, combining managed storage services with serverless functions to execute programmatic searches. Moreover, integration with Business Intelligence tools like Power BI allows visualization of patterns the agent discovers during long-term exploration, offering business stakeholders actionable insights without constant manual intervention.

Another relevant aspect is customization. Every organization has distinct data flows and decision criteria. The custom software applications we develop at Q2BSTudio incorporate programmatic memory modules adapted to particular business logic. For instance, an inventory management system can use an agent that remembers demand evolution over several quarters and recommends reorder points based on historical trends, all without losing the context of the current conversation. This kind of process automation, supported by AI agents with efficient memory, reduces operational burden and improves decision accuracy.

Cybersecurity also benefits from this architecture. Security agents that monitor logs and events over weeks or months need to correlate incidents that, at first glance, seem isolated. With programmatic memory, the agent can store each event in a structured way and, when an anomaly is detected, search the full history for previous patterns. This enables identification of long-duration attacks or slowly deployed phishing campaigns. At Q2BSTudio we offer cybersecurity services that include the design of intelligent surveillance agents, combining our AI expertise with robust security practices.

From a business analysis perspective, combining agents with programmatic memory and Power BI dashboards opens a range of possibilities. Imagine an agent that explores sales, marketing, and operations data over several months, periodically generating summary reports. Instead of processing the entire history each time, the agent uses its programmatic memory to access only relevant fragments, saving time and computation costs. The results are reflected in interactive visualizations that allow teams to make decisions based on long-term trends. This is precisely the kind of solution we develop at Q2BSTudio under our BI / Power BI umbrella, integrating cutting-edge artificial intelligence with enterprise reporting tools.

The impact of PRO-LONG goes beyond a mere technical advance. It represents a paradigm shift in how AI agents manage memory: from a limited, static resource to a dynamic, code-queryable one. For companies seeking to automate complex, long-duration processes, this approach offers a practical and scalable path. At Q2BSTudio, as a software and technology development company, we are committed to bringing these innovations to our clients, whether through custom applications, cloud deployments, cybersecurity solutions, or business intelligence systems. Programmatic memory is not just a solution for benchmarks; it is a tool to build AI agents that truly understand the long term.

In summary, PRO-LONG demonstrates that efficient long-horizon reasoning is achievable without sacrificing information or incurring exorbitant costs. Its minimalist design, based on structured logs and coding agents, aligns perfectly with today's business needs. At Q2BSTudio, we apply these principles to develop custom software solutions that enhance artificial intelligence, automation, and decision-making. If your organization faces challenges requiring prolonged analysis or continuous monitoring, having an AI agent equipped with programmatic memory can make the difference between a delayed response and an informed real-time decision.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.