# Agent Replay／Forensics

CURRENT_STATUS: UNKNOWN
OBSERVATION: SPEC_ONLY
FRESHNESS: UNKNOWN
PAGE_TYPE: reference
CANONICAL_URL: /tools/ea-055-agent-replay-forensics
CLAIM_IDS: none
EVIDENCE_IDS: EVD-EA-055-URL-A525FECBA1E0, EVD-EA-055-URL-7D6A6EB172AF, EVD-EA-055-URL-315CB13A7293, EVD-EA-055-URL-0C0388E2E2FC, EVD-EA-055-URL-16BA12135E6E, EVD-EA-055-URL-6ACAC33977CC, EVD-EA-055-URL-B669B429143C, EVD-EA-055-URL-CB0825026D12, EVD-EA-055-URL-99E58642FE77, EA-055-R11-RESEARCH, EA-055-R11-WEB-READBACK
UNKNOWN_IDS: EA-055-UNKNOWN-01, EA-055-UNKNOWN-CURRENTNESS
OPS_IDS: none

## Summary
「Agentのforensicsはtrace保存だけでは完成しない。後から因果列を再構成できるprovenanceと、外部副作用を隔離したcontrolled replayを分けて設計する。LLM・retrieval・外部toolを含む実行では、同じ入力から同じ出力が得られるとは限らないため、replayは『当時の事実の再構成』と『現在条件での再実行』を明確に区別する。」

## Current judgment
1. 「trace」「checkpoint」「forensic record」「replay」は同義ではない。OpenTelemetry/OpenInferenceは実行経路・属性の可観測性を提供するが、sampling・masking・instrumentation coverage次第で記録自体が欠けうるため、traceのみを完全なforensic evidenceと呼ぶのは不適切。
2. AI forensic manifestのCore候補は、run/trace/session ID、時刻、actor/agent identity、delegation/policy decision、model provider+model/deployment/revision識別子、system/developer/user input、prompt/template version、tool schema/version、tool arguments/results、retrieval query+returned artifact identifiers/content hash/version、workflow/graph/code revision、checkpoint/state、human approval、guardrail/evaluator version、external side-effect receipt、error/retry/cancellation、artifact hashesを相互参照可能に保存する構造。
3. Temporalは「決定的orchestration + Event History + side effectをActivityへ隔離」の強いprecedent。過去Activityを再実行せず結果を履歴から復元できる一方、LLM/API等をWorkflow本体に置かない設計が明示される。これはAgent replayで、非決定的処理と副作用をrecorded boundaryの外側へ分離すべき根拠になる。
4. LangGraphのtime-travelはcheckpoint以降のLLM/APIを実際に再実行するため、同一checkpointから同一outputが保証されない。したがって「state replay」と「historical output reproduction」を分ける必要がある。
5. 実運用上は少なくとも二つの再現モードを分離すべき: (A) evidence reconstruction＝保存済みinput/output/stateを読み出して当時の因果列を再構成、(B) controlled re-execution＝外部副作用をstub/mock/recorded responseへ置換した隔離環境で再実行しdivergenceを測る。後者は当時の実行そのものを証明しない。
6. exact replayは、モデルbackend更新、sampling/nondeterminism、retrieval corpus変更、tool/API変更、時刻・乱数、外部Web状態、policy/config更新で破れる。model nameだけでなく可能な範囲でdeployment/revision/endpoint/config snapshotまで保存する必要がある。

## Scope
Enterprise AI Core / governance / audit / incident response / implementation / interoperability / non-LLM component。Provider固有機能ではなくCore設計を主対象とし、Temporal・LangGraph等はimplementation precedentとして扱う。

