# From a production symptom to durable evidence

**What does it take to go from a production symptom to a reliable diagnosis and durable evidence?**

A storm of 503 responses, a slow endpoint, an error nobody has seen before. Every investigation needs the same things: the right records, read with their structure, counted and correlated - and proof that still holds when the log has rotated. This page compares two ways to get there on Windows: TKTail, and purpose-built helpers written in C#, Python and PowerShell 7 - for an operator and for an AI agent.

C#, Python and PowerShell can do everything on this page, and teams build excellent diagnostic tooling with them. The difference is where the work lives: in a helper it is designed, written, tested, deployed and maintained for each environment; in TKTail it is a prebuilt investigation capability you reuse. Where a helper is faster, this page says so.

- **Execution**: A purpose-built program can be faster at the one question it was written for - the published benchmark shows it, losses included.
- **Investigation**: TKTail turns a question into a structured answer and keeps the proof - redacted, hashed, verifiable - without code written first.
- **Production operation**: Profiles, searches, alerts and evidence are reusable, from one portable executable with no additional runtime stack on the machine being diagnosed.

## Three ways to compare

### Execution: the same work, timed

*Once equivalent code exists, how fast does it run?*

An execution comparison is fair only when both sides do the same work. Benchmark v2 measures it level by level - raw reads, line framing, a literal search, a structured search, an aggregation, done identically by every program, every answer checked equal - on TKTail 1.3.0-rc.1 (a release candidate): TKTail's engine takes less time at some levels and more at others, shown as measured. The purpose-built run compares programs with the complete TKTail workflow. The programs split lines, read one or two fields and count; TKTail also decodes and validates the text, frames records, builds typed fields, keeps the results pageable with their offsets, records the source's identity and answers over MCP - so that run is not an engine comparison, and a purpose-built program is expected to be quick at its one question.

Historical benchmark — TKTail 1.1.0: competitive-bench-v1, TKTail 1.1.0 - purpose-built programs beside the complete TKTail workflow, not an engine comparison.

| Scenario | Cold: lowest median | TKTail cold | Warm: lowest median | TKTail warm |
|---|---|---|---|---|
| `literal-error` | C# (.NET 10), 482 ms | 869 ms (1.80x) | C# (.NET 10), 332 ms | 418 ms (1.26x) |
| `elapsed-ge-1000` | C# (.NET 10), 876 ms | 6.02 s (6.9x) | C# (.NET 10), 739 ms | 5.26 s (7.1x) |
| `count-5xx` | C# (.NET 10), 1.25 s | 6.10 s (4.9x) | C# (.NET 10), 935 ms | 5.36 s (5.7x) |
| `count-slow` | C# (.NET 10), 2.20 s | 12.4 s (5.6x) | C# (.NET 10), 964 ms | 5.41 s (5.6x) |
| `top-ip-5xx` | C# (.NET 10), 1.39 s | 8.09 s (5.8x) | C# (.NET 10), 2.03 s | 5.54 s (2.7x) |
| `top-uri-5xx` | C# (.NET 10), 1.30 s | 6.31 s (4.8x) | C# (.NET 10), 2.14 s | 5.76 s (2.7x) |
| `per-minute-5xx` | C# (.NET 10), 1.28 s | 6.24 s (4.9x) | C# (.NET 10), 2.03 s | 5.71 s (2.8x) |
| `top-ip-503-post` | C# (.NET 10), 1.27 s | 6.05 s (4.8x) | C# (.NET 10), 2.08 s | 5.11 s (2.5x) |

Lowest median, over every cold and warm scenario of this run: C# (.NET 10) in 16 of 16. TKTail is shown with its factor against the lowest - where it loses, the table says so.

