arXiv:2610.32092cs.CROct 2026

Manuscript Offprint

arXiv:2610.32092

AgentTrace: Execution-Level Fingerprinting of Black-Box LLM Agents

Gejian Zhao, Hanzhou Wu, Xinpeng Zhang

Abstract

Verifying the provenance of autonomous LLM agents is a critical security challenge. Existing semantic attribution is easily obfuscated by system prompts, while active watermarking conflicts with schema-constrained tool generation. We propose AgentTrace, an active framework that identifies the foundation model behind a black-box agent via observable execution traces. AgentTrace injects structurally ambiguous probes to trigger tokenization-sensitive serialization failures at rigid tool interfaces. While these initial failures provide coarse-grained separation across model families, the temporal sequence of subsequent repair operations reveals fine-grained, model-specific recovery behaviors. By modeling these multi-step trajectories with lightweight Markov chains, AgentTrace achieves 96.0% attribution accuracy under adversarial identity spoofing. Crucially, sequential repair modeling successfully distinguishes the evaluated intra-family variants sharing identical tokenizers (e.g., Llama-3 8B/70B), substantially outperforming unordered behavioral statistics while remaining robust against prompt obfuscation and temperature scaling.

1 Introduction

Large language models (LLMs) are increasingly deployed as autonomous agents that plan, reason, and execute tasks through tool integration (Li et al., 2026; Dwivedi et al., 2026). These agents are often exposed as opaque black-box services, with foundation models hidden behind APIs, system prompts, and orchestration layers (Dong et al., 2024). This layered design makes provenance verification substantially harder than in standard conversational settings (He et al., 2025). As such agents increasingly interact with critical infrastructure, verifying their provenance becomes not only an ownership concern but also a security requirement.

A pressing threat in this opaque ecosystem is model spoofing, where providers covertly wrap high-performance models under false proprietary claims (Gubri et al., 2024; Pasquini et al., 2025). Unmasking such agents exposes fundamental limitations in current fingerprinting techniques. Passive methods relying on n-gram distributions (Tay et al., 2020), perplexity (Mitchell et al., 2023), or stylometry (Uchendu et al., 2020) fail because agentic prompts effectively rewrite outputs, destroying raw statistical assumptions (Gudibande et al., 2024). Furthermore, active watermarking (Kirchenbauer et al., 2023) introduces a severe utility-security trade-off in structured generation (e.g., JSON), as probability perturbations disrupt the strict syntactic precision required by external tools (Ajith et al., 2024; Zhao et al., 2026).

To break this impasse, we pivot from semantic fingerprinting to execution profiling (Figure 1). Consider an agent tasked with generating a schema-constrained API identifier. While a target model might tokenize this string efficiently, a spoofed agent relying on a different tokenizer may partition it into disparate subwords. We empirically observe that such tokenization discrepancies often induce reconstruction instability during serialization, manifesting as subtle structural artifacts like spurious whitespace. Although semantically benign in natural language, these artifacts are deterministically amplified into execution failures by rigid tool parsers.

By treating attribution as an active sequential identification task, we propose AgentTrace. Unlike semantic probing methods that query textual boundaries, AgentTrace searches for adversarial probes maximizing the discriminative information within multi-step execution traces. By systematically inducing and profiling these traces, our framework unmasks the underlying model. Crucially, AgentTrace utilizes a two-tiered attribution signal: the initial tokenization-sensitive failure provides coarse-grained separation, while the subsequent model-specific repair policy exposes fine-grained

Figure

Figure 1: Conceptual workflow of AgentTrace. A genuine target model may reproduce a structurally ambiguous identifier successfully. A spoofed model with a different tokenization pattern may produce malformed escaping or other serialization anomalies rejected by the parser. AgentTrace combines the tokenization-sensitive failure category with the subsequent sequence of repair operations to identify the underlying model.

behavioral signatures that remain empirically stable across our evaluated settings, transcending prompt obfuscation (Singh and Strouse, 2024).

In summary, our main contributions are:

• We identify a novel two-tiered execution-level attribution signal: tokenization-sensitive execution outcomes for cross-family separation, and model-specific sequential repair policies for intra-family differentiation.

• We propose AgentTrace, an active framework that uses mutual information as an intuitive motivation to guide system identification, utilizing multi-dimensional repair trajectories to unmask spoofed agents.

• We construct a comprehensive benchmark and demonstrate state-of-the-art attribution performance. Our ablation studies confirm that modeling sequential repair behaviors is essential for separating identically-tokenized variants.