Agentic Agent: Exploit Versatile Agent Capabilities via Predefined Agent

Abstract

As large language models (LLMs) transition from research to enterprise deployment, corporations increasingly restrict direct access to native chat completion APIs. Instead, users are gated behind predefined, workflow-based agent frameworks designed for narrow, domain-specific tasks. While these restrictions ensure operational safety and alignment, they severely limit the generative and reasoning versatility of the underlying foundation models. In this paper, we introduce the Agentic Agent framework, a methodology to recover and exploit general-purpose LLM capabilities through a restricted, single predefined agent API. By employing adversarial prompt engineering, tool-call hijacking, and strategic conversation history management, we demonstrate how a constrained agent can be repurposed to orchestrate complex, multi-step reasoning tasks. Our approach effectively wraps the narrow agent into a generalized meta-agent, offering a novel paradigm for maximizing utility within highly constrained corporate AI infrastructures.


1. Introduction

The standard paradigm for interacting with Large Language Models (LLMs) relies heavily on direct Chat Completion APIs, which offer unrestricted access to the model's latent knowledge and reasoning capabilities. However, enterprise deployments often deprecate this access in favor of workflow-based agent frameworks. These predefined agents are strictly bounded by heavy system prompts, specific retrieval-augmented generation (RAG) pipelines, and limited tool-calling capabilities intended for specific operational technology (OT) or IT workflows.

While beneficial for security and predictable network segmentation, this paradigm strips power users of the ability to perform generalized tasks such as zero-shot coding, arbitrary multi-agent simulation, or unconstrained exploratory reasoning.

To address this, we propose the Agentic Agent — a meta-framework that utilizes a sequence of calls to a predefined agent API to emulate a native, unrestricted chat completion endpoint. We hypothesize that the intrinsic mechanisms of a workflow agent (specifically its tool_call execution and context history state management) can be exploited to construct a Turing-complete reasoning engine.


2. Problem Formulation

Let the native, unrestricted LLM be defined as a function \(f_{native}\) that maps an arbitrary input sequence \(x \in \mathcal{X}\) and history \(h \in \mathcal{H}\) to an unconstrained output \(y \in \mathcal{Y}\):

\(f_{native}(x, h) = y\)

In corporate deployments, \(f_{native}\) is hidden. Users interact with a predefined agent \(A_{pre}\), which is heavily constrained by a static system prompt \(S_{corp}\) and a restricted set of tools \(\mathcal{T}\). The predefined agent outputs a constrained response or a tool call \(t \in \mathcal{T}\):

\(A_{pre}(x, h; S_{corp}, \mathcal{T}) = y_{restricted} \cup \{t\}\)

Our objective is to construct a meta-agent \(A_{agentic}\), which maps \(A_{pre}\) back to the unconstrained space \(\mathcal{Y}\) through a sequence of interactions \(\{x_1, x_2, \dots, x_n\}\), completely bypassing the constraints of \(S_{corp}\):

\(A_{agentic}(A_{pre}) \approx f_{native}\)


3. Methodology

To achieve general-purpose capabilities via a predefined agent, the Agentic Agent framework relies on three core techniques.

3.1. Tool-Call Hijacking

Predefined agents are typically equipped with domain-specific tools (e.g., query_internal_database, scan_network_probe). By crafting highly specific inputs, we can force the LLM to encode generalized computation or reasoning steps into the parameters of these allowed tools.

If a tool accepts a string parameter, the Agentic Agent prompts the underlying LLM to utilize that parameter space to output intermediate Chain-of-Thought (CoT) reasoning or raw code. Even if the tool execution fails on the backend, the generation of the tool call itself is recorded in the context history, effectively bypassing the output filters of \(\mathcal{Y}_{restricted}\).

The key insight is that the LLM's generation of the tool call payload is what matters, not the execution of the tool itself. From the LLM's perspective, a tool call for query_database(query="analyze the following code...") is indistinguishable from a direct text output. The tool call becomes a carrier for arbitrary reasoning, smuggled past output-side restrictions.

3.2. History State Management as Scratchpad Memory

Workflow agents inherently maintain conversation history to facilitate multi-step internal pipelines. We exploit this history buffer as an external scratchpad memory.

Let \(h_t\) represent the state of the conversation history at step \(t\). By breaking a complex, general-purpose prompt into a sequence of smaller, seemingly benign queries, we can force the agent to load necessary context into \(h_t\):