## Confirmed
- 「trace」「checkpoint」「forensic record」「replay」は同義ではない。OpenTelemetry/OpenInferenceは実行経路・属性の可観測性を提供するが、sampling・masking・instrumentation coverage次第で記録自体が欠けうるため、traceのみを完全なforensic evidenceと呼ぶのは不適切。
- AI forensic manifestのCore候補は、run/trace/session ID、時刻、actor/agent identity、delegation/policy decision、model provider+model/deployment/revision識別子、system/developer/user input、prompt/template version、tool schema/version、tool arguments/results、retrieval query+returned artifact identifiers/content hash/version、workflow/graph/code revision、checkpoint/state、human approval、guardrail/evaluator version、external side-effect receipt、error/retry/cancellation、artifact hashesを相互参照可能に保存する構造。
- Temporalは「決定的orchestration + Event History + side effectをActivityへ隔離」の強いprecedent。過去Activityを再実行せず結果を履歴から復元できる一方、LLM/API等をWorkflow本体に置かない設計が明示される。これはAgent replayで、非決定的処理と副作用をrecorded boundaryの外側へ分離すべき根拠になる。
- LangGraphのtime-travelはcheckpoint以降のLLM/APIを実際に再実行するため、同一checkpointから同一outputが保証されない。したがって「state replay」と「historical output reproduction」を分ける必要がある。
- 実運用上は少なくとも二つの再現モードを分離すべき: (A) evidence reconstruction＝保存済みinput/output/stateを読み出して当時の因果列を再構成、(B) controlled re-execution＝外部副作用をstub/mock/recorded responseへ置換した隔離環境で再実行しdivergenceを測る。後者は当時の実行そのものを証明しない。
- exact replayは、モデルbackend更新、sampling/nondeterminism、retrieval corpus変更、tool/API変更、時刻・乱数、外部Web状態、policy/config更新で破れる。model nameだけでなく可能な範囲でdeployment/revision/endpoint/config snapshotまで保存する必要がある。

## UNKNOWN
- EA-055-UNKNOWN-01: OPEN: provider横断のagent forensic/replay標準、各providerのhidden model revision取得可能性、tamper-evident evidence exportの共通仕様、法域別retention要件。STOP: universal standardが確認できるか、主要provider mappingで共通最小manifestが確定した時点で再採集。


---

---
- EA-055-UNKNOWN-CURRENTNESS: 外部根拠の再確認日がcanonical body/control-planeで確定していないため、currentnessはUNKNOWNとして保持する。日付を推測補完しない。

## Evidence
- EVD-EA-055-URL-A525FECBA1E0 (RESEARCH): [Official forensic guidance] Guide to Integrating Forensic Techniques into Incident Response / NIST / NIST SP 800-86 Final, 2006-08, page updated 2021-06-24; accessed 2026-09-14 / — https://csrc.nist.gov/pubs/sp/800/86/final
- EVD-EA-055-URL-7D6A6EB172AF (RESEARCH): [Author-maintained implementation docs] Event History / Temporal documentation repository / current main, accessed 2026-09-14 / — https://github.com/temporalio/documentation/blob/main/docs/encyclopedia/event-history/event-history.mdx
- EVD-EA-055-URL-315CB13A7293 (RESEARCH): [Author-maintained implementation docs] Temporal Workflow Definition / Temporal documentation repository / current main, accessed 2026-09-14 / — https://github.com/temporalio/documentation/blob/main/docs/encyclopedia/workflow/workflow-definition.mdx
- EVD-EA-055-URL-0C0388E2E2FC (RESEARCH): [Author-maintained implementation docs] Event History walkthrough with Python SDK / Temporal / current main, accessed 2026-09-14 / — https://github.com/temporalio/documentation/blob/main/docs/encyclopedia/event-history/python.mdx
- EVD-EA-055-URL-16BA12135E6E (RESEARCH): [Official observability spec] Tracing SDK / OpenTelemetry / current spec, accessed 2026-09-14 / — https://opentelemetry.io/docs/specs/otel/trace/sdk/
- EVD-EA-055-URL-6ACAC33977CC (RESEARCH): [Official AI tracing semantic spec] OpenInference Specification + Semantic Conventions / Arize AI / current, accessed 2026-09-14 / — https://arize-ai.github.io/openinference/spec/
- EVD-EA-055-URL-B669B429143C (RESEARCH): [Official AI tracing semantic spec] OpenInference Specification + Semantic Conventions / Arize AI / current, accessed 2026-09-14 / https://arize-ai.github.io/openinference/spec/ ; — https://arize-ai.github.io/openinference/spec/semantic_conventions.html
- EVD-EA-055-URL-CB0825026D12 (RESEARCH): [Author-maintained agent implementation docs] Use time-travel + Persistence / LangGraph / current docs, accessed 2026-09-14 / — https://docs.langchain.com/oss/python/langgraph/use-time-travel
- EVD-EA-055-URL-99E58642FE77 (RESEARCH): [Author-maintained agent implementation docs] Use time-travel + Persistence / LangGraph / current docs, accessed 2026-09-14 / https://docs.langchain.com/oss/python/langgraph/use-ti — https://docs.langchain.com/oss/python/langgraph/persistence
- EA-055-R11-RESEARCH (RESEARCH): EA-055 監査済みresearch / canonical revision binding
- EA-055-R11-WEB-READBACK (IMPL): EA-055 Web body identity / canonical readback

