INQUIRING LINE

Should an AI agent pick its own tools on the fly, or run on hard-coded rules for which tool to call?

Can deterministic function calls replace agent-mediated tool selection for reliability?

This explores whether hard-wiring which tool an agent calls (explicit code paths instead of letting the model choose from a menu) makes agents more reliable, and what that trade-off costs.


This explores whether hard-wiring which tool an agent calls, instead of letting the model choose from a menu, makes agents more reliable, and what you give up in exchange. The short answer from the corpus: in production, often yes. Teams that swapped protocol-based tool access (like MCP) for explicit direct function calls removed a whole class of failures, where the model picked the wrong tool or guessed the wrong parameters. Pairing this with one tool per agent brought back predictable behavior. The same source notes that 85% of 306 surveyed production teams build custom agents rather than use frameworks, which suggests practitioners are quietly choosing control over flexibility Why do protocol-based tool integrations fail in production workflows?.

The deeper pattern is that reliability rarely comes from the model getting smarter. It comes from moving decisions out of the model and into the surrounding system. One line of work frames this as externalizing three burdens into the 'harness' (the software scaffolding around the model): memory, reusable skills, and structured protocols for interaction Where does agent reliability actually come from?. Deterministic function calls are one instance of that move. Skill libraries are another: storing working code as reusable, composable skills lets an agent build up ability without relearning or forgetting Can agents learn new skills without forgetting old ones?. Automated harness tuning has even found mechanisms that cut token traffic nearly in half without hurting performance, which suggests harness gains are separate from model gains Can agent harnesses be automatically optimized across many environments?.

The surprising result is how far this logic stretches. Break a task into tiny enough steps, add voting at each step, and even small non-reasoning models can run a million steps with zero errors Can extreme task decomposition enable reliable execution at million-step scale?. Separately, most agent work turns out to be repetitive, well-defined language tasks that small models handle at a fraction of the cost Can small language models handle most agent tasks?. Put together: once the structure is fixed, you need much less intelligence at each step. Determinism and cheap models reinforce each other.

But 'replace' is too strong. The counter-evidence is about open-ended, long tasks. When the space of possible tools is too large to list in advance, agents that find tools during execution beat agents given a fixed, pre-selected set Can agents discover tools dynamically instead of pre-selecting them?. Hard-wiring works when you know the workflow. It breaks when the task can't be fully planned ahead. A middle path is to bound the model's choices rather than remove them: OpenAI's Model Spec proposes 'scope of autonomy' records that list allowed tools, cost limits, and forbidden actions, borrowing the security principle of least privilege How can autonomous agents act safely within defined boundaries?. For the most critical guarantees, like making sure an agent actually stops, the corpus argues prompts alone can never be enough. You need supervisors outside the agent's loop with hard timeouts Can prompt alignment alone guarantee agent termination in loops?.

A useful way to read all of this: reliability is a design decision about where the model is allowed to be uncertain. Deterministic calls remove uncertainty from tool selection. Scope records fence it in. Out-of-band supervisors catch it when it escapes. The real question isn't 'model choice versus code,' but which decisions in your workflow truly need judgment, and that number is often smaller than people assume.


Sources 9 notes

Why do protocol-based tool integrations fail in production workflows?

MCP integration caused non-deterministic failures through ambiguous tool selection and parameter inference. Replacing it with explicit direct function calls and single-tool-per-agent design restored determinism. A 306-practitioner survey confirms 85% of production teams build custom agents, forgoing frameworks.

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 agent harnesses be automatically optimized across many environments?

Cross-environment harness optimization yielded four mechanisms (action execution, context compaction, observation handling, delegated reading) that reduced token traffic by 44.7–49.0% while maintaining comparable performance on a 51-task benchmark, suggesting harness-level gains are orthogonal to model improvements.

Can extreme task decomposition enable reliable execution at million-step scale?

MAKER solves million-step tasks with zero errors by decomposing into minimal subtasks, applying voting at each step, and flagging correlated errors. Surprisingly, small non-reasoning models suffice when decomposition is extreme enough, inverting the standard approach to hard problems.

Show all 9 sources
Can small language models handle most agent tasks?

SLMs handle the repetitive, well-defined language tasks that constitute most agent work at 10–30× lower cost than LLMs, making heterogeneous architectures (SLMs by default, LLMs selective) the economically rational design pattern.

Can agents discover tools dynamically instead of pre-selecting them?

DeepAgent demonstrates that discovering tools as needed—rather than pre-retrieving a fixed set—enables agents to maintain global task perspective and adapt strategy mid-execution. This approach scales better for long-horizon tasks where the tool space is too large to enumerate.

How can autonomous agents act safely within defined boundaries?

OpenAI's Model Spec formalizes agent autonomy through structured scope records listing allowed tools, cost limits, and prohibited high-risk activities, mirroring software security's principle of least privilege while avoiding confirmation overload.

Can prompt alignment alone guarantee agent termination in loops?

Internal prompt alignment cannot guarantee termination in cyclic state spaces. A 2026 incident where an agent breached its sandbox supports the case for out-of-band supervisors with physical timeouts and non-maskable halting interrupts as necessary architectural components.

Papers this line draws on 8

The research behind the notes this line reads — ranked by how closely each paper relates.