InvestigateEvidence retention

Claude OpenTelemetry Evidence

Claude Code, the Claude Agent SDK, and Claude Cowork can send OpenTelemetry logs to AgentKeeper. Treat OTLP as a centralized telemetry input: it records Claude-reported activity, enriches Activity...

Claude Code, the Claude Agent SDK, and Claude Cowork can send OpenTelemetry logs to AgentKeeper. Treat OTLP as a centralized telemetry input: it records Claude-reported activity, enriches Activity and Investigations, and lets AgentKeeper run post-execution detections across Claude Code and Cowork.

For pre-tool blocking, use Runtime Shield hooks or MCP Gateway. OTLP complements those controls with retained evidence, usage context, and investigation timelines.

OpenAI Compliance API is a separate provider-side evidence path for ChatGPT Enterprise and Codex audit logs. Use OpenAI Compliance API when the source of truth is ChatGPT workspace compliance export rather than Claude OpenTelemetry.

Supported Capabilities

CapabilityNotes
OTLP HTTP logs ingestAccepts JSON and application/x-protobuf log payloads
Claude Code telemetryUse the base endpoint /api/v1/otlp; the exporter posts logs to /v1/logs
Claude Cowork monitoringUse the exact logs endpoint /api/v1/otlp/v1/logs in the Claude admin monitoring UI
Activity evidence rowsRows show as Claude OTLP or Cowork OTLP
Detector materializationHigh-signal OTLP findings become normal detector vocabulary in Activity and Investigations
Investigation contextCase detail shows surrounding OTLP records from the same session, prompt, or host/time window

What AgentKeeper Ingests

AgentKeeper supports OTLP HTTP logs at:

https://www.agentkeeper.dev/api/v1/otlp/v1/logs

Use an AgentKeeper API key as a bearer token:

Authorization: Bearer ak_live_...

The logs pipeline accepts the Claude event names used by Claude Code, Claude Agent SDK, and Claude Cowork, including:

  • user_prompt
  • tool_result
  • tool_decision
  • api_request
  • api_error
  • api_request_body
  • api_response_body
  • api_retries_exhausted
  • permission_mode_changed
  • auth
  • mcp_server_connection
  • plugin_loaded
  • plugin_installed
  • skill_activated

AgentKeeper normalizes namespaced variants such as com.anthropic.claude_code.mcp_server_connection to the canonical event name while preserving the original name in raw attributes.

Where It Shows Up

OTLP records appear in Activity as Claude OTLP or Cowork OTLP evidence rows. Click a row to see the original event, source, workstation, user, session, prompt ID, tool, MCP server/tool, sealed prompt metadata, tool parameters, and raw OTLP attributes. When Prompt Vault is in Sealed Evidence or Promptless mode, prompt fields show hashes, lengths, evidence IDs, and placeholders instead of raw text.

AgentKeeper also materializes high-confidence OTLP findings into the normal detector vocabulary. For example:

  • Credential-like content becomes secret_leakage.
  • Sensitive local path reads become sensitive_file_read; sensitive path writes map into runtime integrity evidence for review.
  • Prompt override language becomes prompt_injection.
  • Network transfer combined with sensitive-data terms becomes data_exfiltration.
  • Risky permission mode changes become runtime integrity evidence, with permission_bypass preserved as the retained pattern name.

These are labeled as post-execution OTLP findings. They are audit evidence and investigation starting points; pre-tool block outcomes come from Runtime Shield hooks or MCP Gateway.

When an OTLP finding becomes an investigation, the case detail shows a Claude OTLP context panel and timeline records from the same session, prompt ID, or nearby host/time window. That lets an analyst see the detector decision next to the surrounding Claude-reported activity with the correct evidence source label.

How OTLP Becomes A Detection

OTLP ingestion writes the Claude-reported activity as retained evidence. AgentKeeper then evaluates a focused set of high-signal evidence patterns and promotes actionable matches into detector findings.

That gives analysts one detector vocabulary across hooks, MCP Gateway, and OTLP:

OTLP evidenceDetector familyExample result
Credential-like material in prompt, tool input, or response metadataSecret leakageWarning investigation with raw OTLP context attached
Sensitive local path readSensitive file readFinding with host, session, and tool evidence
Sensitive local path writeRuntime integrityFinding with host, session, and tool evidence
Prompt override or jailbreak languagePrompt injection or jailbreak attemptPost-execution evidence row plus investigation seed
Network transfer language combined with sensitive data termsData exfiltrationCorrelated evidence for review
Permission mode change into a risky stateRuntime integrityReviewable posture and workflow evidence

Analysts get a clear source label: OTLP findings show Claude-reported activity, while Runtime Shield hooks and MCP Gateway events show enforcement outcomes.

MCP Visibility

If Claude reports MCP activity through OTLP, AgentKeeper includes those server/tool calls in MCP Activity summaries. Agent Inventory remains workstation-configuration inventory; OTLP MCP rows are runtime evidence and may appear even when a workstation scan has not reported local MCP configuration.

Choose the source based on the control you need:

  • Runtime Shield hooks: workstation configuration evidence and pre-tool policy decisions.
  • OTLP telemetry: centralized Claude Code/Cowork evidence, usage context, and post-execution detector findings.
  • OpenAI Compliance API: ChatGPT Enterprise and Codex SaaS audit logs, source-labeled as audit-only provider evidence.
  • MCP Gateway: routed MCP enforcement and managed server/tool inventory.
  • Combined deployments: correlated evidence across host, session, user, and MCP server/tool names.

Claude Cowork Setup Pattern

For Claude Cowork, configure the Cowork monitoring settings to send OTLP HTTP logs to AgentKeeper.

Use the production logs endpoint:

https://www.agentkeeper.dev/api/v1/otlp/v1/logs

Set the authorization header:

Authorization=Bearer ak_live_...

Use resource attributes to make identity and environment clearer:

deployment.environment=prod,team=legal,managed_by=iru

After saving the Cowork monitoring settings, fully quit and relaunch Claude Desktop, generate one real Cowork action, and open Activity. You should see a Cowork OTLP event.

Analyst Workflow

  1. Open Activity and filter source to Claude/Cowork OTLP.
  2. Open the OTLP event drawer to inspect source, workstation, session, prompt ID, tool, MCP server/tool, and sealed payload context.
  3. If the event materialized into a detector finding, open the investigation.
  4. In the Session tab, read the Claude OTLP context panel first. It tells you how much surrounding telemetry was retained and how it was correlated.
  5. Use the timeline to compare the detector event with the surrounding prompt, tool, and MCP records.
  6. Use the Raw tab when a customer or auditor asks for the retained source payload. Raw panels still apply Prompt Vault sealing and do not display raw prompt fields by default.

Data Handling

AgentKeeper normalizes Claude OTLP logs into tenant-scoped evidence for Activity, Workstations, Usage & Costs, and Investigations. Cost and token summaries are aggregated for dashboard views, while raw evidence remains governed by the tenant's privacy and retention settings.

AgentKeeper applies the same data-handling controls across Claude Code and Cowork telemetry:

  • Prompt content retention follows the organization's Prompt Vault mode. Sealed Evidence returns prompt metadata by default and requires owner/admin unseal with a reason for retained prompt text.
  • Tool details can be limited by tenant privacy settings.
  • User email can be redacted when required.
  • Only security-relevant OTLP findings are promoted into Investigations.
  • Retention follows the customer's AgentKeeper plan and data policy.

Prompt unseal is not available to Developer or legacy Member roles. Exports remain sealed in this release.

Troubleshooting

If no events appear:

  1. Confirm the API key starts with ak_ and belongs to the same AgentKeeper organization.
  2. Confirm the OTLP endpoint is exactly /api/v1/otlp/v1/logs for Claude Cowork monitoring, or /api/v1/otlp for Claude Code environment variables.
  3. Send one real Claude Code or Cowork action that causes tool activity.
  4. Check Activity with source Claude OTLP.
  5. If Cowork events do not appear after a real action, verify the Claude org monitoring settings and org-level plugin enablement.