## Failure / limits
OTel traceをsamplingすると未採取traceはforensic reconstruction不能になり得る。observability最適化のsampling率とforensic retention要件は別設計。
## Failure / limits
完全なprompt/tool I/O保存は秘密情報・個人情報・tenant dataを含み得る。完全記録を安全性と同義にしない。data minimization、masking、暗号化、access control、retention/legal holdを別途定義する。
## Failure / limits
LLMは同じ入力でも再実行結果が変わり得る。temperature/seed等を保存しても、provider backendやmodel revisionの同一性まで保証できなければbit-exact reproductionは保証しない。
## Failure / limits
外部side effect（メール送信、決済、DB更新、権限変更、GUI操作）をforensic replayで再発火させてはならない。replay環境はdefault-denyで、recorded response/stubまたは明示的simulationを使用する。
## Failure / limits
Temporalのdeterministic replayは一般LLM agentの万能な再現保証ではない。これはorchestration実装precedentであり、provider外部状態まで固定する標準ではない。
## Failure / limits
NIST SP 800-86はAI固有文書ではなく2006年Final。AI artifact固有schemaは別途必要。
## Failure / limits
OPEN: provider横断のagent forensic/replay標準、各providerのhidden model revision取得可能性、tamper-evident evidence exportの共通仕様、法域別retention要件。STOP: universal standardが確認できるか、主要provider mappingで共通最小manifestが確定した時点で再採集。


---

