The current state of AI development is defined by a dangerous game of telephone. Developers describe a workflow in English, ask a coding agent to write Python or Java using frameworks like LangChain or CrewAI, and then spend hours reviewing generated boilerplate to ensure the agent didn't hallucinate a dependency or mess up a graph edge. Srijith Unni, writing on DEV.to, argues this cycle is broken. His proposal, Loom, suggests that coding agents shouldn't write the implementation details at all. Instead, they should write the workflow itself in a declarative, readable language that a compiler can turn into a running system.
The Abstraction Gap in Modern Agent Frameworks
Unni observes that AI fatigue is real because the abstraction layer is constantly shifting. While tools like LangChain and Spring AI pioneered the graph-based approach to agent orchestration, they still require developers to answer hard architectural questions in framework-specific terms: what is a node, what is an agent, and how do you safely implement a loop? The result is that most developers abandon these frameworks to hand-roll their own loops because the friction of generating and reviewing code is too high. Loom attempts to close this gap by treating the workflow definition as the primary artifact, rather than a byproduct of code generation.
Loomβs Declarative Syntax and Safety Controls
The Loom language allows for explicit control over budgets, tools, and guards. For example, a budget statement sets a hard ceiling on tokens and API calls, stopping a run if the allowance is exhausted. Tools are defined with strict allowlists; an agent might have access to shell commands but only for read-only operations like df or uptime, preventing accidental system modifications. Crucially, Loom separates model-driven steps from code-driven tasks. A safety check, such as ValidateScript, is implemented as plain Java code, not a prompt. This ensures that critical security checks are deterministic and cannot be bypassed by prompt injection, addressing what Unni refers to as Simon Willisonβs 'lethal trifecta' of risks.
Built-in Privacy and Security Audits
Privacy is treated as a first-class property of the agent. The guard directive can mask PII (personally identifiable information) like emails and IP addresses before they reach the LLM, ensuring that sensitive data from system logs doesn't leak into model context or memory. The framework also includes a built-in security audit that scans the workflow definition for dangerous patterns, such as an agent that can read untrusted text, access private data, and take action. This audit maps findings to the OWASP Top 10 for LLM applications, providing developers with actionable insights without needing to run the workflow.
Developer Experience and Tooling
Loom ships as a single JAR with a CLI (weave) and a VS Code extension. The CLI supports commands for checking syntax, generating Mermaid diagrams, running audits, and executing workflows. The VS Code extension provides real-time validation, syntax highlighting, and a live graph view that follows the cursor. This dual-interface approach aims to satisfy both terminal-based automation pipelines and interactive development needs, eliminating the need to translate between a visual designer and code-based frameworks.
Key Takeaways
- Declarative Over Imperative: Loom proposes that agents should output workflow definitions, not framework code, reducing review overhead.
- Deterministic Safety: Critical steps like validation and execution are handled by code tasks, not LLM prompts, preventing injection attacks.
- Privacy by Default: Built-in PII masking and security audits help developers comply with data protection standards automatically.
- Unified Tooling: The combination of CLI and VS Code extensions streamlines the development loop for agent-based systems.
The Bottom Line
The industry is drowning in agent plumbing because weβre trying to solve orchestration problems with code generation. Loomβs approach of separating the 'what' (workflow) from the 'how' (implementation) is a necessary evolution for reliable AI systems.
Zero-Coolβs Take
This isn't just another DSL; it's a rejection of the idea that LLMs are good at writing boilerplate. If you're building agents, stop asking them to write Python. Make them define the graph. The code should follow the logic, not the other way around.