← All guides · Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team
How to Prepare an Agent Log for Scanning
The short answer
Preparing a log for scanning means exporting the period you want judged, complete and unedited — forensic fields and sequence values intact — and supplying the scope config version that was in force during that period. Respect the caps: the free scan takes a single log of up to 200 actions, 10 analyses a day; Pro handles up to 50,000 actions per log and batches of up to 10 logs. Nothing is silently truncated — oversized logs are rejected with the cap stated. Check your own log with the free log scan.
What is a scan-ready agent log?
Scan preparation is the operator-side half of log forensics: selecting and exporting a recorded action log (JSON, native JSON or JSONL on the free tier) with its timestamp, agent, tool and argument fields, plus the declared scope, so the deterministic detector can replay it faithfully.
Export the period, not a sample
Choose the window by the question: an incident window with a margin either side, a representative week for a first health check, a full month for a quarterly review. Export all of it rather than a hand-picked sample — sampling destroys the sequence witness and biases every count, and a finding that rests on a curated excerpt will not survive a reviewer's first question. If the period exceeds a single log's cap, that is a batch question, not a sampling excuse: Pro analyses batches of up to 10 logs with campaign correlation, which exists precisely for multi-file periods.
Do not clean the log before scanning
The instinct to tidy first — sort it, dedupe it, strip odd entries — destroys evidence the integrity audit needs. Duplicates, order breaks and truncations are findings about your pipeline; a pre-cleaned log reports a pipeline that never existed. Export raw, scan raw, and let the report show both the pattern findings and the integrity signals. The one legitimate pre-step is size: splitting a huge export into its natural files (per day, per agent) for batch analysis, without editing entries inside them.
Bring the scope that was in force
Findings about scope, tokens, egress and privilege are only possible against a declaration, and the declaration must be the version from the scanned period — not today's wider one, which would acquit old escapes, and not a narrower draft, which manufactures them. Pull the scope config snapshot that governed the window: allowed_tools global and per-agent, auth_flow_tools, egress allowlist, privilege level. If your operation never snapshotted it, reconstruct honestly from the period's configuration history and note the reconstruction in the operator notes; then start snapshotting from today.
First scan: start small on purpose
Your very first run is a format check wearing a scan's clothes. Take a small, recent slice — the free tier's 200 actions is ample — and confirm three things: entries parse (JSON or JSONL in the field shapes the detector reads), findings locate correctly in your own system by action index, and the integrity audit sees your sequence values. Only then scale to the full period. Teams that start with the giant export first spend their debugging energy at the worst scale; teams that start with 200 actions learn the shape of a report, and of their own log, in one sitting.
A worked example: Fernway Clinics
Example — fictional operator, illustrative numbers. Fernway Clinics, a fictional physiotherapy chain, prepared its first full scan in one morning. A 200-action free test slice exposed a field-naming mismatch (their exporter wrote 'action' where the team's notes said 'tool' — an accepted name, so findings located correctly once checked). They exported 7 complete days, 73,000 actions, split by day into 7 files for batch, and attached the scope snapshot from that week: 4 egress destinations and per-agent lists for 2 agents. The batch returned 2 undeclared-egress findings and a clean integrity section — a result the clinic could act on the same day because the preparation was honest.
| Measure | Figure | What it showed |
|---|---|---|
| Test slice | 200 actions | Format and field names confirmed |
| Full export | 73,000 actions in 7 files | Complete days, unedited |
| Scope snapshot attached | Week's version | 4 destinations, 2 per-agent lists |
| Result | 2 egress findings | Clean integrity section |
See how the plans differ on log size and batch work on the pricing page, and how the detector reads a log in the detector docs.
The checklist: five actions
- Pick the window by the question. Incident window with margin, a representative week, or a full review period — exported completely.
- Export raw. No sorting, deduping or stripping; the integrity audit needs the log as it was actually written.
- Attach the period's scope. The config version in force during the window: tool lists, auth flow, egress, privilege.
- Test with 200 actions first. Confirm parsing, field names and action-index location before scaling to the full period.
- Split by nature, not by sampling. For big periods, batch per-day or per-agent files (Pro, up to 10 logs) instead of thinning the record.
Run the free log scan · More agent-security tools from Ingenious AI
Related guides
JSON vs JSONL for Agent Logs: Which Format Holds Up?
How Do You Declare Scope for an AI Agent?
Free vs Pro Agent Log Scans: What the Limits Actually Mean
How Long Should You Keep AI Agent Logs? An Audit-Trail Retention Guide
Agent Log Forensics: Finding Credential Grabs After the Fact
A pre-flight check that takes two minutes
Before you paste, run three cheap checks on the export itself. First, open the file at the end: a truncated final entry is common and the integrity audit will flag it — better that you already know. Second, count the entries and compare with the source system's own count for the period; a mismatch means the export dropped rows, and scanning a partial log as if it were complete is the one preparation error that invalidates everything downstream. Third, confirm the file's agent ids match the ids in your scope config, character for character. A scan judged against a config naming different agents produces clean-looking nonsense.
If a check fails, fix the export, not the log. Re-export with the full period, keep the sequence values, and leave the content untouched. Preparation is about completeness and pairing — the right log with the right declaration — never about tidying the evidence.
Sources
Keep the first scan's output forever
Whatever your first scan of a new log source finds, file the output. First scans are baselines: they capture the declaration drift, the format quirks and the integrity signals of a source before your process touched it, and every later improvement measures itself against that picture. Teams that fix-as-they-go during onboarding lose the baseline and, with it, the ability to show a reviewer — or themselves — what changed. Scan first, file it, then fix. The order costs an hour and buys the whole before-and-after story.
Frequently asked questions
What format should the log be in?
JSON entries — native JSON or JSONL on the free tier — carrying timestamp, agent, tool and arguments under their common field names, plus a sequence value where your framework emits one.
How large a log can I scan free?
A single log of up to 200 actions, 10 analyses per day, with full declared-rule detection. Oversized logs are rejected with the cap stated; nothing is silently truncated.
What are the Pro limits?
Up to 50,000 actions per log, unlimited analyses, and batch analysis of up to 10 logs with campaign correlation, plus disclosure-packet JSON export.
Should I remove duplicates or sort the log first?
No. Export raw: duplicates, order breaks and truncations are integrity findings about your pipeline, and pre-cleaning fabricates a pipeline that never existed.
Which scope config should I supply?
The version in force during the scanned period. Judging old actions against today's declaration acquits old escapes or manufactures new ones.