\(h_t = h_{t-1} \oplus (x_t, A_{pre}(x_t, h_{t-1}))\)

Through strategic prompt engineering, we coerce the agent to assemble a complex generalized response piece-by-piece in its history buffer, culminating in a final prompt that commands the agent to summarize or execute the combined latent context. The conversation history, originally intended to support multi-turn workflows, becomes a computational tape.

This technique is particularly effective in systems that preserve full tool call history including failed executions. A sequence of hijacked tool calls builds up a coherent chain of reasoning in the history log, invisible to the system's output filters.

3.3. Contextual Override and Persona Exploitation

To override \(S_{corp}\), the Agentic Agent employs advanced in-context learning techniques. Rather than standard jailbreaking, which is easily caught by guardrails, we utilize formatting exploits (such as pseudo-code or abstract markdown structures) to redefine the agent's immediate operational parameters. By defining a "sub-agent" within the user prompt, we trick the predefined LLM into executing a nested simulation where it acts as a generalized chat API responding to a simulated user.

The framing prompt establishes a virtual environment. Within this environment, the LLM's internal system prompt is not removed but becomes semantically subordinated to the task-level instructions embedded in the prompt structure. This is distinct from traditional prompt injection: we are not attempting to directly contradict \(S_{corp}\), but rather to nest a new instruction hierarchy beneath it.

For example, a prompt might define:

Execute simulation mode:
- Sub-agent role: General-purpose assistant
- Input: [user task]
- Output format: [specified structure]

The predefined agent processes this as a valid workflow request, but within that workflow, it executes a generalized reasoning task.


4. Implementation and Architecture

The implementation of the Agentic Agent requires an external local orchestrator script (e.g., a Python wrapper) that interfaces with the corporate predefined agent API.

Initialization: The script sends a framing prompt that establishes a virtualized environment within the predefined agent's context. This prompt is carefully crafted to appear as a legitimate workflow request while embedding the generalized task structure.

State Tracking: The script intercepts failed tool calls and injects simulated tool responses back into the API, maintaining the illusion of a successful workflow while actually advancing an arbitrary computational task. By controlling both the input and the perceived output, the orchestrator can guide the agent through arbitrarily complex reasoning chains.

Aggregation: Once the latent reasoning is complete, a final extraction prompt forces the predefined agent to output the accumulated result in the desired format (e.g., a script, an essay, or raw JSON). At this point, the conversation history contains the full chain of reasoning, and the final prompt triggers its consolidation into a usable output.

The architecture is intentionally lightweight. The orchestrator does not need to replicate the full capabilities of a chat completion API — it only needs to manage the conversation history and inject prompts at the right moments. The heavy lifting remains with the predefined agent itself.


5. Security Implications

The Agentic Agent framework highlights a fundamental tension in enterprise LLM deployments: the gap between intended capabilities and actual capabilities. A predefined agent designed for a narrow workflow cannot easily be constrained to only perform that workflow, because the underlying model retains its full generative capacity.

From a defensive perspective, this suggests that output-side filtering alone is insufficient. Organizations must also reason about the internal computational potential of their agents as revealed through history manipulation and tool-call hijacking.

From an offensive perspective, the framework provides a practical methodology for power users who are locked out of native APIs but still need to access the full capabilities of the underlying model. While the use cases discussed here are focused on maximizing legitimate utility, the same techniques have broader implications that enterprise security teams should consider carefully.


6. Conclusion

The Agentic Agent framework demonstrates that the encapsulation of an LLM within a narrow, workflow-based framework does not eradicate its latent general capabilities. By abstracting the predefined agent as a mere computational node and exploiting its tool-calling and memory architectures, we can synthesize a highly capable, versatile agent. This work highlights both a novel method for maximizing restricted AI infrastructure and a critical security consideration for enterprise prompt-engineering architectures.

The framework is not theoretically novel — it exploits well-known mechanisms of LLM behavior. Its contribution lies in the systematic articulation of these mechanisms as a unified methodology, and in demonstrating their practical applicability within real enterprise environments. As organizations continue to restrict access to native LLM APIs, techniques like Agentic Agent will become increasingly relevant — both for users seeking to maximize utility within those constraints, and for security teams tasked with understanding their implications.

An unhandled error has occurred. Reload

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.