website
//
blog
Building a cybercrime investigation agent
Blogs

Building a long-running agent to investigate cybercrime operations

Deep investigation of phishing and fraud operations across the internet used to take intensive manual work. How we built Recon to automate it.
Jack Hayford
Jack Hayford
December 2, 2026

Earlier this year, we joined Anthropic for a webinar on the Recon Agent, followed by a case study on the Claude blog. Since its release this spring, the Recon Agent has run thousands of investigations and flagged more than 30,000 malicious sites, accounts, and ads tied to them. In this post, we go into more detail on how we built it and what we learned running it in production.

Disclaimer: Acme Bank and every domain, advertiser and email address in this example are fictional. The example is modeled on real Recon Agent cases.

The Investigation Gap

It's the end of the month and rent is due. To check that your paycheck landed, you search for your bank and click the first result.

Mock search results showing a sponsored Acme Bank look-alike above the real bank.

You log in. But it wasn’t your bank’s site. The search ad led to a look-alike domain that sent your credentials to an attacker, then forwarded you to the real bank so nothing seemed wrong. An hour later, you get a text from your bank about a new login from a location you don’t recognize. Someone built this to target you and hundreds or thousands of people like you.

Animated example of a fake bank login redirecting the visitor to the real bank.

The companies being impersonated want operations like this shut down: every fake ad, site, and account puts their customers at risk. Many rely on Digital Risk Protection services that try to find and remove pages like these one at a time but usually stop there.

But who made it? How long has this site been up? Was the ad fake too? Are there more like it out there?

Diagram connecting a fictional search ad and cloned bank page to questions about the wider operation.

To actually disrupt the operation, you need the whole picture: how it works, how far it reaches, and who’s behind it. Getting there takes investigation, work that is technical and tedious and can take a skilled analyst hours or days for a single operation.

AI-enabled adversaries increased their activity 89% year over year, and they’re building more than login pages: fake ads, cloned support channels, fake executive profiles, all to add credibility and drive more victims into their lures. No team can investigate all of that by hand. That’s why we built the Outtake Recon Agent.

Introducing the Recon Agent

The Recon Agent is an autonomous cyber threat investigator. Here's what that work looks like when a person does it.

An investigator starts with a single indicator, like the fake “acme-bank.onl” domain, and works outward: tracing infrastructure, finding connected assets, and keeping evidence as they go. The best combine technical skill, like reverse engineering a phishing page for clues, with an understanding of how attackers build campaigns and where they'll expand next. That's how an analyst turns a pile of evidence into a map of the operation, often over days.

What the Recon Agent produces from a single detected phishing page
What the Recon Agent produces from a single detected phishing page

The Recon Agent performs these investigations autonomously in around 15 to 45 minutes, doing much of the forensic and tactical work an analyst would. At the end it generates a full graph of its discoveries and a structured report: key findings, likely operators, technical analysis, campaign timelines, disruption opportunities, and leads for continued investigation.

While investigating the phishing page from the start of this post, the agent uncovered a campaign of 18 look-alike sites and 7 search ads. The ads ran from two advertiser accounts that had passed the ad platform’s verification checks. The sites used cloaking, showing security tools a harmless page while victims saw the phishing page. Its most promising lead: an old public registration (WHOIS) record exposing an email that also registered look-alikes of two other banks, which could tie this campaign to earlier attacks and maybe to the operator behind them.

Here is what a step-by-step replay of that investigation looks like (modeled on real cases):

Done manually, that investigation would have taken hours, if not days. So what does it take to trust an agent to run investigations like this on its own, every time?

The rest of this post covers how we built it: what we learned investigating by hand, what worked and broke in the prototype, and what it took to run it in production.

Building the Agent by Being the Agent

Path to building the Recon Agent: manual discovery, rapid prototyping, then production
Path to building the Recon Agent: manual discovery, rapid prototyping, then production

Manual Investigation

There's a small inside joke at Outtake: you have to be the agent before you can build the agent. You have to understand the task by hand before you can design an agent that handles it effectively.

For the Recon Agent, our engineers spent days investigating phishing domains, fake ads, and other social engineering campaigns our system detected. That meant reading source code, poking at login flows, tracing shared infrastructure across dozens of domains, and keeping track of all of it.

Anonymized notes from a manual investigation
Anonymized notes from a manual investigation