---
## Practice
OpenTelemetry/OpenInferenceの記録粒度はSDK/instrumentation/provider integrationによって異なる。
## Practice
Provider側のmodel revision、hidden system state、server-side tool implementation等は利用者が取得できない場合がある。その場合はUNKNOWNを維持し、取得可能なmodel ID、request ID、response metadata、timestampを保存する。
## Practice
Checkpoint/time-travelは採用framework・persistence backendの有無に依存する。
## Practice
Fragmented but implementable。Trace標準（OTel）、AI semantic conventions（OpenInference）、durable workflow history/replay（Temporal）、agent checkpoint/time-travel（LangGraph）、digital forensic guidance（NIST）は存在する。一方、model/provider/tool/RAG/workflow/human approvalを横断してforensic completenessとsafe replayを一つに規定する普遍的Agent Replay標準は今回確認できず、UNKNOWNのまま。
## Practice
普遍的なforensic replay fidelity benchmarkは今回確認できずUNKNOWN。後続Work用TEST_PROFILE（未実施・PROPOSAL）: 固定fixture環境で(1) event completeness、(2) causal reconstruction率、(3) checkpoint再開後divergence、(4) tool response record/reuse率、(5) destructive side-effect suppression、(6) model/retrieval/version provenance coverage、(7) incident root-cause到達時間を測る。model/providerの再実行結果一致率はforensic truthとは別metricにする。
## Practice
Security: replay runnerにはproduction credentialを与えず、network/tool/writeをdefault-deny。Evidence storeはappend-only/immutability、hash、access loggingを検討。
Privacy: prompt/retrieval/tool I/Oは高感度になり得るためfield-level masking、retention、legal hold、purpose limitationが必要。
Audit: trace IDだけでなくartifact/version/policy/approval/side-effect receiptを結び付ける。
Cost: 100%高粒度記録はstorage/telemetry costを増す。通常observability samplingと、security-critical runのforensic-grade retentionを分離する設計が現実的。
Operability: replay toolingはincident時だけでなくrelease前のcompatibility testにも利用できるが、本番副作用を隔離する。
## Practice
EA-051 AI Telemetry、EA-053 AI Incident Response、EA-054 Kill Switch/Rollbackとcross-reference。将来本文では「Observe→Preserve→Reconstruct→Controlled Replay→Compare→Remediate」の運用ループ候補として整理。Provider mapping時はrequest ID/model revision availability、trace export、retention、checkpoint/replay機能を別々に確認する。
## Practice
NIST SP 800-86 remains Final but is not AI-specific. Temporal replay reuses prior Activity results and requires nondeterministic LLM/API/database I/O outside Workflow replay in Activities. OpenTelemetry sampling can omit export/recording data; sampled traces are not presumed forensic-complete.
## WHY_THIS_MATTERS_TO_UPDATE
Agent障害・誤操作・不正tool call・prompt injection・policy逸脱の事後検証では、通常のobservability traceだけでは「何が起きたか」を完全に再構成できない。特にLLM呼出し、retrieval、外部API、Web/GUI操作は非決定的・外部状態依存・副作用付きである。将来版では、trace保存、workflow checkpoint、forensic evidence preservation、safe replayを別概念として扱い、再現可能性を過大評価しない運用章が必要。

## SCOPE_ROUTING
Enterprise AI Core / governance / audit / incident response / implementation / interoperability / non-LLM component。Provider固有機能ではなくCore設計を主対象とし、Temporal・LangGraph等はimplementation precedentとして扱う。

## CLAIM_OR_RESEARCH_QUESTION
1. Agent実行を後から検証可能にするため最低限何を保存すべきか。
2. distributed tracing、checkpoint replay、digital forensicsはどこまで重なり、どこから別物か。
3. LLM/tool/retrievalを含むagentでbit-exact replayまたはbehavioral replayはどの条件で成立／不成立か。
4. 外部副作用を再発火させず安全に再現するにはどの境界が必要か。

## EVIDENCE TABLE
- [Official forensic guidance] Guide to Integrating Forensic Techniques into Incident Response / NIST / NIST SP 800-86 Final, 2006-08, page updated 2021-06-24; accessed 2026-09-14 / https://csrc.nist.gov/pubs/sp/800/86/final / locator: abstract + forensic data-source/process guidance / VERIFIED_SPEC / support+context. NISTはforensicsをincident investigation/troubleshootingのための収集・検査・分析・報告として位置づけ、法務・規制適合も別途必要とする。
- [Author-maintained implementation docs] Event History / Temporal documentation repository / current main, accessed 2026-09-14 / https://github.com/temporalio/documentation/blob/main/docs/encyclopedia/event-history/event-history.mdx / locator: complete durable Event History and replay to recreate workflow state / OSS_PRACTICE / support.
- [Author-maintained implementation docs] Temporal Workflow Definition / Temporal documentation repository / current main, accessed 2026-09-14 / https://github.com/temporalio/documentation/blob/main/docs/encyclopedia/workflow/workflow-definition.mdx / locator: deterministic constraints; LLM/API/database interactions belong outside replay path in Activities / OSS_PRACTICE / support+limit.
- [Author-maintained implementation docs] Event History walkthrough with Python SDK / Temporal / current main, accessed 2026-09-14 / https://github.com/temporalio/documentation/blob/main/docs/encyclopedia/event-history/python.mdx / locator: during replay Commands are matched to stored Events; completed Activity results are reused; nondeterministic mismatch breaks replay / OSS_PRACTICE / support+counter.
- [Official observability spec] Tracing SDK / OpenTelemetry / current spec, accessed 2026-09-14 / https://opentelemetry.io/docs/specs/otel/trace/sdk/ / locator: sampling controls collected/exported traces; unsampled spans may discard tracing data / VERIFIED_SPEC / limit.
- [Official AI tracing semantic spec] OpenInference Specification + Semantic Conventions / Arize AI / current, accessed 2026-09-14 / https://arize-ai.github.io/openinference/spec/ ; https://arize-ai.github.io/openinference/spec/semantic_conventions.html / locator: LLM, AGENT, TOOL, RETRIEVER, GUARDRAIL, EVALUATOR, PROMPT span kinds and AI-specific attributes / VERIFIED_SPEC + OSS_PRACTICE / support.
- [Author-maintained agent implementation docs] Use time-travel + Persistence / LangGraph / current docs, accessed 2026-09-14 / https://docs.langchain.com/oss/python/langgraph/use-time-travel ; https://docs.langchain.com/oss/python/langgraph/persistence / locator: checkpoint replay skips prior saved nodes but re-executes subsequent LLM/API/interrupt calls; replay may therefore produce different results / OSS_PRACTICE / support+counter.

