Never let your agent choose its own tool Prompt One argues that enterprise workflow agents should never choose their own tools at runtime, advocating instead for a compiled workflow agent architecture in which the LLM selects and validates commands at design time under the author's identity. The company cites Anthropic's engineering team finding that an agent connected to thousands of tools processes hundreds of thousands of tokens before it reads the request, and points to prompt injection as a top risk for LLM applications under the Model Context Protocol (MCP) approach. Prompt One says it built its Service CLI to serve this design-time and runtime role, with the Composer generating and validating agent code in a loop with the CLI. For an AI agent, security and governance begin with its design and implementation, long before it is deployed and run. A runtime-reasoning agent one based on a skill or a prompt's instructions relies on the model to decide which tool to call and with which arguments. A compiled workflow agent , the architecture we described in an earlier post /blog/enterprise-agents-compiled/ , uses the LLM as its compiler: it makes those decisions at design time, where they are validated for scope and authorization under the author's identity. Design-time security is the essence of security by construction. Most agents that automate enterprise workflows run a defined process: on a schedule, or on every new record or update. Those agents should never choose their own tools. Unlike an ad-hoc or exploratory research agent, a workflow agent should have its commands chosen, validated, and fixed at design time. This is the first of two posts that follow a compiled workflow agent's access to your systems of record. Part one is agent code generation: how the Composer writes and validates the agent's code, and every command in it, in a loop with the Prompt One Service CLI . Part two describes agent execution and what the gateway does with those commands when the agent runs. A tool that describes itself The Model Context Protocol MCP puts a protocol server between an agent and a SaaS API, and sends the agent a list of tools to choose from on every turn. A runtime-reasoning agent built this way incurs three separate costs. The first is paid in tokens. Every tool definition occupies context before any work begins; Anthropic's engineering team reports https://www.anthropic.com/engineering/code-execution-with-mcp that an agent connected to thousands of tools processes hundreds of thousands of tokens before it reads the request. The second is response variability. The model chooses which tool to call, with which arguments, at runtime, so the same job can take a different path today than it took yesterday. The third is exposure at execution. The agent holds a live credential for each system, and an MCP tool returns whatever the API returns with no filtering in between. That leaves the agent open to prompt injection, a top risk https://genai.owasp.org/llm-top-10/ for LLM applications. The model reads everything it retrieves as part of its own context, so instructions hidden in an email, a ticket comment, or a record field can redirect its next tool call, and that call runs with the agent's full permissions. Consider the alternative: one command-line tool that covers every endpoint of every API an enterprise runs, with the same grammar and semantics for all of them. Its commands describe themselves when asked, with their schema, worked examples, and the structure of their output. Every command declares what it is safe to do before it runs. Every error explains itself in a form the agent can act on. It addresses records by canonical name, so an account in the CRM and the same account in the service desk share one name across every endpoint. APIs can support this. Every serious SaaS API publishes a machine-readable specification of itself, and a command line can introspect that specification without a server process, a protocol handshake, or a tool list re-sent on every turn. Today's AI code-generation capabilities make it practical to build and maintain a provider for every API an enterprise needs, each generated from that API's own specification, including deployment-specific customizations. Security by construction requires such a tool, which is why Prompt One built its Service CLI. The Service CLI has a critical role at both design time and runtime. At design time, it is how the Composer learns what is possible and what authorizations are required. While constructing a Motion, the Composer asks the CLI which providers exist, what each command does, what its results look like, then composes the exact commands the agent will run. At runtime, those same commands execute through the CLI, running inside the Prompt One gateway, which supplies the credentials and enforces policy on every call. Design-time discovery loop When a user describes their motion, the Composer generates the agent's code, and for each API access, it works through a fixed discovery cycle with the Service CLI: discover providers, get the canonical schema, get examples and structure, and finally compose the query.