Brex’s new approach to AI agent security: observe first, enforce second
Brex, the fintech company known for corporate credit cards and spend management, has taken an unconventional route to securing AI agents. Instead of writing a static set of rules for what an agent can and cannot do, the company built an internal platform called CrabTrap. This open-source HTTP/HTTPS proxy sits between agents and the services they call, intercepting all network traffic. By examining every request and response in real time, CrabTrap learns what agents are actually doing with their credentials—API keys, OAuth tokens, service accounts—rather than relying on a predefined policy. According to Brex engineers, this observational approach revealed patterns that traditional guardrails missed entirely. For example, agents often made legitimate but unexpected API calls that would have been blocked under a rigid rule set. The proxy logs all activity, then surfaces behavioral patterns that security teams can use to craft precise, context-aware policies. This method is particularly relevant for agentic frameworks like OpenClaw, which have gained wide adoption but struggle to prove themselves at enterprise scale. Brex claims that CrabTrap reduced false-positive security alerts by approximately 40% during internal testing, compared to rule-based systems. The platform is now available on GitHub under an MIT license, inviting other enterprises to adopt or contribute to the approach.
Why traditional guardrails fail for agentic frameworks like OpenClaw
OpenClaw has become one of the most widely adopted open-source frameworks for building autonomous AI agents, yet it has yet to prove itself at scale in enterprise environments. The core challenge, according to Brex's security team, is that agents need real credentials—API keys, OAuth tokens, service accounts—to perform tasks such as reading emails, updating databases, or making payments. Traditional security guardrails, which rely on static allowlists and deny lists, cannot contain what those agents actually do with those credentials. An agent might request a token with read-only permissions, but then use it to call a write endpoint that the original policy never anticipated. Brex found that in practice, agents often made legitimate but unforeseen API calls that would have been blocked under a rigid rule set, creating friction between productivity and security. Moreover, static policies require constant manual updates as agents evolve, which is unsustainable at scale. The result is a choice between over-blocking (hurting agent performance) or under-blocking (increasing security risk). This tension has kept many enterprises from fully deploying agentic frameworks in production. Brex's observational approach aims to break this stalemate by letting actual agent behavior inform policy, rather than the other way around.
How CrabTrap works: intercepting traffic, building policy from patterns
CrabTrap operates as a transparent HTTP/HTTPS proxy that sits between an AI agent and the external services it calls. Every time an agent makes a network request—whether to a cloud API, a database, or an internal microservice—the proxy intercepts the traffic, logs the full request and response, and examines it against a set of behavioral heuristics. The system does not block anything by default; instead, it observes and records. Over time, it builds a behavioral profile for each agent, identifying which endpoints it calls, what data it sends and receives, and how it uses its credentials. Brex engineers say that within a few days of observation, the proxy can generate a baseline of 'normal' activity for a given agent. Security teams then review these baselines and convert them into precise policies—for example, 'this agent may only call the read endpoints of the Salesforce API using its OAuth token, and only between 9 AM and 5 PM.' The proxy can then switch from observation mode to enforcement mode, blocking any traffic that deviates from the approved patterns. This approach is fundamentally different from writing rules in advance, because it is grounded in empirical evidence of what the agent actually needs to do. Brex reports that the transition from observation to enforcement typically takes one to two weeks per agent, after which the policy requires minimal maintenance.
Enterprise implications: scaling agent security without sacrificing agility
Brex's approach has significant implications for enterprises looking to deploy AI agents at scale, particularly in regulated sectors such as finance, healthcare, and legal services. These industries have strict compliance requirements around data access, credential management, and audit trails. Traditional security models often force a choice between enabling agent autonomy and maintaining control. CrabTrap offers a third path: let agents operate freely under observation, then lock down the patterns that emerge. This could accelerate adoption of frameworks like OpenClaw in environments that previously deemed them too risky. Brex itself is using CrabTrap internally to secure agents that handle customer financial data, and the company reports that it has not experienced a single security incident related to agent credential misuse since deploying the platform. The open-source nature of the project also means that other enterprises can customize it to their own infrastructure, integrate it with existing SIEM systems, or contribute improvements back to the community. However, the approach is not without limitations. Observational learning requires a training period during which agents operate without enforcement, which may not be acceptable in the most sensitive environments. Additionally, the proxy itself becomes a single point of failure and a potential target for attackers. Brex mitigates this by running the proxy in a dedicated, hardened container with strict access controls.
The open-source future of agent security: community adoption and next steps
By releasing CrabTrap under an MIT license on GitHub, Brex is betting that the open-source community will embrace its observational approach to agent security. The repository includes the proxy code, configuration templates, and documentation for integrating with common agentic frameworks like OpenClaw, LangChain, and AutoGPT. Brex engineers have also published a set of reference policies for common use cases, such as email automation, CRM data access, and payment processing. Early community feedback has been positive, with several organizations reportedly testing the proxy in staging environments. Brex plans to add features such as real-time alerting via webhooks, integration with cloud-native security tools like AWS GuardDuty, and support for mutual TLS authentication. The company also intends to publish a white paper detailing its internal deployment metrics, including false-positive rates, policy creation time, and agent productivity impact. For now, CrabTrap represents a shift in mindset: instead of trying to predict what agents will do, we should watch what they actually do and build security accordingly. As agentic frameworks continue to proliferate, this observational paradigm could become a standard component of enterprise agent infrastructure. The next challenge will be scaling the approach to handle thousands of agents simultaneously, but Brex believes its architecture can accommodate that growth.