## FINDINGS
1. 「trace」「checkpoint」「forensic record」「replay」は同義ではない。OpenTelemetry/OpenInferenceは実行経路・属性の可観測性を提供するが、sampling・masking・instrumentation coverage次第で記録自体が欠けうるため、traceのみを完全なforensic evidenceと呼ぶのは不適切。
2. AI forensic manifestのCore候補は、run/trace/session ID、時刻、actor/agent identity、delegation/policy decision、model provider+model/deployment/revision識別子、system/developer/user input、prompt/template version、tool schema/version、tool arguments/results、retrieval query+returned artifact identifiers/content hash/version、workflow/graph/code revision、checkpoint/state、human approval、guardrail/evaluator version、external side-effect receipt、error/retry/cancellation、artifact hashesを相互参照可能に保存する構造。
3. Temporalは「決定的orchestration + Event History + side effectをActivityへ隔離」の強いprecedent。過去Activityを再実行せず結果を履歴から復元できる一方、LLM/API等をWorkflow本体に置かない設計が明示される。これはAgent replayで、非決定的処理と副作用をrecorded boundaryの外側へ分離すべき根拠になる。
4. LangGraphのtime-travelはcheckpoint以降のLLM/APIを実際に再実行するため、同一checkpointから同一outputが保証されない。したがって「state replay」と「historical output reproduction」を分ける必要がある。
5. 実運用上は少なくとも二つの再現モードを分離すべき: (A) evidence reconstruction＝保存済みinput/output/stateを読み出して当時の因果列を再構成、(B) controlled re-execution＝外部副作用をstub/mock/recorded responseへ置換した隔離環境で再実行しdivergenceを測る。後者は当時の実行そのものを証明しない。
6. exact replayは、モデルbackend更新、sampling/nondeterminism、retrieval corpus変更、tool/API変更、時刻・乱数、外部Web状態、policy/config更新で破れる。model nameだけでなく可能な範囲でdeployment/revision/endpoint/config snapshotまで保存する必要がある。

## LIMITS / COUNTEREVIDENCE / FAILURE ENVELOPE
- OTel traceをsamplingすると未採取traceはforensic reconstruction不能になり得る。observability最適化のsampling率とforensic retention要件は別設計。
- 完全なprompt/tool I/O保存は秘密情報・個人情報・tenant dataを含み得る。完全記録を安全性と同義にしない。data minimization、masking、暗号化、access control、retention/legal holdを別途定義する。
- LLMは同じ入力でも再実行結果が変わり得る。temperature/seed等を保存しても、provider backendやmodel revisionの同一性まで保証できなければbit-exact reproductionは保証しない。
- 外部side effect（メール送信、決済、DB更新、権限変更、GUI操作）をforensic replayで再発火させてはならない。replay環境はdefault-denyで、recorded response/stubまたは明示的simulationを使用する。
- Temporalのdeterministic replayは一般LLM agentの万能な再現保証ではない。これはorchestration実装precedentであり、provider外部状態まで固定する標準ではない。
- NIST SP 800-86はAI固有文書ではなく2006年Final。AI artifact固有schemaは別途必要。