[Benchmark v2: the same work, level by level](https://tktail.dev/performance/benchmark-v2/) · [The full benchmark](https://tktail.dev/performance/competitive/) · [What TKTail does that the programs do not](https://tktail.dev/performance/competitive/#cmp-not-engine) · [Methodology](https://tktail.dev/performance/competitive/#methodology)

### Investigation: question, answer, evidence

*From a symptom, how do you reach a correct answer - and keep the proof?*

Here the unit of work is an investigation, not a scan: the right sources and their format, a search, a count, a correlation, an answer someone can check - and evidence that survives the log. What matters is the time to a correct, evidenced answer, the data that has to move, the code that has to be written first, and what is left for the next person.

Question -> Sources and format -> Search -> Aggregate -> Correlate -> Answer -> Evidence

Historical benchmark — TKTail 1.1.0: "Which 10 clients sent the most POST requests answered 503?" over iis-100mb (1,365 matches), measured through TKTail's MCP: every record read whole sent the AI client 3.55 MB in 1,380 MCP calls; TKTail's aggregation sent 4.4 KB in 1 MCP call - 805x less. A script that aggregates locally can return a small answer too, once it is written and run. Bytes and calls as measured, not tokens.

End-to-end, an agent with TKTail against the same agent writing PowerShell, Python or C#: run 20261108T200818Z-ai-workflow-bench-v1 (a pilot) - see the AI workflow benchmark.

[Scenario 1: a 503 incident](https://tktail.dev/ai/investigation-workflow/#incident) · [Scenario 3: your own format](https://tktail.dev/ai/investigation-workflow/#formats) · [Scenario 4: an AI agent](https://tktail.dev/ai/investigation-workflow/#ai-agent) · [The evidence pipeline](https://tktail.dev/ai/investigation-workflow/#evidence)

### Production operation: run it again, elsewhere, safely

*What does it take to run it again next week, on another server, by someone else?*

A diagnosis that worked once is not yet an operational capability. Production adds deployment, repeatability, monitoring, permissions, a lifecycle and maintenance - for TKTail and for a helper alike.

| | TKTail | A custom helper |
|---|---|---|
| Deployment | one portable package; no additional runtime on the machine being diagnosed | the program and what it needs to run - see Deployment |
| Repeatability | Saved Searches (versioned) and format profiles - named, run again by a person or an AI client | the script and its parameters, versioned and reviewed by your team |
| Monitoring | alerts with incidents and their evidence; dated series followed; back after a restart | a scheduler or service, state, notification - see Scenario 2 |
| Permissions | AI access off until allowed, Investigation Roots, one switch per kind of change - inside Windows security | the identity that runs it; a low-privilege account, JEA or an allow-listing host you configure |
| Lifecycle | versioned releases with release notes; settings, alerts and Saved Searches of earlier versions load unchanged | your versioning, your upgrades of its runtime and packages |
| Maintenance | a format change is one profile in Custom Format Studio | a format change is a change to each parser, and to its tests |

[Scenario 2: monitoring](https://tktail.dev/ai/investigation-workflow/#monitoring) · [Deployment](https://tktail.dev/ai/investigation-workflow/#deployment) · [What you would build](https://tktail.dev/ai/investigation-workflow/#build) · [Capability matrix](https://tktail.dev/ai/investigation-workflow/#matrix)

## Scenario 1: an HTTP 503 incident

*Investigation.* Customers report failed checkouts. Which clients and endpoints got 503 responses, since when, what else happened on the server in those minutes - and how do you keep the proof?

The tested helpers already answer one of these questions - the top 10 clients of 503 POST requests is a scenario of the benchmark - and each could be extended to every other step. The lanes list what that takes.

### TKTail - Built into TKTail

Deployment: TKTail.exe from one portable package - no additional runtime on the machine being diagnosed.

1. [Built in] **Open the logs** - the IIS log or its dated series - for an AI agent also a log folder you approve as an Investigation Root (Trial / Pro) ([Help](https://tktail.dev/help/mcp/#extended-investigation-folders-you-approve))
2. [Built in] **Detect the format** - IIS W3C is recognized from its content; a format TKTail does not know becomes a profile in Custom Format Studio ([Help](https://tktail.dev/help/built-in-formats/))
3. [Built in] **Search** - sc-status = 503 and cs-method = POST over the incident window, across the series ([Help](https://tktail.dev/help/search/))
4. [Built in] **Aggregate** - top clients, top endpoints, requests per minute - computed by TKTail over every match, for an AI agent working with you (MCP) ([Help](https://tktail.dev/help/ai-assistance/#search-and-summaries))
5. [Built in] **Correlate** - the System and Application event logs and, with Metrics (Trial / Pro), CPU, memory and disk of the same minutes ([Help](https://tktail.dev/help/metrics/))
6. [Built in] **Save evidence** - the results with records of context and the event log of the same window - redacted before anything is written ([Help](https://tktail.dev/help/saving-evidence/))
7. [Built in] **Verify** - VALID, MODIFIED or INCOMPLETE - also after the log has rotated ([Help](https://tktail.dev/help/saving-evidence/#the-evidence-library))
8. [Built in] **Keep and share** - the Evidence Library keeps it until you delete it; a shareable copy leaves out local paths ([Help](https://tktail.dev/help/saving-evidence/#sharing))

### C# helper - Must be implemented or integrated in the helper

Deployment: A framework-dependent .NET 10 console program: the .NET runtime has to be on the machine that runs it. Publishing it self-contained (the runtime bundled) or as NativeAOT (a native executable) removes that step.

1. [Determine] **Files, layout, time zone** - which files cover the incident (rotation), the field layout (#Fields can change within a file), the time zone (W3C times are UTC)
2. [Obtain] **Build and runtime** - the .NET SDK on a build machine; on the machine being diagnosed the .NET runtime - or a self-contained or NativeAOT build instead; approval to run it there
3. [In the tested helper] **Top 10 clients** - a streaming read, W3C fields from #Fields, the 503 POST filter and the top 10 clients (top-ip-503-post)
4. [Adapt] **Endpoints and timeline** - the top endpoints and a per-minute timeline of the 503 POSTs - the tested helper has both for all 5xx, so a small change
5. [Integrate] **Event Log and counters** - an Event Log reader and performance counters (.NET APIs), joined with the log results on one time line
6. [Implement] **Evidence** - the records with their context, secret redaction, source identity, a manifest with SHA-256, verification
7. [Implement] **Keep and share** - where packages live, for how long, a copy without local paths
8. [Integrate] **A usable answer** - an answer a person or an AI agent can use - the tested helper prints one JSON line

[Program.cs - the tested source](https://tktail.dev/performance/competitive/source/csharp/Program.cs/)

### Python helper - Must be implemented or integrated in the helper

Deployment: A CPython script: a Python runtime has to be on the machine that runs it (and any package a further step needs). A frozen, self-contained executable is an alternative.

1. [Determine] **Files, layout, time zone** - which files cover the incident (rotation), the field layout (#Fields can change within a file), the time zone (W3C times are UTC)
2. [Obtain] **Build and runtime** - a Python runtime on the machine being diagnosed, and any package a step needs - or a frozen executable; approval to run it there
3. [In the tested helper] **Top 10 clients** - a streaming read, W3C fields from #Fields, the 503 POST filter and the top 10 clients (top-ip-503-post)
4. [Adapt] **Endpoints and timeline** - the top endpoints and a per-minute timeline of the 503 POSTs - the tested helper has both for all 5xx, so a small change
5. [Integrate] **Event Log and counters** - an Event Log binding or wevtutil output, and the counters (a binding or typeperf), joined with the log results on one time line
6. [Implement] **Evidence** - the records with their context, secret redaction, source identity, a manifest with SHA-256, verification
7. [Implement] **Keep and share** - where packages live, for how long, a copy without local paths
8. [Integrate] **A usable answer** - an answer a person or an AI agent can use - the tested helper prints one JSON line

[bench.py - the tested source](https://tktail.dev/performance/competitive/source/python/bench.py/)

### PowerShell 7 helper - Must be implemented or integrated in the helper

Deployment: A PowerShell script run with PowerShell 7, which is installed separately. The same script also runs on Windows PowerShell 5.1, which ships with Windows 10, Windows 11 and Windows Server 2016 and later.

1. [Determine] **Files, layout, time zone** - which files cover the incident (rotation), the field layout (#Fields can change within a file), the time zone (W3C times are UTC)
2. [Obtain] **Build and runtime** - PowerShell 7 on the machine being diagnosed - or the Windows PowerShell 5.1 that ships with Windows, where the same script runs; your script policy - execution policy, signing (the benchmark started it with -ExecutionPolicy Bypass)
3. [In the tested helper] **Top 10 clients** - a streaming read, W3C fields from #Fields, the 503 POST filter and the top 10 clients (top-ip-503-post)
4. [Adapt] **Endpoints and timeline** - the top endpoints and a per-minute timeline of the 503 POSTs - the tested helper has both for all 5xx, so a small change
5. [Integrate] **Event Log and counters** - Get-WinEvent and Get-Counter (PowerShell cmdlets on Windows), their output joined with the log results on one time line
6. [Implement] **Evidence** - the records with their context, secret redaction, source identity, a manifest with SHA-256, verification
7. [Implement] **Keep and share** - where packages live, for how long, a copy without local paths
8. [Integrate] **A usable answer** - an answer a person or an AI agent can use - the tested helper prints one JSON line

[bench.ps1 - the tested source](https://tktail.dev/performance/competitive/source/powershell/bench.ps1/)

## Find the cause, preserve the proof

A rotating log may keep only minutes of history. Once a search finds what explains the incident, TKTail turns the hits into a package that no longer depends on the log - every step below is in the current release.

Search hit -> Context -> Redaction -> Provenance -> Manifest and hashes -> Verification -> Evidence Library

1. **Search hit** - a result with its source, line, byte offset and the record's own time ([Help](https://tktail.dev/help/search/))
2. **Context** - records or seconds around each hit - plus other logs, event logs and Metric Sets of the same minutes ([Help](https://tktail.dev/help/saving-evidence/#save-the-results-of-a-search))
3. **Redaction** - built-in rules and yours, before anything is written; a rule that cannot run stops the save ([Help](https://tktail.dev/help/saving-evidence/#redaction))
4. **Provenance** - the file's identity, the byte ranges, format and encoding, the search, the TKTail that made it ([Help](https://tktail.dev/help/saving-evidence/#what-a-package-holds))
5. **Manifest and hashes** - manifest.json and README.txt; a SHA-256 for every file and for the package ([Help](https://tktail.dev/help/saving-evidence/#what-a-package-holds))
6. **Verification** - VALID, MODIFIED, INCOMPLETE or UNSUPPORTED - also after the source is gone ([Help](https://tktail.dev/help/saving-evidence/#the-evidence-library))
7. **Evidence Library** - kept until you delete it; linked to an incident; a shareable copy without local paths ([Help](https://tktail.dev/help/saving-evidence/#the-evidence-library))

Measured on a 1.0 GB synthetic trace: 57 results with 20 records on each side became a 142 KB package in 0.35 s. TKTail read 47 MB of the file (4.7 %) - never all of it.

Script output is not a verified evidence package - and the tested helpers do not claim to be one.

| | Script output (the tested helpers) | TKTail evidence package |
|---|---|---|
| What it holds | the answer as one JSON line (a count, a top 10); two record scenarios write the matching records to a file | the hits, the records around them, other sources of the same minutes, optionally every record parsed |
| Where each record came from | not recorded | the file's identity, byte ranges, format and encoding, the search |
| Secrets | as the log has them | redacted before anything is written; the manifest lists the rules that ran |
| Integrity | none | a SHA-256 for every file and for the package |
| Verification | none | VALID, MODIFIED, INCOMPLETE or UNSUPPORTED |
| A capture that fails | the process's exit code and error output | says so - in the Evidence Library and to an AI agent - instead of looking saved |
| After the log rotated | the output stays; nothing ties it to its source | independent of the log, still verifiable |
| Sharing | copy the file | a shareable copy without local paths, file identities or the TKTail's id |

A helper can implement equivalent evidence functionality. Each of these then has to be designed, implemented, tested and maintained:

- the selected records and their context (by records and by seconds)
- several sources in one package (logs, event logs, Metric Sets)
- each source's identity (file identity, not only its name) and exact byte ranges
- the format the records were read with and their parsed fields
- secret redaction with built-in and your own rules, before anything is written
- a SHA-256 for every file and for the archive, and a manifest
- verification: VALID, MODIFIED, INCOMPLETE
- atomic finalization, cancellation and visible failure states
- size quotas and free-disk protection
- a library: list, look up, share a copy, delete with confirmation
- permissions for AI clients and an MCP contract
- everything kept across restarts and after the source rotated

What the hashes prove: the package is unchanged since TKTail wrote it - not who made it. Verifiable investigation evidence, not a legal chain of custody. There is no unredacted package, by design. Not in the current release: packages of 4 GiB or more, watching numbered log generations to save them before they are deleted, an editor for redaction rules in the window.

## Scenario 2: the 503s come back

*Production operation.* The fix is deployed. How will you know if it happens again - tonight, after a restart, after the log rotates?

### TKTail - Built into TKTail

1. **Saved Search** - the question kept and versioned - sources, conditions, time; run again by you, or by an AI client ([Help](https://tktail.dev/help/bottom-panel/#save-the-question-save-the-answer))
2. **Alert** - the same condition language, a severity, how often to notify, what evidence to keep; an alert made from a search keeps its own copy of the condition ([Help](https://tktail.dev/help/alerts-and-monitoring/#creating-an-alert))
3. **Watching** - enabled alerts watch their files with or without a tab, hidden in the notification area too, and follow a dated series to its newest file ([Help](https://tktail.dev/help/alerts-and-monitoring/#monitoring-files-in-the-background))
4. **Incident** - each firing keeps the trigger record, the records around it and - when asked - Windows events and metric samples; still there after the log rotated ([Help](https://tktail.dev/help/alerts-and-monitoring/#incidents))
5. **Evidence** - a search's results saved as a package and linked to the incident ([Help](https://tktail.dev/help/saving-evidence/#the-evidence-library))
6. **Restart** - alerts, incidents and Saved Searches come back; enabled alerts watch again from the end of each file ([Help](https://tktail.dev/help/alerts-and-monitoring/#what-survives-a-restart))

Limits, plainly: TKTail is an application, not a Windows service - alerts run while it runs (hidden in the notification area too, or started with Windows), and lines written while it was closed are not checked. Not in the current release: alerts on Windows Event Logs or on sequences, e-mail, webhook or script actions, testing an alert against past data.

### A custom helper - Must be implemented or integrated in the helper - in C#, Python or PowerShell 7 alike

- **Persist the question** - the query logic and its parameters, versioned with the helper
- **Schedule or serve** - Task Scheduler (part of Windows) or a Windows service - its account, permissions and failure handling
- **Keep state** - where it last read; rotation and truncation; files that appear while it is stopped
- **Notify** - a channel (mail, chat, the event log), throttling, repeated matches
- **Restart behaviour** - no line missed, no duplicate alert after a restart or a crash
- **Log itself** - what it checked and when - so a stopped helper is not mistaken for a quiet log
- **Retention** - how long occurrences and their records are kept, and where
- **Export** - each occurrence with its records, for the ticket

## Scenario 3: a proprietary log format

*Investigation.* Your order gateway writes its own format. Which accounts have the most pending orders - and which orders took longer than a second?

**Teach TKTail the format once.**

```
2026-11-08 12:32:11.391|ACCOUNT=ACC-1042|ORDER=ORD-AB1234|STATUS=PENDING|ELAPSED=1350|NOTE=risk check
```

### TKTail - Built into TKTail

1. **Custom Format Studio** - a template (line, multi-line, delimited, application log), the fields named, every sample record previewed: a match, a partial match or no match ([Help](https://tktail.dev/help/custom-formats/))
2. **A reusable profile** - saved once and used for the files it names - an AI agent can draft and check one, and save it only with your permission ([Help](https://tktail.dev/help/custom-formats/#which-files-use-a-profile))
3. **Every feature reads fields** - search by field, aggregate, alert on a field condition, evidence with parsed records, an AI agent asking about accounts and orders ([Help](https://tktail.dev/help/ai-assistance/#working-with-your-own-log-formats))

### A custom helper - Must be implemented or integrated in the helper

- **A parser per toolchain** - one for each language your helpers are written in - in the benchmark, three: C#, Python and PowerShell
- **The hard parts** - multi-line records, types, timestamps and time zones, malformed lines
- **In step** - every parser and its tests changed when the format changes
- **Shared by every use** - monitoring, evidence and the AI path need the same parser - packaged so each of them can use it

One profile, every feature: **Profile** (records, fields, time, severity) -> **Search** (by field and time), **Aggregate** (group, top N, numbers), **Alert** (a field condition) -> **Evidence** (parsed records in the package) -> **AI** (answers in fields, not lines)

## Scenario 4: the old logs too - rotations and archives

*Investigation - Preview (release candidate 1.3.0-rc.3).* The incident began three days ago. The folder holds app.log, app.log.1.gz, support-bundle.zip and older-logs.tar.gz - where else does order 7741 appear?

**Search folders, compressed rotations and archive entries without unpacking them first.**

```
app.log
app.log.1.gz
support-bundle.zip  (api/api.log, worker/worker.log)
older-logs.tar.gz  (logs/app-2026-11-05.log ...)
```

### TKTail - Built into TKTail

1. **One folder search** - the plain and compressed logs read where they lie - app.log and app.log.1.gz, each generation once
2. **Archive contents on request** - the logs inside support-bundle.zip and older-logs.tar.gz only when asked, narrowed by entry masks; the answer says which archives it left out
3. **One answer** - each result names its archive and entry; one aggregation and one evidence package across files and archives
4. **A rotating log in one tab** - when app.log rotates the same tab moves on and the previous file closes; its previous files are its rotation history
5. **Its history, whatever the naming** - app.log.1.gz or app-2026-11-08_23-00.log.gz beside app.log - a number or a date and time: the generations newest first by their rotation key; the agent never parses names
6. **An entry as a tab** - a log inside support-bundle.zip opened where it lies - no temporary copy, the first lines at once

### A custom helper - Must be implemented or integrated in the helper

- **Unpack first** - gzip, ZIP and TAR decoded by another library or tool into a temporary folder that must be cleaned up
- **Hostile input** - expansion bombs, sizes, encrypted and damaged archives - each handled on purpose
- **One generation once** - app.log.1 next to app.log.1.gz is the same log - not counted twice
- **Provenance** - a result must still name the archive and entry it came from, for the evidence

## Scenario 5: an AI agent investigates

*Investigation.* An agent is asked: "Which clients sent the most POST requests that failed with 503?" What happens next?

### Through TKTail

AI client -> Controlled MCP -> Narrow tools -> Search and aggregate locally -> A small structured answer -> Evidence

- **AI client** - Claude Code or another MCP-compatible client
- **Controlled MCP** - stdio on this PC, or HTTP with a token - off until you allow it
- **Narrow tools** - 50 named operations with schemas - 39 read, 11 change data, each change behind its own switch
- **Search and aggregate locally** - TKTail searches and groups where the records are
- **A small structured answer** - 4.4 KB for the top 10 - reading every record through MCP instead took 3.55 MB
- **Evidence** - a redacted, hashed package - with your permission

### Through a general shell

AI client -> The account's authority -> Inspect the environment -> Write code -> Run it -> Parse the output

- **AI client** - with a general shell or language runtime
- **The account's authority** - what the account the client runs as can reach
- **Inspect the environment** - which runtimes exist, where the logs are, their format
- **Write code** - a parser and a counter for this question
- **Run it** - and fix what fails
- **Parse the output** - then the next question; the evidence is what the agent decides to copy and record

Historical benchmark — TKTail 1.1.0: "Which 10 clients sent the most POST requests answered 503?" over iis-100mb (1,365 matches), measured through TKTail's MCP: every record read whole sent the AI client 3.55 MB in 1,380 MCP calls; TKTail's aggregation sent 4.4 KB in 1 MCP call - 805x less. A script that aggregates locally can return a small answer too, once it is written and run. Bytes and calls as measured, not tokens.

- Shell access is not insecure in itself: it is a general capability, governed by the account it runs as and by what your team adds - a low-privilege account, JEA, an allow-listing host.
- TKTail offers a narrower, product-level capability boundary: named investigation operations with schemas, bounds and provenance, inside Windows security.
- TKTail does not replace Windows ACLs - everything it reads, the account it runs as can read - and it cannot sandbox a separate shell an AI agent also has.

| Status | Control | What it does |
|---|---|---|
| Implemented | AI access switch | off by default, read on every call |
| Implemented | Investigation Roots | folders only you approve, paths judged where they really lead (Trial / Pro) |
| Implemented | Write switches | four, each off by default |
| Implemented | Resource bounds | answer size, pages, kept results, concurrency, waits, regex limits, evidence quotas |
| Implemented | Provenance | every answer names the TKTail and run that produced it |
| Partial | Destructive actions | deleting evidence needs you; alerts, Saved Searches and Metric Sets are deleted with their switch alone |
| Partial | Audit | a log line per call and per change - which client acted is not recorded |
| Partial | Redaction | evidence and pinned snapshots; normal reads return the log as it is |
| Planned | One-use approval | of each consequential operation |
| Planned | Operation budget | per call, with approval for heavy work |
| Planned | Append-only audit | tamper-evident |
| Planned | Untrusted-data marking | answers that say log content is data, not instructions |

[Permissions and access model](https://tktail.dev/help/ai-assistance/#permissions-and-access-model)

## One investigation runtime, for an operator and an AI agent

The operator and the agent use the same open sources, the same profiles, the same searches - the agent's appear in Search Results, marked AI - and the same alerts, incidents and evidence packages. The operator decides what the agent may read and change; the agent searches, counts and preserves; either picks up where the other stopped, and the next shift reads the evidence instead of starting over.

- Tested: Claude Code 2.1.302 with the model claude-opus-5-5, in the TKTail 1.2.0 qualification against the shipping executable - a production incident, a handover from evidence alone and two developer runs, every figure equal to the ground truth.
- Other MCP-compatible AI clients connect the same way - standard MCP over stdio, Streamable HTTP with Trial / Pro - and are protocol-compatible, not tested by us.

[Connecting an AI client](https://tktail.dev/help/mcp-clients/)

## Before, during and after an incident

### Before: prepare once

- profiles for your formats (Custom Format Studio)
- Saved Searches for the questions you ask again
- alerts with the evidence to keep when they fire
- Metric Sets collecting the counters that matter (Trial / Pro)
- Investigation Roots and AI permissions decided in advance

### During: investigate

- search logs and event logs: text, regular expressions, fields, time, numbers
- aggregate: top N, per minute, number summaries (for AI clients)
- the Windows Event Log of the same minutes
- Metrics around this time (Trial / Pro)
- sequences across sources, joined by a key
- an AI agent over MCP, on the same sources

### After: keep what you learned

- evidence packages - verified, shareable, kept until you delete them
- incidents with the records, events and samples their alert kept - acknowledge, pin, export
- pinned searches across restarts
- the conclusion in the package's note, for the next shift
- a Saved Search and an alert, so the next time is faster

Not in the current release: incident notes, maintenance windows and baselines, and incident management by an AI client.

## What would you have to build?

A feature-equivalent custom solution is possible. These are the subsystems it needs - each to design, implement, test, document and maintain. We do not estimate the effort: it depends on your team, your formats and your requirements.

| Subsystem | What it has to do | In TKTail |
|---|---|---|
| Parser and profile | records, fields, types, time, severity, multi-line framing - for every format | [Help](https://tktail.dev/help/custom-formats/) |
| Search semantics | text, regular expressions with safety limits, fields, time ranges, numbers - across files and event logs | [Help](https://tktail.dev/help/search/) |
| Aggregation | group by keys, top N, histograms, number summaries over every match | [Help](https://tktail.dev/help/ai-assistance/#search-and-summaries) |
| Cancellation | stop at a safe point, say what is partial | [Help](https://tktail.dev/help/bottom-panel/#jobs) |
| Bounded results | answer sizes, pages, kept results, waits | [Help](https://tktail.dev/help/ai-agents-permissions/) |
| Source identity | the same file after a rename or rotation; a stale reference refused | [Help](https://tktail.dev/help/saving-evidence/#rotating-logs-pin-then-save) |
| Provenance | which installation, which run, which search produced an answer | [Help](https://tktail.dev/help/mcp/#which-tktail-answered) |
| Access policy | what an AI client may read and change, decided by the user | [Help](https://tktail.dev/help/ai-agents-permissions/) |
| Monitoring | files watched without a tab, dated series, restarts | [Help](https://tktail.dev/help/alerts-and-monitoring/) |
| Alert state | versions, throttling, cooldown, incidents, acknowledgement | [Help](https://tktail.dev/help/alerts-and-monitoring/#incidents) |
| Evidence | context capture across sources, before the log rotates | [Help](https://tktail.dev/help/saving-evidence/) |
| Redaction | built-in and custom rules, stopping when a rule cannot run | [Help](https://tktail.dev/help/saving-evidence/#redaction) |
| Integrity | hashes, a manifest, verification | [Help](https://tktail.dev/help/saving-evidence/#what-a-package-holds) |
| Persistence | searches, profiles, alerts, incidents and packages across restarts | [Help](https://tktail.dev/help/alerts-and-monitoring/#what-survives-a-restart) |
| MCP / API | tools with schemas, permissions, refusals and examples that are tested | [Help](https://tktail.dev/help/mcp-tools/) |
| Documentation and tests | a user guide, an agent guide, tests for every release | [Help](https://tktail.dev/help/ai-agents/) |

## Bring an investigation tool, not a diagnostic runtime stack

The machine being diagnosed is where the evidence is - often a production server with a change process. Everything brought to it has to be approved, installed, kept up to date and removed again - TKTail too: it is one more executable to approve. The question is what else each approach brings: the fewer general-purpose tools an investigation needs there, the less there is to approve.

- **One package** - README.txt, THIRD_PARTY_NOTICES.txt, TKTail.exe, help/ - TKTail.exe 7.2 MB; extract it and run TKTail.exe, no installer ([more](https://tktail.dev/download/))
- **Native code** - a Windows x64 executable, C++ with the C runtime linked in statically; no administrator rights for normal use
- **Windows DLLs only** - only Windows system DLLs - the release manifest lists each one, static and delay-loaded; no .NET, no Visual C++ redistributable
- **Windows** - Windows 10 version 1607 or later, Windows 11, or Windows Server 2016 or later - x64 ([Help](https://tktail.dev/help/system-requirements/))
- **How it was checked** - Tested on Windows 11; every Windows function TKTail imports is checked against Windows 10 1607 / Windows Server 2016. This version has not been run on Windows 10 or Windows Server yet - a clean-machine run is still an operator step. ([Help](https://tktail.dev/help/system-requirements/#how-this-was-checked))
- **Signature** - not Authenticode-signed yet - approve it by the SHA-256 the download page and the release manifest give ([more](https://tktail.dev/download/#integrity))

Windows DLLs in the release manifest: ADVAPI32.dll, bcrypt.dll, COMCTL32.dll, COMDLG32.dll, CRYPT32.dll, d2d1.dll, d3d11.dll, dwmapi.dll, DWrite.dll, GDI32.dll, KERNEL32.dll, ole32.dll, OLEACC.dll, OLEAUT32.dll, pdh.dll, SHELL32.dll, SHLWAPI.dll, USER32.dll, UxTheme.dll, wevtapi.dll, WS2_32.dll.

Normal local investigation needs no .NET runtime, no Python, no PowerShell 7, no external database, no log server and no agent service: no additional runtime dependencies.

| Tested helper | On the machine being diagnosed | How the benchmark built and ran it |
|---|---|---|
| C# helper | A framework-dependent .NET 10 console program: the .NET runtime has to be on the machine that runs it. Publishing it self-contained (the runtime bundled) or as NativeAOT (a native executable) removes that step. | Built by the benchmark with dotnet build -c Release; Framework-dependent (SelfContained false), win-x64; No ReadyToRun, no NativeAOT; Run as the built CompetitiveBench.exe, one question per process; measured with .NET SDK 10.0.403 |
| Python helper | A CPython script: a Python runtime has to be on the machine that runs it (and any package a further step needs). A frozen, self-contained executable is an alternative. | CPython, the standard library only; Started with the interpreter that runs the benchmark (python bench.py); measured with Python 3.13.0 (CPython) |
| PowerShell 7 helper | A PowerShell script run with PowerShell 7, which is installed separately. The same script also runs on Windows PowerShell 5.1, which ships with Windows 10, Windows 11 and Windows Server 2016 and later. | Started as pwsh -NoProfile -NonInteractive -ExecutionPolicy Bypass -File powershell/bench.ps1; The same script runs unchanged on Windows PowerShell 5.1 (measured as well); measured with PowerShell 7.6.9 (and Windows PowerShell 5.1.26100.9818) |

Windows PowerShell 5.1 ships with Windows 10, Windows 11 and Windows Server 2016 and later, so a PowerShell helper may need nothing installed; a C# helper can be published self-contained or as NativeAOT; a Python helper can be frozen into one executable. Installing a runtime is therefore not the main difference. The larger one is a one-off helper against prebuilt investigation capabilities - formats, search, aggregation, correlation, evidence, monitoring and access control that already exist, are documented and are tested with every release.

Fewer tools on the host: TKTail can often avoid bringing additional general-purpose tooling - a runtime, a package set, a scripting environment an agent assembles first - onto the machine being diagnosed. That says nothing against those tools; it is less to approve, patch and govern.

## Capability matrix

What TKTail has built in, beside what the three tested helpers of the published benchmark implement - read from each helper's source, linked in its column. The helpers are competent programs written for fixed questions; each could be extended. This compares the tested programs, not the languages.

| Capability | TKTail | Tested C# helper | Tested Python helper | Tested PowerShell 7 helper |
|---|---|---|---|---|
| Huge-file search | Built in (since 1.0) - files of any size with bounded memory; text, regular expressions, fields and time ranges across files and event logs ([Help](https://tktail.dev/help/search/)) | Implemented in the tested helper - streams the file in 1 MB blocks - for each of its fixed questions | Implemented in the tested helper - reads the file line by line with a 1 MB buffer - for each of its fixed questions | Implemented in the tested helper - a .NET StreamReader, line by line - for each of its fixed questions |
| Structured format profile (records, fields, time, severity) | Built in (since 1.0) - 35+ formats recognized from their content, multi-line records framed; one profile serves every feature ([Help](https://tktail.dev/help/built-in-formats/)) | Not implemented in the tested helper - IIS W3C field positions are read from the #Fields header inside the program; the application log is searched as text | Not implemented in the tested helper - IIS W3C field positions are read from the #Fields header inside the program; the application log is searched as text | Not implemented in the tested helper - IIS W3C field positions are read from the #Fields header inside the script; the application log is searched as text |
| Custom Format Studio (a new format, previewed on real records) | Built in (since 1.0) - templates for line, multi-line, delimited and application logs; every record previewed as a match, a partial match or no match ([Help](https://tktail.dev/help/custom-formats/)) | Not implemented in the tested helper - a new format is new parsing code | Not implemented in the tested helper - a new format is new parsing code | Not implemented in the tested helper - a new format is new parsing code |
| Aggregate / group by (top N, histograms, number summaries) | Built in (since 1.1) - up to four keys, top N, per second / minute / hour / day, count, sum, minimum, maximum, average - over every match, for AI clients (MCP) ([Help](https://tktail.dev/help/ai-assistance/#search-and-summaries)) | Implemented in the tested helper - fixed groupings coded per question: the top 10 of one field, counts per minute | Implemented in the tested helper - fixed groupings coded per question: the top 10 of one field, counts per minute | Implemented in the tested helper - fixed groupings coded per question: the top 10 of one field, counts per minute |
| Numeric conditions (a number in the text compared as a number) | Built in (since 1.1) - for AI clients and in Saved Searches - Advanced Search shows such a condition but cannot create one yet ([Help](https://tktail.dev/help/ai-assistance/#what-an-assistant-can-do)) | Implemented in the tested helper - fixed thresholds coded per question (elapsed at least 1000 ms, status 500 and up, time-taken at least 1000) | Implemented in the tested helper - fixed thresholds coded per question (elapsed at least 1000 ms, status 500 and up, time-taken at least 1000) | Implemented in the tested helper - fixed thresholds coded per question (elapsed at least 1000 ms, status 500 and up, time-taken at least 1000) |
| Windows Event Log (channels and saved .evtx files) | Built in (since 1.0) - history and LIVE, filters and search, beside the logs ([Help](https://tktail.dev/help/windows-event-log/)) | Not implemented in the tested helper - reads one log file; an Event Log reader is a .NET API to integrate | Not implemented in the tested helper - reads one log file; an Event Log binding or wevtutil output to integrate | Not implemented in the tested helper - reads one log file; Get-WinEvent is a PowerShell cmdlet on Windows - its output to integrate |
| Metrics (Windows Performance Counters) | Built in (since 1.0) - Trial / Pro: Metric Sets beside the logs, Show Metrics Around This Time ([Help](https://tktail.dev/help/metrics/)) | Not implemented in the tested helper - a performance-counter API to integrate (the helper reads only its own CPU time and memory for the benchmark) | Not implemented in the tested helper - a counter binding or typeperf output to integrate (the helper reads only its own CPU time and memory for the benchmark) | Not implemented in the tested helper - Get-Counter is a PowerShell cmdlet on Windows - its output to integrate (the helper reads only its own CPU time and memory for the benchmark) |
| Correlation across sources (sequences in time windows, joined by a key) | Built in (since 1.0) - one thing, then another, within seconds - across logs and event logs ([Help](https://tktail.dev/help/bottom-panel/#sequences-one-thing-then-another-in-time)) | Not implemented in the tested helper - one file, one question per run | Not implemented in the tested helper - one file, one question per run | Not implemented in the tested helper - one file, one question per run |
| File Series (a dated rotating log followed as one log) | Built in (since 1.0) - the next file LIVE, alerts follow the series - previous files kept open with Trial / Pro ([Help](https://tktail.dev/help/rotating-dated-logs/)) | Not implemented in the tested helper - one file path per run - choosing the files of a period is the caller's | Not implemented in the tested helper - one file path per run - choosing the files of a period is the caller's | Not implemented in the tested helper - one file path per run - choosing the files of a period is the caller's |
| Compressed history (.gz, .zip, .zst, .tar.gz) | Preview (release candidate 1.3.0-rc.1) - a log's compressed generations (.gz, .zst) searched where they lie with its plain ones, nothing unpacked; ZIP and TAR contents when the search asks for them; evidence from them - not in Stable 1.2.1 | Not implemented in the tested helper - plain files only | Not implemented in the tested helper - plain files only | Not implemented in the tested helper - plain files only |
| Archives as sources (7Z, RAR, XZ, BZIP2, LZ4, TARs) - browse, open an entry, search | Preview (release candidate 1.3.0-rc.2) - the Explorer lists an archive's logs, an entry opens as a tab, searched and kept as evidence where it lies - nothing unpacked, no other program run; not in Stable 1.2.1 | Not implemented in the tested helper - plain files only - unpacking is the caller's | Not implemented in the tested helper - plain files only - unpacking is the caller's | Not implemented in the tested helper - plain files only - unpacking is the caller's |
| Folder search across compressed rotations and archive entries | Preview (release candidate 1.3.0-rc.2) - compressed logs searched with the plain ones; archive contents only when asked, narrowed by entry masks; the answer says what the scope left out - not in Stable 1.2.1 | Not implemented in the tested helper - one plain file path per run | Not implemented in the tested helper - one plain file path per run | Not implemented in the tested helper - one plain file path per run |
| A rotating log followed in one tab (app.log -> app.log.1, a new dated file) | Preview (release candidate 1.3.0-rc.2) - the same tab moves to the new file and the previous handle closes; reading history is never interrupted; previous files in its rotation history - not in Stable 1.2.1 | Not implemented in the tested helper - one run reads the file it is given and exits - following a rotation is the caller's | Not implemented in the tested helper - one run reads the file it is given and exits - following a rotation is the caller's | Not implemented in the tested helper - one run reads the file it is given and exits - following a rotation is the caller's |
| A log's history whatever its rotation naming (a number, a date, a date and time, or both) | Preview (release candidate 1.3.0-rc.3) - one rotation model: generations newest first by their rotation key, compressed ones included, the key given to AI clients - no folder search or name parsing; numbers that are names never group; not in Stable 1.2.1 | Not implemented in the tested helper - one file path per run - finding and ordering a log's rotated files is the caller's | Not implemented in the tested helper - one file path per run - finding and ordering a log's rotated files is the caller's | Not implemented in the tested helper - one file path per run - finding and ordering a log's rotated files is the caller's |
| An archive entry or compressed log opened as a tab without unpacking it | Preview (release candidate 1.3.0-rc.3) - the tab reads the entry where it lies - no temporary copy, memory bounded whatever its size, the first lines at once and the rest in the background; not in Stable 1.2.1 | Not implemented in the tested helper - plain files only - unpacking is the caller's | Not implemented in the tested helper - plain files only - unpacking is the caller's | Not implemented in the tested helper - plain files only - unpacking is the caller's |
| AI agent documentation inside TKTail.exe - its own version, offline, one topic at a time | Preview (release candidate 1.3.0-rc.3) - compressed in TKTail.exe, bound to its version and commit, read offline one small topic at a time (tktail_list_knowledge, tktail_get_knowledge); the AI Agent Harness ships the same; not in Stable 1.2.1 | Not implemented in the tested helper - its usage is in its source and the benchmark's README | Not implemented in the tested helper - its usage is in its source and the benchmark's README | Not implemented in the tested helper - its usage is in its source and the benchmark's README |
| Alerts and incidents | Built in (since 1.0) - text, field and counter conditions; each firing keeps an incident with the records, events and samples around it - while TKTail runs ([Help](https://tktail.dev/help/alerts-and-monitoring/)) | Not implemented in the tested helper - one run answers one question and exits | Not implemented in the tested helper - one run answers one question and exits | Not implemented in the tested helper - one run answers one question and exits |
| Reusable monitoring (saved definitions, restarts, dated series) | Built in (since 1.0) - Saved Searches, alerts and monitored files come back after a restart; an alert's runtime status since 1.1 ([Help](https://tktail.dev/help/alerts-and-monitoring/#what-survives-a-restart)) | Not implemented in the tested helper - no scheduler, state or notification - each run is started by its caller | Not implemented in the tested helper - no scheduler, state or notification - each run is started by its caller | Not implemented in the tested helper - no scheduler, state or notification - each run is started by its caller |
| Evidence package (the hits, their context, other sources of the same minutes) | Built in (since 1.2) - records or seconds of context; other logs, event logs and Metric Sets of the window; kept after the log rotates ([Help](https://tktail.dev/help/saving-evidence/)) | Not implemented in the tested helper - prints the answer as one JSON line; two record scenarios write the matching records to --output - no context, no manifest | Not implemented in the tested helper - prints the answer as one JSON line; two record scenarios write the matching records to --output - no context, no manifest | Not implemented in the tested helper - prints the answer as one JSON line; two record scenarios write the matching records to -Output - no context, no manifest |
| Redaction of secrets | Built in (since 1.2) - evidence packages and pinned snapshots, before anything is written - built-in rules and your own; normal reads return the log as it is ([Help](https://tktail.dev/help/saving-evidence/#redaction)) | Not implemented in the tested helper - output as the log has it | Not implemented in the tested helper - output as the log has it | Not implemented in the tested helper - output as the log has it |
| Provenance and source identity | Built in (since 1.0) - every answer names its TKTail and run; a reference into a file that changed is refused; evidence adds byte ranges (1.2) ([Help](https://tktail.dev/help/mcp/#which-tktail-answered)) | Not implemented in the tested helper - the answer names no source identity or byte range | Not implemented in the tested helper - the answer names no source identity or byte range | Not implemented in the tested helper - the answer names no source identity or byte range |
| Integrity verification (SHA-256: VALID, MODIFIED, INCOMPLETE) | Built in (since 1.2) - every file and the package hashed - the hashes show it is unchanged, not who made it ([Help](https://tktail.dev/help/saving-evidence/#the-evidence-library)) | Not implemented in the tested helper - no hashes | Not implemented in the tested helper - no hashes | Not implemented in the tested helper - no hashes |
| Evidence Library | Built in (since 1.2) - list, verify, link to an incident, a shareable copy; deleting needs your confirmation ([Help](https://tktail.dev/help/saving-evidence/#the-evidence-library)) | Not implemented in the tested helper - output files are wherever the caller put them | Not implemented in the tested helper - output files are wherever the caller put them | Not implemented in the tested helper - output files are wherever the caller put them |
| MCP interface for AI clients | Built in (since 1.0) - stdio in every edition; HTTP with a token with Trial / Pro ([Help](https://tktail.dev/help/mcp/)) | Not implemented in the tested helper - a command-line program: arguments in, one JSON line out | Not implemented in the tested helper - a command-line program: arguments in, one JSON line out | Not implemented in the tested helper - a command-line script: arguments in, one JSON line out |
| Permission boundary for AI clients | Built in (since 1.0) - off until allowed; scope = what is open plus approved folders (Trial / Pro); one switch per kind of change - inside Windows security, never instead of it ([Help](https://tktail.dev/help/ai-agents-permissions/)) | Not implemented in the tested helper - runs as the identity that starts it; a low-privilege account, JEA or an allow-listing host can restrict that - configuration you add | Not implemented in the tested helper - runs as the identity that starts it; a low-privilege account or an allow-listing host can restrict that - configuration you add | Not implemented in the tested helper - runs as the identity that starts it; a low-privilege account, JEA or an allow-listing host can restrict that - configuration you add |
| Resource governance (bounded answers, pages, concurrency, quotas) | Built in (since 1.0) - fixed caps on answers, pages, kept results, running searches and waits; evidence quotas since 1.2; a per-operation budget is planned ([Help](https://tktail.dev/help/ai-assistance/#permissions-and-access-model)) | Not implemented in the tested helper - streaming keeps memory small (a 1 MB buffer; a longer line stops the run); no bound on answer size, distinct keys or run time | Not implemented in the tested helper - streaming keeps memory small (line by line); no bound on answer size, distinct keys or run time | Not implemented in the tested helper - streaming keeps memory small (line by line); no bound on answer size, distinct keys or run time |
| Cancellation (partial results marked partial) | Built in (since 1.0) - searches stop at a safe point and say they are partial; an AI client cancels only its own searches ([Help](https://tktail.dev/help/bottom-panel/#jobs)) | Not implemented in the tested helper - end the process | Not implemented in the tested helper - end the process | Not implemented in the tested helper - end the process |

Helper sources: [C# helper](https://tktail.dev/performance/competitive/source/csharp/Program.cs/) · [Python helper](https://tktail.dev/performance/competitive/source/python/bench.py/) · [PowerShell 7 helper](https://tktail.dev/performance/competitive/source/powershell/bench.ps1/)

## More

- [AI-assisted investigation](https://tktail.dev/ai/)
- [Purpose-built scripts and the TKTail workflow - the benchmark](https://tktail.dev/performance/competitive/)
- [Saving evidence (Help)](https://tktail.dev/help/saving-evidence/)
- [AI assistance (Help)](https://tktail.dev/help/ai-assistance/)
- [System requirements (Help)](https://tktail.dev/help/system-requirements/)
- [Download](https://tktail.dev/download/)

---

The HTML page: https://tktail.dev/ai/investigation-workflow/
