RUNTIME HOOKS. DEFENDER CONTEXT.

Bring agent
actions into focus.

AI agents use real tools. Give defenders a clearer view.

Observe tool requests, apply readable YAML policies, and turn cooperative agent hooks into local evidence you can investigate. Also collect OTLP and provider audit observations.

NATIVE HOOK ADAPTERSClaude CodeCodexHermesGemini CLICursorCopilot CLICowork

Native hooks for tool decisions. OTLP and provider audit feeds for a broader view of agent activity.

agent-lens / events.jsonlDEMO
TOOL ACTIVITYSYNTHETIC REPLAY
12:04:21
Read src/main.rsclaude · PreToolUse
allow
12:04:22
Write .env.localclaude · PreToolUse
block
// a rule match, with content omitted"matched_rules": ["protect-env-files"],
"enforcement": "supported"
12:04:23
Read .envcodex · PostToolUse
would_block
LOCAL JSONLMETADATA FIRST. CONTENT OPT-IN.
30 / YAML rules

5 defaults + 25 optional recipes

7 / native adapters

Client and event coverage varies

3 / desktop platforms

Windows · Linux · macOS

DOWNLOAD. EXTRACT. TRY IT.

Get AI Lens for your OS.

Grab a portable ZIP, then run the local demo. No Rust toolchain needed.

Using Cowork? Download the Cowork plugin ZIP and follow the upload instructions.

Unsigned portable packages. Keep the executable beside its engine library. Intel Macs and other architectures: build from source.

Extraction and setup instructions

FOLLOW THE ACTION

From tool request to
defender evidence.

Understand the decision at the hook boundary, then carry that context into your investigation.

01

Observe the request

An installed agent hook launches AI Lens with a native JSON callback.

02

Evaluate your policy

Explicit tool, path, and content selectors match the original input.

03

Return a decision

Supported pre-tool hooks can request denial. Post-tool matches stay observational.

04

Keep the evidence

One event per JSONL line, ready for your existing log shipper and SIEM.

READ IT. QUESTION IT. ADAPT IT.

A small policy catalog.
A practical starting point.

Open rule reference

One policy file is loaded at a time. Optional packs are selected explicitly; combine chosen rule lists manually.

USE THE TOOLS YOU ALREADY HAVE

Readable events.
Useful context.

Agent, tool, phase, matched rules, and enforcement support travel together. Raw prompts and tool content stay out of normal collection by default.

Take JSONL into your SIEM
Illustrative event · content omitted
{"schema_version":1,"agent":"claude","hook_event":"PreToolUse","tool_name":"Write","phase":"pre","decision":"block","matched_rules":["protect-env-files"],"enforcement":"supported"}
allowblockwould_block

BUILD YOUR UNDERSTANDING

Start with a demo.
Follow the evidence.

Run the local demo Help improve the project