arXiv:2611.03939cs.HCNov 2026

Manuscript Offprint

arXiv:2611.03939

From Benchmarks to Behaviors: A Framework for Auditing AI Agents

Nick Hagar

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Generative AI systems increasingly mediate access to information. Their behavior depends on tools, instructions, and user memories that are often difficult for researchers to observe or control. Here, I introduce TRACE (Transparent Research on Agent Contexts and Environments), a framework for systematically auditing how these components shape AI agent behavior. Built on an open-source agent harness, TRACE enables controlled manipulation of system components. It also records inputs, outputs, and task execution for downstream analysis. I demonstrate this framework through an experiment examining how user memories influence source selection when agents answer questions about the 2026 U.S. midterm elections. I find that memories expressing explicit preference for a publisher increase its inclusion among the first three cited sources in a response by 33-39 percentage points. Memories identifying the user as a Republican or expressing distrust of mainstream media shift citations rightward. That same media distrust memory also increases citation of sources expressing misinformation or conspiracy theories by 6.3 percentage points, with substantial variation across models. These findings demonstrate that concise user memories can alter source selection in consequential settings, even when questions and search results remain fixed. TRACE extends algorithm auditing to agent harnesses, providing a transparent way to study agent behaviors that benchmarks or commercial interfaces may struggle to isolate.

1 Introduction

Consumer-facing generative AI (GenAI) tools like ChatGPT and Claude have permeated many tasks that were formerly the domain of search engines. Consumers now turn to generative AI for information about health (Wardle et al., 2025), politics (Luettgau et al., 2025), and current events (Simon et al., 2025)—in one September 2025 survey, 4% of respondents reported completely replacing Google searches with chatbot questions (On Marketing, 2025). Even for users who rely primarily on Google, features like AI Overviews introduce synthesized answers generated by large language models into conventional search results (Chapekis and Lieb, 2025). GenAI has become a consequential information intermediary.

Prior work has established that information intermediaries are not neutral brokers of credible information. Across platforms, algorithm audits have documented instances of imbalanced or nonrepresentative search results (Trielli and Diakopoulos, 2019; Diakopoulos et al., 2021), preferential treatment of platforms' own offerings within search results (Kim and Luca, 2019), and the appearance of incorrect or harmful information in response to sensitive queries (Ghezzi et al., 2020). Initial audits of GenAI search systems have started to identify similar concerns—for example, citations that do not substantiate the statements they accompany (Liu et al., 2023) or source selection driven by publishers' political leanings (Dai et al., 2025).

Algorithm audits are crucial to understanding how technologies influence the information that their users receive. They are also technically challenging to conduct (Hannak et al., 2013; Robertson et al., 2018) and further complicated by several common aspects of GenAI systems. First, the probabilistic outputs of large language models (LLMs) can vary substantially across repeated invocations of the same query (Manakul et al., 2023). Second, in addition to the LLM, a GenAI system's behavior depends on its harness: the accompanying tools, instructions, context management, and guardrails that operate in the background to shape behavior and outputs (Li et al., 2026b). Finally, memory features in GenAI systems can retain information from prior interactions and use it to personalize subsequent responses, potentially shaping the information users encounter (Chandrasekar, 2026). These factors create compounding opportunities for variance in the kinds of information a tool surfaces, conditioned on factors that are difficult or impossible for a researcher to observe. To better understand how GenAI systems surface information, researchers require a transparent and systematic way to scrutinize their components.

Here, I propose TRACE (Transparent Research on Agent Contexts and Environments), an evaluation framework that allows researchers to systematically inspect how the internal workings of a GenAI system impact its behavior and responses. TRACE uses Pi, an open-source and customizable harness for GenAI agents (Pi contributors, 2026d), as a transparent platform for selectively varying system prompts, user memories, and tool behavior. As part of this work, I make an open-source implementation of TRACE available via the JavaScript package registry npm.¹

To demonstrate the capabilities of TRACE, I audit how user memories shape the sources six LLMs cite when answering questions about the 2026 U.S. midterm elections. Across 3,000 trials with fixed search results, memories expressing a preference for a particular publisher increase its inclusion among the first three cited sources in a response by 33–39 percentage points. Memories identifying the user as a Republican or expressing distrust of mainstream media shift citations rightward. The memory expressing media distrust also increases

¹https://www.npmjs.com/package/@nhagar/trace citation of sources presenting misinformation or conspiracy claims by 6.3 percentage points. These findings show how user memories might alter the selection and presentation of sources in AI-mediated information seeking.

TRACE extends the practices of algorithm auditing to AI agents by treating the agent harness itself as an object of experimental inquiry. By pairing controlled changes to tools, instructions, and memory with detailed records of agent activity, it allows researchers to isolate how particular components shape behavior. Together, the framework and case study emphasize that understanding GenAI systems as information intermediaries requires close scrutiny of the system components that surround and interact with LLMs.

References (75)