FIELD GUIDE / 03

More sources.
Clearer boundaries.

Request blocking through native pre-tool hooks. Collect runtime telemetry and provider audit records for observation. Choose the integration that answers your question.

01 / DOWNLOAD & EXTRACT

Get the integrations locally.

Native hooks and telemetry, together.

Seven native adapters connect tool activity to local policy decisions. Eleven telemetry sources bring runtime and provider audit observations into the same workflow. Review tested coverage and setup requirements before choosing your setup.

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.

Extract your package and review platform prerequisites, then run commands from its directory. Keep the executable beside its engine library. On Windows use .\agent-lens.exe in place of ./agent-lens. These commands do not install client settings.

Extracted package · POSIX shell
./agent-lens telemetry sources
RUNTIME

Requests and tool activity.

OTel describes instrumented sessions, requests, timing, and usage. Its coverage follows the producer.

PROVIDER AUDIT

Account and service activity.

Provider feeds describe events within an organization. Administrative logs do not capture every local tool call.

NATIVE HOOKS

A separate control point.

Seven adapters can request denial at supported synchronous pre-tool hooks. OTLP and provider audit ingestion never run block rules.

NATIVE HOOKS / EXPERIMENTAL ADAPTERS

Block where the client provides a gate.

Native adapter IDs are claude, codex, hermes, gemini, cursor, copilot, and cowork. A client must load the hook, invoke it before dispatch, and honor its response. Post-tool and lifecycle matches remain observations.

Replace absolute paths · print each integration for review
./agent-lens --state /absolute/path/lens-state start \
  --output /absolute/path/events.jsonl --rules /absolute/path/default.yaml