The work was slow and hard to keep organized, but it taught us that every investigation was fundamentally different. The agent that could do this successfully every time would need to be able to adapt on the fly. A phishing kit you've never seen before might need custom scripts to de-obfuscate. A login flow might need to be tested programmatically. In plenty of cases, the tools to continue the investigation didn't exist yet.

So the agent would need to write its own tools as it went, for situations it had never seen. It would essentially need to be half detective, half coding agent.

Prototyping

Informed by our discovery, we started prototyping by building an experimental harness around Claude Code. The harness introduced an initial set of investigation tools, skills and guidance, and a framework for organizing an investigation run, all based on what we learned from our manual investigations.

We ran the prototype against a few live cases, supervising tool calls and lightly steering the investigation flow as it went with prebuilt continuation prompts, and the early results were good:

Successful adaptation to identify and reverse engineer exfiltration methods of a phishing login page
Successful adaptation to identify and reverse engineer exfiltration methods of a phishing login page
Agent identifying efficient ways to capture the catalog for a fraudulent goods e-commerce site for ad search
Agent identifying efficient ways to capture the catalog for a fraudulent goods e-commerce site for ad search

It could trace infrastructure, read source code, and in some cases adapted the way we'd hoped, decoding the kit's Telegram exfiltration code to identify where credentials were being sent, or pulling product data from a known counterfeit e-commerce storefront API to search for upstream ad campaigns more effectively.

Some results were the opposite:

The agent ran an entire investigation without saving any evidence. A TikTok ad was taken down before we could capture it, key evidence lost.
The agent ran an entire investigation without saving any evidence. A TikTok ad was taken down before we could capture it, key evidence lost.
The strategy was well documented in the agent's own instructions. It still didn't run it
The strategy was well documented in the agent's own instructions. It still didn't run it
The report made claims the evidence didn't support
The report made claims the evidence didn't support

Investigations were not consistent, and longer runs had clear degradation in quality and focus, with agents often stopping too soon or running completely off the rails. Evidence got lost, leads got skipped, connections were missed, and reports made claims the evidence didn't support. The good runs showed it could work, but the bad ones showed us what we needed to fix to launch.

Fully automating these investigations in production meant trusting that the agent could run end-to-end without any supervision, and deliver strong results every time. It was time to scrap the local prototype and design a production-ready system. We would rebuild the agent from the ground up on a framework with lower-level controls over the agent loop (the Claude Agent SDK let us keep our tools and skills while adding hooks and checks around the loop) so we could build the guardrails the prototype was missing and run it in isolated environments on Kubernetes.

Bringing the Prototype to Production

Security: Where the Agent Runs Untrusted Code

The Recon Agent visits malicious sites, downloads phishing kits, and runs code it writes to take them apart. Those sites are built to deceive, and the tricks work on agents too: attackers have started writing content aimed directly at agents, sometimes hidden from human view. That leaves two risks: malware, from running untrusted code, and prompt injection, where text in a page or file gets treated as instructions.

In production, we assume both will happen eventually. So the code the agent writes, its files, and its processes live in a sandbox that holds no API keys and has no direct route to our internal systems. Instead our internal systems pull the agent's reports, graphs, and evidence out of the sandbox through a tightly controlled path.

The Recon Agent sandbox and the controlled paths for credentials and evidence.

Orchestration: Staying on Task Over Long Investigations

An investigation can run for hundreds of turns, and keeping the agent on task that long required a stronger harness. Anthropic's Effective context engineering for AI agents and Manus's Lessons from Building Manus cover the fundamentals well, so we'll focus on the three areas that made the biggest difference in our own iteration:

  1. Managing context efficiently across long-horizon tasks.
  2. Balancing reliability and adaptability.
  3. Letting the agent plan and run its own work.

Managing context efficiently across long-horizon tasks. Recon investigations run hundreds of lookups, page captures, and scripts, and collect upwards of 100 million tokens of raw evidence per investigation, about 100 agents' worth of context. These tactics helped us control that context load over the course of a run:

  • Delegation. A main agent, which we call the orchestrator, splits the investigation into smaller tasks, like checking one suspicious website, and gives each task to a sub-agent. Each sub-agent’s work spreads across a large corpus of data, but the orchestrator reads only its detailed handoff of key findings and evidence references, opening the underlying evidence as needed.
  • Files. Almost everything agents collect goes to files: raw evidence, screenshots, notes, findings. We’ve found the file system works well as durable context: it keeps an audit trail even for ad-hoc work, and it gives large tool outputs somewhere to go besides the context window.
  • Progressive disclosure. Once outputs live in files, the agent can dig through them directly, pulling exactly what it needs out of a 5 MB phishing page or a large JSON dump. Current models are fluent at these file operations, which lets them capture the key information without polluting their context.
