Brex Unveils CrabTrap to Secure AI Agents via Network Traffic

Brex Unveils CrabTrap to Secure AI Agents via Network Traffic

The rapid evolution of autonomous systems has reached a critical juncture where the primary limitation for enterprise integration is no longer the intelligence of the model but the robustness of the security perimeter surrounding it. While modern companies are eager to deploy agents capable of handling financial transactions, managing cloud infrastructure, or interacting with customer data, the inherent unpredictability of large language models often results in a paralyzed state of caution. Brex is addressing this friction by launching CrabTrap, an internal security platform that treats agent activity not as a black box of intent, but as a series of observable and controllable network events. By shifting the focus from the internal logic of the model to the outbound transport layer, this system allows organizations to grant agents high-level write access while maintaining an absolute “kill switch” and granular filtering for every request that leaves the corporate environment. This method effectively decouples the execution of an agent from its permissions, ensuring that even if a model experiences a hallucination or a malicious injection attack, its ability to cause external damage remains strictly contained within pre-defined boundaries, allowing for a safer deployment of AI-driven automation across the entire corporate landscape.

The Evolution: Moving Beyond Semantic Guardrails

Historically, securing AI applications relied heavily on input-output filtering, where security teams would attempt to catch harmful prompts or sensitive data through keyword matching or secondary classifier models. However, as agents move from simple conversational bots to active participants in business workflows, these semantic guardrails frequently prove insufficient against the complexity of multi-step reasoning and dynamic tool calls. A single prompt injection can circumvent high-level instructions, leading an agent to perform unauthorized API calls or exfiltrate credentials under the guise of a legitimate task. CrabTrap circumvents this vulnerability by acting as a framework-agnostic HTTP/HTTPS proxy that monitors all outgoing traffic regardless of the underlying coding language or software development kit. This architectural choice means that whether an agent is built using Python, Go, or a proprietary vendor platform, every single request must pass through a centralized control plane. This approach provides a unified visibility layer that was previously impossible to achieve across a fragmented ecosystem of various AI tools and third-party integrations, effectively standardizing security protocols for the entire agent fleet.

The traditional “read-only” safety net, while effective at preventing data corruption, severely limits the practical utility of autonomous agents in a modern enterprise setting where “write” capabilities are the engine of productivity. When agents are restricted from making changes, they become little more than advanced search engines, unable to automate the tedious tasks that define the next generation of operational efficiency. CrabTrap allows developers to move beyond these restrictive binary choices by implementing a sophisticated “security by layers” philosophy that operates independently of the model’s internal state. By configuring standard proxy environment variables, security administrators can enforce complex policies that allow an agent to update a specific database field while blocking it from deleting a record, or allow it to message a specific Slack channel while preventing any communication with external domains. This level of granularity transforms the security discussion from one of total restriction to one of managed enablement, where the risk profile of each agentic workflow is tailored to the specific business needs without compromising the integrity of the broader network infrastructure.

System Mechanics: The Intelligence of Policy Enforcement

To prevent the proxy from becoming a performance bottleneck, the system utilizes a hybrid decision-making architecture that balances speed with deep contextual understanding of network requests. Most outbound traffic from agents is predictable and repetitive, allowing for the use of deterministic static rules that can evaluate and approve a request in a matter of milliseconds. These rules handle the “known good” traffic, such as routine pings to internal services or standard API calls to trusted partners. However, for the “long tail” of unfamiliar or potentially risky requests, the system invokes a specialized “LLM-as-a-judge” logic that uses a small, highly efficient language model to analyze the intent behind the network call. This secondary check ensures that the system is not just looking for blacklisted URLs, but is actively evaluating if the request aligns with the agent’s specific mission and the user’s original intent. By only utilizing the intelligent judge for a small fraction of the total traffic, the platform maintains a high level of responsiveness, ensuring that the security layer does not introduce noticeable latency into critical business processes or disrupt the flow of real-time applications.

One of the more revolutionary aspects of this platform is the introduction of a policy builder that relies on “shadow mode” to draft governance rules based on actual operational data. Instead of requiring security engineers to manually write thousands of lines of code or complex regex patterns, the system observes agent behavior in a live environment without blocking any traffic during the initial learning phase. It analyzes historical traffic patterns and uses natural language processing to suggest rules that reflect the intended behavior of the system, which are then presented to human administrators for refinement and approval. This data-driven approach to policy creation removes the guesswork often associated with securing novel AI technologies and ensures that the rules are grounded in reality rather than theoretical scenarios. Once a policy is drafted, administrators can use a powerful evaluation system to “replay” thousands of previous audit entries against the new rule set to see exactly how it would have affected past operations. This provides a safety net that allows teams to iterate on security settings with full confidence that they are not inadvertently breaking mission-critical functionality or introducing new vulnerabilities into the live environment.

Future Readiness: Scaling Impact and Open Collaboration

Addressing the technical challenges of prompt injection and latency was a primary focus during the development of this network-level defense system. To combat the risk of an agent being manipulated into “tricking” the security judge, all outbound requests are structured into immutable JSON objects before they are analyzed, treating the user’s input strictly as data rather than executable instructions. This structural separation makes it significantly harder for an attacker to embed malicious commands that could bypass the proxy’s logic, as the judge evaluates the final destination and payload of the network call rather than the initial prompt that triggered it. Furthermore, the use of advanced prompt caching techniques and low-latency models has minimized the overhead typically associated with deep packet inspection in AI workflows. This ensures that the added layer of security does not degrade the user experience, allowing for the deployment of autonomous systems in high-stakes environments like financial planning or customer support where speed and reliability are paramount. The result is a robust infrastructure that supports the rapid scaling of agentic tools while providing the transparency and control required by modern IT governance standards.

The deployment of CrabTrap has already led to significant improvements in organizational efficiency by revealing redundant tool calls and unnecessary API noise that were previously hidden from view. By providing a clear dashboard of all agent activity, the platform has allowed engineers to optimize their models, reducing costs and improving the overall performance of the autonomous fleet. Looking ahead, the decision to release this technology as an open-source project signals a commitment to establishing a new industry standard for the secure management of AI agents. By inviting the broader developer community to contribute to the codebase and share their own security policies, a collective defense mechanism is being built that can keep pace with the rapid advancements in model capabilities. This collaborative approach ensures that the tools used to protect enterprise data are as dynamic and intelligent as the agents they monitor, paving the way for a future where autonomous systems can be deployed with full trust and transparency across every sector of the global economy. Administrators recognized the necessity of shifting to network-level controls as the only viable way to manage the escalating risks of autonomous software. By integrating these systems into the standard DevOps lifecycle, the industry moved toward a more resilient posture where security was baked into the infrastructure rather than bolted on as an afterthought. This transition highlighted that the most effective way to secure the progress of AI was to treat agents as first-class citizens of the network, subject to the same rigorous oversight as any other critical piece of corporate code.

Subscribe to our weekly news digest.

Join now and become a part of our fast-growing community.

Invalid Email Address
Thanks for Subscribing!
We'll be sending you our best soon!
Something went wrong, please try again later