A homegrown solution that investigates, validates, and accelerates MED cases – built by OKTO.
By Kalebi Caio Molina Serafim
Sometimes the best solutions come from the simplest observations.
During a routine conversation with our Compliance team, we noticed something: the volume of MED cases was growing faster than our team could handle. What started as a bottleneck was quickly becoming a serious operational challenge. So we did what any curious team would do — we built something about it.
The Problem Worth Solving
Brazil’s Pix instant payment system has transformed how money moves, but with that speed comes risk. MED (Mecanismo Especial de Devolução) protects our users and maintains trust in the platform. But it’s also incredibly manual: each case requires investigation, evidence gathering, careful validation, and human judgment.
Our Compliance team was handling roughly 35 MEDs per day, with each case taking about 15 minutes to process. That workload was manageable—until it wasn’t. One day, we woke up to over 2,500 new MED cases in the queue. By our math, that represented more than 70 days of work for a single person. The numbers made it clear: we needed to move fast.
Building the Right Tool for the Job
Rather than throwing more people at the problem, we asked a different question: what if technology could handle the investigation legwork while humans retained final judgment?
That thinking led to MED AGENT, an AI solution built entirely in-house by our Tech team alongside Compliance experts. The agent conducts initial investigations, compiles evidence, flags anomalies, and recommends actions—all while maintaining complete audit trails and reasoning logs. Then it hands everything over to a human reviewer for final approval, but now they’re freed from hours of data gathering and pattern matching.
Performance That Speaks for Itself
We spent five days running the agent side by side with our Compliance reviewers, validating every metric that mattered: SLA adherence, and efficiency gains. The numbers tell a compelling story: MED AGENT processes each case in 22 seconds on average, dropping to just 4 seconds for straightforward instances, all at a cost of $0.0002 per case.
Since deployment, we’ve processed over 10,000 MEDs with consistent accuracy. Every decision includes latency monitoring, cost tracking, and automated alerts for unusual patterns.
But speed without precision is worthless in compliance work. The validation continues daily, with our Compliance team refining the model’s judgment and reinforcing what makes a strong investigation.
Why Building In-House Matters
We could have purchased an off-the-shelf solution. Instead, we chose to build. This approach gave us complete control over the logic, allowed seamless integration with our existing systems, and created institutional knowledge that stays with our team.
MED AGENT represents more than automation. It’s proof that thoughtful AI implementation can enhance human judgment rather than replace it. Our Compliance team now focuses their expertise where it matters most: complex edge cases, strategic decisions, and continuous model improvement.
This project emerged from recognizing an operational overload and choosing to solve it together. That’s the culture we’re building at OKTO—where operational challenges become opportunities for innovation.
What’s next
MED AGENT is live and growing stronger every day. We’re continuing to refine the model, expand its capabilities, and explore how similar approaches could solve other operational challenges across OKTO.
More importantly, it demonstrates what happens when engineers and compliance professionals collaborate with shared ownership. The result isn’t just faster processing—it’s better quality decisions at scale. MED AGENT started as a conversation about a bottleneck. It became a testament to what we can achieve when we build together.