INQUIRING LINE

How do external prompt artifacts improve agent behavior compared to inline instructions?

This explores why moving an agent's instructions, skills, and memory *out* of the prompt — into files, libraries, runtime memory, and executable code — tends to beat stuffing everything inline, and what the corpus says about when that helps.


This explores why moving an agent's instructions, skills, and memory *out* of the prompt and into external artifacts tends to beat stuffing everything inline. The corpus converges on a surprisingly unified answer: reliability doesn't come from a bigger model or a longer prompt, it comes from offloading cognitive burdens into structures the agent can consult, execute, and update. One synthesis note makes this the explicit thesis — reliable agents externalize three things (memory for state, skills for procedures, protocols for interaction) into a 'harness' layer so the model stops re-solving the same problems on every call Where does agent reliability actually come from?. Inline instructions ask the model to hold and re-derive everything in-context each time; external artifacts let it look things up instead.

The most concrete payoff is in skills and workflows. Rather than describing a procedure in the prompt, agents can store reusable routines as external, indexed artifacts and compose them. VOYAGER keeps executable skills in an embedding-indexed library and builds complex skills from simpler ones, which lets it learn continuously without the catastrophic forgetting that weight-updating causes Can agents learn new skills without forgetting old ones?. Agent Workflow Memory takes the same move at finer grain — it induces sub-task routines, strips out example-specific values, and reuses them, yielding 24–51% gains that *grow* as tasks drift further from training Can agents learn reusable sub-task routines from past experience?. The lesson: an externalized routine generalizes where an inline instruction, baked to one example, does not.

There's a subtlety the corpus insists on, though: external artifacts only help if their *shape* matches the task. Memory granularity is domain-conditional — workflow-level memory wins in routine-rich domains, causal-rule memory in environment-rich ones, state-action memory in fiddly web UIs Does agent memory work better at one level of abstraction?. And the artifact has to actually be *in the path the agent reads*. A study of a long-running agent found that governance rules encoded directly into the runtime memory layer worked, where external policy documents didn't — because the agent consulted memory during decisions but never opened the policy doc Can governance rules embedded in runtime memory actually protect autonomous agents?. Externalizing instructions is only an improvement when the agent reliably re-consults them; otherwise it's worse than inline.

The deepest version of this idea is treating the artifact as *executable environment* rather than text to be attended to. Code, uniquely, is inspectable, stateful, and runnable, which lets an agent externalize its reasoning and then verify it Can code become the operational substrate for agent reasoning?. Recursive Language Models push the long prompt itself out into a Python REPL the model queries via code, dodging attention degradation and handling inputs 100× past the context window — and beating the base model even on *short* prompts Can models treat long prompts as external code environments?. That's the strongest case against inline: a prompt the model must attend to all at once degrades, while the same content as a queryable external store does not. Memory-folding work makes the complementary point that the externalized store must be compressed into structured schemas, or it degrades too Can agents compress their own memory without losing critical details?.

Worth knowing if you came in thinking this was a prompt-engineering question: the boundary between 'inline prompt' and 'external program' is blurrier than it looks. Prompting is formally Turing-complete — a single transformer can in principle run any program from the right prompt Can a single transformer become universally programmable through prompts? — and agent architectures can be viewed as optimizable computational graphs where node-prompts and edge-connectivity are tuned together Can we automatically optimize both prompts and agent coordination?. So the real win of external artifacts isn't that they're 'outside the prompt' per se; it's that they're *persistent, reusable, inspectable, and consulted on demand* — properties an inline instruction, rewritten from scratch every turn, structurally can't have.


Sources 10 notes

Where does agent reliability actually come from?

Research shows reliable LLM agents externalize three cognitive burdens—memory (state persistence), skills (procedural components), and protocols (structured interaction)—into a harness layer rather than relying on model scale alone. The harness unifies these externalities and eliminates the need for the model to solve the same problems repeatedly.

Can agents learn new skills without forgetting old ones?

VOYAGER demonstrates that storing executable skills in an embedding-indexed library and composing complex skills from simpler ones allows agents to learn continuously while avoiding the forgetting that occurs with weight-update-based methods. Environmental feedback refines skills while an automatic curriculum drives continual exploration.

Can agents learn reusable sub-task routines from past experience?

Agent Workflow Memory induces sub-task routines at finer granularity than full tasks, abstracts example-specific values, and compounds them hierarchically. This produces 24.6% relative gain on Mind2Web and 51.1% on WebArena, with larger gains as train-test gaps widen.

Does agent memory work better at one level of abstraction?

Workflow-level memory wins in routine-rich domains, causal-rule memory in environment-rich domains, and state-action memory in spatially-rich web tasks. The optimal abstraction depends on whether task variance comes from arguments, causal structure, or fine-grained UI state.

Can governance rules embedded in runtime memory actually protect autonomous agents?

A persistent agent recorded 889 governance events across 96 active days, with safeguards encoded directly into the memory layer the agent consulted during operation. Runtime-resident governance proved more effective than external policies because the agent actually accessed it during decision-making.

Can code become the operational substrate for agent reasoning?

Research shows code uniquely enables agents to externalize reasoning, execute policies, model environments, and verify progress through its simultaneous executability, inspectability, and statefulness across task steps.

Can models treat long prompts as external code environments?

Recursive Language Models store long prompts in a Python REPL and query them via code execution, avoiding attention degradation. RLMs outperform base models even on shorter prompts while handling inputs two orders of magnitude beyond context windows.

Can agents compress their own memory without losing critical details?

DeepAgent's autonomous memory folding consolidates interaction history into episodic, working, and tool memory schemas. This reduces token overhead while letting agents pause to reconsider strategies—the autonomy and structure together avoid degradation that plagues poorly designed consolidation.

Can a single transformer become universally programmable through prompts?

Research proves a single finite-size transformer exists that can compute any computable function given the right prompt, achieving complexity bounds nearly matching unbounded models. However, standard training rarely produces models that learn to implement arbitrary programs this way.

Can we automatically optimize both prompts and agent coordination?

Language agents represented as computational graphs—where nodes are operations and edges define information flow—reveal that CoT, ToT, and Reflexion are formally equivalent structures. This unified view enables automatic optimization of both node prompts and edge connectivity without manual redesign.

Next inquiring lines