./agent-lens --state /absolute/path/lens-state config --agent cursor
./agent-lens --state /absolute/path/lens-state config --agent copilot
./agent-lens --state /absolute/path/lens-state config --agent cowork
  • Cursor: 11 events. Merge into project or user .cursor/hooks.json, complete workspace trust, and reload/restart as required. Only preToolUse blocks. Generated config sets failClosed: true and a ten-second timeout; normal pre-tool and observational subagent-start responses explicitly allow continuation. Cloud initial read-only turns run no hooks.
  • Copilot CLI: 12 events. Merge into .github/hooks/*.json or user .copilot/hooks/*.json, complete trust, and restart the CLI. Only preToolUse blocks. Direct exec/args configuration is CLI-only; its 30-second timeout fails open upstream. It is not an IDE/cloud integration.
  • Cowork: five events. Install a hooks-only plugin through Customize → Plugins → Upload plugin, then start a new task. Only PreToolUse blocks; its config requests onFailure: block. Cloud tasks need the Linux executable and engine inside the plugin. A path to your Mac or Windows executable will not reach that runtime.

Review complete event registries, installation and failure contracts and the Cowork packaging example. Configuration output does not install settings, grant trust, or prove hook invocation. Keep executable, engine, state, rules and output reachable in the actual runtime.

Live checks passed with Cursor 3.27.22 and Copilot CLI 1.0.105 on Windows 11 ARM64, plus Claude Desktop 4.29.0 using Cowork's Linux x64 cloud runtime: allowed files, blocked .env files, and policy off/on controls. See the tested versions and event coverage.

config --agent cursor configures a native gate. telemetry config --source cursor-runtime configures observation. Cowork OTel, Copilot OTel, session streams and provider audit feeds follow that same boundary.

02 / ELEVEN DISTINCT SOURCES

Choose the evidence you need.

Official contracts checked October 29, 2026. Entitlements and admin permissions apply before a provider can export anything. Each row identifies a specific surface, not complete visibility into a product.

Experimental source inventory and ingest modes
Source / IDCoverage / accessIngest
Claude Codeclaude-code-otelLocal runtime · opt-in client configurationOTLP import / HTTP
Claude Coworkclaude-cowork-otelCowork runtime · Team / Enterprise adminOTLP via reachable collector
Codexcodex-otelLocal runtime · user or managed OTel configOTLP import / HTTP
Cursor runtimecursor-runtimeServer-side OTel · Enterprise adminOTLP via public HTTPS collector
Copilot OTelcopilot-otelSupported client runtime · local / managed configOTLP import / HTTP
Cursor auditcursor-auditTeam account changes · Enterprise Admin APIJSON import / API poll
Copilot auditcopilot-auditCopilot audit category · audit-read permissionJSON import / API poll
Copilot session streamcopilot-sessionRequest / response records · eligible enterprise previewJSON import
Anthropic Complianceanthropic-complianceActivity Feed · enabled API and scoped keyJSON import / API poll
OpenAI API Platformopenai-auditOrganization administration · Admin API keyJSON import / API poll
Gemini in Workspacegoogle-geminiWorkspace feature use · authorized Reports APIJSON import / API poll

Local session folders are a fourth kind of evidence. A documented storage path does not establish a stable export schema. Lens does not crawl Copilot history or assume an IDE transcript format.

Product names are not interchangeable.

Cowork has its own monitoring configuration; it does not configure Claude Code or the Code tab. OpenAI API Platform audit logs are separate from Codex OTel. Workspace Gemini activity uses gemini_in_workspace_apps; it is separate from Gemini CLI hooks.

03 / LOCAL OBSERVATION JSONL

Listen, import, or poll.

Foreground OTLP listener
./agent-lens telemetry listen \
  --source claude-code-otel --bind 127.0.0.1:4318 \
  --output ./claude-code-telemetry.jsonl

The loopback listener accepts OTLP HTTP JSON and protobuf at /v1/logs, /v1/metrics, and /v1/traces. Providers may emit fewer signals. It has no gRPC server, TLS termination, or collector authentication. Use separate ports and files per source; the source label does not authenticate a sender.

Send HTTP/1.1 POST requests with Content-Length: up to 8 MiB per body, 16 KiB of headers, and a five-second read deadline. Chunked transfer and gzip are unsupported. Configure collector forwarding with compression disabled and a content length. Success follows a locked, synced append; normalized batches are limited to 10,000 events and 32 MiB.

Import authorized OTLP export messages
./agent-lens telemetry import \
  --source codex-otel --signal logs --format json \
  --input ./otlp-logs.json --output ./codex-telemetry.jsonl

./agent-lens telemetry import \
  --source copilot-otel --signal traces --format protobuf \
  --input ./otlp-traces.pb --output ./copilot-telemetry.jsonl

Provider exports use their documented JSON envelopes or JSONL records. Binary input is an OTLP export message, without a gRPC frame. CSV and arbitrary console output are not accepted contracts.

Bounded read · authorized API Platform organization
./agent-lens telemetry poll --source openai-audit \
  --token-env OPENAI_ADMIN_KEY --output ./openai-audit.jsonl \
  --checkpoint ./openai-audit.checkpoint.json --max-pages 10

Provision the token through your approved secret manager first; --token-env names the variable, not the secret. A poll retrieves a bounded set of pages. It is not a background service or an OAuth login flow. Consult the source guide for account scope, time windows, pagination, and supported polling flags.

04 / EXPLICIT CONFIGURATION

Review before connecting.

Print configuration for review
./agent-lens telemetry config --source claude-code-otel

Review the configuration templates and merge only the relevant settings manually. Managed policy can override local values. Complete normal client consent and trust steps; Lens does not edit global settings or bypass policy.

Cowork exports from its VM or cloud runtime. Cursor exports from its servers and requires public HTTPS with authentication. Their loopback address is not your host. Use a reachable, secured collector and forward to Lens on the collector host.

The Collector Contrib example provides TLS/auth ingress and an optional gRPC bridge. Supply real certificates and secrets outside source control, preserve source separation, and validate it against your installed Collector release. It is an example, not a tested production deployment.

05 / METADATA FIRST

Observe without keeping raw content.

Lens keeps an allowlist of metadata and drops raw log bodies, prompts, tool arguments/results, unknown fields, and recognized credential patterns. Output uses agent-lens.telemetry.v1 with enforcement: observe_only. A provider approval or denial is that provider's observation, not a Lens block.

  • Keep source content capture off. Older Cowork versions may export content unless the managed device policy explicitly sets otlpContentCapture to [].
  • Metadata can identify people, sessions, and resources. The allowlist is not a complete anonymizer or DLP system.
  • Filtering does not erase content already present in the source file, producer, or collector buffers.
  • Allow for batching, delayed events, duplicates, and gaps. Preserve source time and receipt time separately.

Configure output access, retention, rotation, and downstream identity yourself. AI Lens is not a durable, tamper-evident audit service and does not prove complete agent visibility.

06 / TRACEABLE RESEARCH

Follow the provider contracts.

The full source guide preserves official URLs, retrieval dates, schemas, permissions, latency and content caveats for all eleven sources. It separates published contracts from local implementation tests.

Local fixture and receiver tests do not validate enterprise entitlements, managed-policy rollout, live-client delivery, cloud networking, or production reliability. No enterprise live test is claimed for these integrations.