Designing More Reliable Programming Tools for AI Agents
Stop trying to make your agent smarter. Learn to design deterministic tools to optimize the performance of your coding agents.

The Complexity Trap in Agentic Programming
Over the last few months, the artificial intelligence ecosystem has made giant leaps forward. However, when working with agents like Claude Code or Cursor, it is common to observe a recurring failure pattern: the agent performs three steps correctly, gets lost on the fourth, and ends up exhausting its context window with useless log files. The solution does not lie in making the model smarter, but in changing our philosophy of skill design.
As we explored in The Rebirth of Technology: ESP32, Open Source and the Charm of the Unfinished, the key lies in the robustness of the tools we put into the hands of the AI.
Limit the Tool, Not the Agent
A common mistake is to add restrictive rules to the prompt in an attempt to control the model. The winning strategy is to restrict the tool. By turning each task into a deterministic script, we delegate complex logic to tested code, allowing the agent to focus solely on reasoning about intent and sequence.
Architecture of a Reliable Workflow
For a programming agent to work predictably, we must structure its capabilities under a clear contract:
- Modular Scripts: Each step is an independent script (e.g.,
step_01_convert.py) with a defined input and output interface. - Structured Outputs: Using JSON allows any model, even a basic one, to process results without ambiguity.
- Context Management: Instead of saturating the agent's memory with large blocks of text, we use temporary files on disk (artifacts). The agent only handles the file path.
"Do not make the agent smarter. Make its tools more predictable. Let the agent reason about intent and let deterministic scripts perform the action."
The Importance of Explicit Errors
A professional system must be able to "fail loudly." Instead of generic messages, each script should return specific exit codes that indicate the next logical step to the agent. For example:
- Code 0: Success, continue to the next step.
- Code 1: Conversion error, check input.
- Code 2: Authentication error, verify credentials.
This level of detail allows the agent to perform self-correction without the need for constant human intervention, something vital in modern software development and in the security of open source projects, where bot management is increasingly critical, as we have seen in cases like Botnet Targeting Open Source Developers Taken Down.
Security and Persistence
Finally, secret management must be external to the agent's context. Using .env files loaded directly by the scripts ensures that credentials are never exposed in the model's memory. Likewise, maintaining a work-log with timestamps allows for the auditing of every action, creating a long-term memory that the agent can consult in future executions.
In conclusion, when the workflow is linear and requires precise results, a script-based structure beats any attempt at improvisation by the model. The true power of javascript or Python agents does not lie in the model itself, but in the quality of the infrastructure we build around it.
Related articles
30 de septiembre de 2026
Direct API vs. SDK: Security in Password Recovery
Optimize password recovery in fintech: Direct API or SDK. We analyze pros, cons, and the best programming strategy.
23 de septiembre de 2026
How to deploy Typebot: The open-source chatbot builder
Learn how to deploy your own instance of Typebot, the open-source tool for creating conversational forms with full data control.
16 de septiembre de 2026
CetinLM: The Revolution in Programming and Efficient AI
CetinLM challenges the myth that AI requires multi-million dollar infrastructure, proving that precision engineering outperforms brute force.
9 de septiembre de 2026
Mastering Microsoft Entra: An Essential Guide to the SC-900 Certification
Learn the pillars of cloud identity, from access management to Conditional Access, which are key to passing the SC-900 certification.
Loading comments...