Keeping agent context windows efficient through delegation to sub-agents and files
Keeping agent context windows efficient through delegation to sub-agents and files

Balancing reliability and adaptability. The prototype skipped steps it had been told to take, like capturing evidence, and made claims it couldn't back up. Those steps have to happen reliably in every investigation, because a key finding is only as good as the hard evidence that backs it up. Other work depends on improvising, like finding a new way to fingerprint a site.

We first enforced the reliable steps with more instructions, but every rule we added competed for the agent's attention, was eventually ignored, and (as models improved) even limited what the agent could do. So we stopped trying to predict every situation by front-loading instructions and added verification instead: checks whose results come back to the agent as feedback at the moment it needs them. Most of our verification comes in two forms:

  • Deterministic checks. Code that validates work the moment it's produced, the way tests and type checkers do for coding agents. Sub-agent handoffs must match a schema, every citation must resolve to a captured evidence file, and some tools won't run until their prerequisites are met. A failure returns a specific error the agent can fix.
  • A verifier agent. A separate agent with a fresh context judges what code can't, like whether the evidence supports a claim: the evaluator-optimizer pattern from Anthropic's Building effective agents. The fresh context matters because the agent that built the case is the least likely to doubt it. More on this under Accuracy below.
Instructions alone trade adaptability for reliability, while verification raises both
Instructions alone trade adaptability for reliability, while verification raises both

Letting the agent plan and run its own work. The prototype often went off the rails: the agent chased leads that didn't matter, lost sight of what the case was asking, and wrapped up with work half finished. Our early production versions used simple to-do lists, which kept the agent on track and are a great fit for tactical execution, but a flat list couldn't show an investigation's structure: which questions mattered most, which could run in parallel, and when a finding should change the plan.

Inspired by Claude Code's dynamic workflows and /goal, we gave the orchestrator tools to plan the investigation as workflows, each tied to an objective with a clear completion condition, like tracing the infrastructure behind a malicious site. A workflow can run steps in sequence, fan out to dozens of sub-agents, or both, so the plan goes as deep or as wide as each question needs and changes as answers come in.

From no plan to to-do lists to agentic workflows planned around objectives
From no plan to to-do lists to agentic workflows planned around objectives

Accuracy: Checking Every Claim Against the Evidence

Left alone, early versions would settle on a verdict a few steps in and spend the rest of the run building a case for it. To counter that, a verifier agent acts as an internal auditor. It reviews the investigation as it runs, and most closely when the report is written, holding the work to three standards:

  • Evidentiary rigor: every claim points to captured evidence that properly supports it
  • Consistency: contradictions and weak connections are identified and resolved
  • Objectivity: leads that could disprove the leading theory get followed

Below, the agent claimed two domains shared an operator because their certificates were issued six minutes apart, but certificate authorities issue thousands of certificates in any six-minute window, so the auditor blocked the claim until it was downgraded to an unconfirmed lead.

An audit finding that blocked an unsupported attribution, and where the auditor sits in the investigation loop
An audit finding that blocked an unsupported attribution, and where the auditor sits in the investigation loop

The auditor keeps looping until each claim is either backed by evidence or marked as a lead.

Conclusion

We started with a prototype that could investigate well when it worked, but lost evidence, drifted on long runs, and claimed more than it could prove. Sandboxing, orchestration, and an auditor turned it into a system that has run thousands of investigations in production since this spring.

AI has made attacks like the one at the start of this post cheap to build and quick to replace, and that’s only going to accelerate. Defenders who handle them one at a time will always be catching up.

But every attack is also an opportunity to learn: how the people behind it target their victims, how they scale their campaigns, what tactics they prefer, and what infrastructure they often reuse. Each Recon investigation records hundreds of data points, and a defense that learns from every threat it sees gets better at stopping the next one.

The Recon Agent is a key part of the defense we’re building at Outtake. Automating the deep work of investigation means spending less time asking questions about the people targeting you, and more time putting the answers to work for your defense.

Interested in working at Outtake? Explore open roles. Interested in using Outtake? Talk to our team.