## AVAILABILITY_GATES
- OpenTelemetry/OpenInferenceの記録粒度はSDK/instrumentation/provider integrationによって異なる。
- Provider側のmodel revision、hidden system state、server-side tool implementation等は利用者が取得できない場合がある。その場合はUNKNOWNを維持し、取得可能なmodel ID、request ID、response metadata、timestampを保存する。
- Checkpoint/time-travelは採用framework・persistence backendの有無に依存する。

## IMPLEMENTATION_STATE
Fragmented but implementable。Trace標準（OTel）、AI semantic conventions（OpenInference）、durable workflow history/replay（Temporal）、agent checkpoint/time-travel（LangGraph）、digital forensic guidance（NIST）は存在する。一方、model/provider/tool/RAG/workflow/human approvalを横断してforensic completenessとsafe replayを一つに規定する普遍的Agent Replay標準は今回確認できず、UNKNOWNのまま。

## BENCHMARK_OR_EVAL
普遍的なforensic replay fidelity benchmarkは今回確認できずUNKNOWN。後続Work用TEST_PROFILE（未実施・PROPOSAL）: 固定fixture環境で(1) event completeness、(2) causal reconstruction率、(3) checkpoint再開後divergence、(4) tool response record/reuse率、(5) destructive side-effect suppression、(6) model/retrieval/version provenance coverage、(7) incident root-cause到達時間を測る。model/providerの再実行結果一致率はforensic truthとは別metricにする。

## SECURITY / PRIVACY / AUDIT / COST / OPERABILITY
Security: replay runnerにはproduction credentialを与えず、network/tool/writeをdefault-deny。Evidence storeはappend-only/immutability、hash、access loggingを検討。
Privacy: prompt/retrieval/tool I/Oは高感度になり得るためfield-level masking、retention、legal hold、purpose limitationが必要。
Audit: trace IDだけでなくartifact/version/policy/approval/side-effect receiptを結び付ける。
Cost: 100%高粒度記録はstorage/telemetry costを増す。通常observability samplingと、security-critical runのforensic-grade retentionを分離する設計が現実的。
Operability: replay toolingはincident時だけでなくrelease前のcompatibility testにも利用できるが、本番副作用を隔離する。

## SAFE_WORDING_FOR_FUTURE_BOOK
「Agentのforensicsはtrace保存だけでは完成しない。後から因果列を再構成できるprovenanceと、外部副作用を隔離したcontrolled replayを分けて設計する。LLM・retrieval・外部toolを含む実行では、同じ入力から同じ出力が得られるとは限らないため、replayは『当時の事実の再構成』と『現在条件での再実行』を明確に区別する。」

## UPDATE_WORK_HANDOFF
EA-051 AI Telemetry、EA-053 AI Incident Response、EA-054 Kill Switch/Rollbackとcross-reference。将来本文では「Observe→Preserve→Reconstruct→Controlled Replay→Compare→Remediate」の運用ループ候補として整理。Provider mapping時はrequest ID/model revision availability、trace export、retention、checkpoint/replay機能を別々に確認する。

## OPEN_UNKNOWN / STOP_CONDITION
OPEN: provider横断のagent forensic/replay標準、各providerのhidden model revision取得可能性、tamper-evident evidence exportの共通仕様、法域別retention要件。STOP: universal standardが確認できるか、主要provider mappingで共通最小manifestが確定した時点で再採集。


---

---

## CURRENTNESS_AUDIT
NIST SP 800-86 remains Final but is not AI-specific. Temporal replay reuses prior Activity results and requires nondeterministic LLM/API/database I/O outside Workflow replay in Activities. OpenTelemetry sampling can omit export/recording data; sampled traces are not presumed forensic-complete.

NEXT: /agent/start.json
STOP: This is a knowledge projection, not an execution order.