TL;DR: Kafka is being positioned as the durable commit log for agentic AI because replay, auditability, ordering, and schema governance matter more than transient event streams, according to Kong. The governance lesson is that agent memory is now an identity and control-plane problem, not just a data plumbing choice.
At a glance
What this is: Kong argues that Apache Kafka is the right durable commit log for agentic AI because it preserves ordered, replayable, governed agent history.
Why it matters: That matters because IAM, NHI, and agentic AI teams now need one evidence layer that can support audit, replay, access control, and lifecycle governance across autonomous and non-human actors.
By the numbers:
- 17 minutes.
- 27 days
- Only 44% of developers are reported to follow security best practices for secrets management, exposing a significant developer behaviour gap.
👉 Read Kong's analysis of Kafka as the agent memory layer
Context
Agentic AI changes the identity problem because the system now produces a durable trail of decisions, tool calls, and context shifts that must be governed, not just processed. In that model, Kafka is being evaluated less as a data pipeline and more as the memory layer that preserves evidence, replayability, and accountability across AI agent activity.
The governance gap is straightforward: most observability stacks are not designed to function as an immutable, long-horizon record for agent behaviour. If the log cannot preserve order, enforce schemas, and support replay months later, it cannot serve as the basis for agent governance, audit, or incident reconstruction.
Key questions
Q: How should security teams govern agent memory logs in production?
A: Security teams should treat agent memory logs as governed evidence, not disposable telemetry. That means defining retention, access control, schema versioning, and replay rules before the log becomes a core operational dependency. The key test is whether the log can support audit, incident reconstruction, and model validation without manual reconstruction from scattered traces.
Q: Why do agentic systems need a durable event log rather than standard observability?
A: Agentic systems need a durable event log because observability tools are built to monitor systems, not to preserve authoritative state across time. A memory log must support exact ordering, replay, and long-term retention so that decisions can be reconstructed months later for audit, debugging, or governance decisions.
Q: What breaks when schema governance is weak in agent memory pipelines?
A: Weak schema governance turns replay into a reliability problem. If event shapes drift without compatibility controls, compliance consumers, analytics jobs, and downstream training pipelines can no longer interpret the log consistently. The result is not just technical friction, but loss of trust in the evidence trail itself.
Q: Who should control access to Kafka-backed agent memory layers?
A: Access should be controlled by the identity and policy layer in front of the broker, not by loose broker permissions alone. The right model is identity-aware enforcement for publishing, reading, masking, and retention so that agent memory remains usable without becoming a broad write surface.
Technical breakdown
Why a durable commit log matters for agent memory
An agent memory layer has to behave like evidence, not telemetry. That means long retention, exact event ordering, and the ability to replay a session without ambiguity. Kafka fits this model because offset-based ordering gives each event a stable position in the chain, while retention and tiered storage make long-horizon history economically practical. In practice, that turns every agent action into a reconstructable record that can support compliance review, model debugging, and operational replay.
Practical implication: Treat the agent log as governed evidence and define retention, replay, and access controls before agent scale creates an unmanaged archive.
How schema governance protects long-lived agent logs
A memory log only remains useful if downstream consumers can still read it after the schema changes. Kafka’s ecosystem is built around versioned schemas, compatibility rules, and registry-backed governance, which matters because agent event data will evolve as tool sets, prompts, and orchestration patterns change. Without that discipline, a year-old event stream becomes unreadable to compliance, analytics, or training systems. In other words, schema governance is what keeps replay from collapsing into brittle data archaeology.
Practical implication: Require schema compatibility checks at write time so agent event streams remain readable by audit, SIEM, and analytics consumers over time.
Why the gateway, not the broker, must enforce governance
A Kafka cluster is only a storage substrate. The real control plane sits in front of it, where topic access, masking, retention, dead-letter handling, and lineage can be enforced consistently across agents and services. That separation matters because an enterprise memory layer must apply identity-aware policy before data reaches the broker. Kong’s argument is that governance belongs at the gateway layer so the log stays usable without becoming an uncontrolled write surface.
Practical implication: Place access control, redaction, and lineage enforcement in front of the broker instead of relying on broker-level permissions alone.
Threat narrative
Attacker objective: The objective is to corrupt the agent memory substrate so replay, audit, and downstream governance all inherit bad state.
- Entry occurs when an attacker or malicious workflow gains write access to the agent event stream or adjacent tool path that feeds memory and audit data.
- Escalation follows when unchecked event ingestion, weak schema discipline, or uncontrolled topic access lets the actor poison replayable agent history or inject misleading context.
- Impact lands when the corrupted log drives bad replay, unreliable audit evidence, or unsafe downstream model and compliance workflows.
Breaches seen in the wild
- Moltbook AI agent keys breach — Moltbook breach exposed 1.5M AI agent keys.
- Reviewdog GitHub Action supply chain attack — reviewdog/action-setup GitHub Action supply chain attack exposed secrets.
Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Kafka is becoming the governance layer for agent memory, not just the transport layer. The article is right to treat the log as evidence because agent activity now has compliance value, not just operational value. Once replay, audit, and lineage become requirements, the storage substrate becomes part of identity governance architecture. Practitioners should stop treating agent logs as disposable telemetry and start treating them as governed records.
Durable agent memory exposes a control-plane gap that most observability stacks never had to solve. Traditional logging can tell you what happened, but it rarely preserves the exact sequence in a form that supports authoritative replay. That gap matters when agent decisions are chained and stateful, because governance depends on reconstructing the original context. The implication is that identity teams must evaluate whether their current log architecture can actually support accountable AI operations.
Schema drift is the hidden failure mode in long-lived agent governance. A replayable memory layer loses value quickly if event shapes change faster than consumers can adapt. This is not just a data engineering issue, it is a lifecycle issue for machine identity evidence. The practical conclusion is that teams need a governed event contract if they expect logs to survive model iteration, audit scrutiny, and control testing.
Access control for agent memory must be identity-aware at the gateway, not merely permissive at the broker. Kafka’s value depends on who can publish, what gets masked, and which topics remain auditable. That makes the gateway the real policy enforcement point for NHI and agentic workloads. Practitioners should align broker access with identity context, retention rules, and lineage requirements before memory growth turns into governance debt.
Identity blast radius now includes the log itself. Once agent decisions are replayed into downstream analytics, compliance, or model-training systems, a compromised event stream can propagate bad state far beyond the original session. That broadens the scope of identity governance from credential control to evidence integrity. Teams should assess memory pipelines as part of their identity attack surface, not as a separate data layer.
From our research:
- When AWS credentials are exposed publicly, attackers attempt access within an average of 17 minutes, according to LLMjacking: How Attackers Hijack AI Using Compromised NHIs.
- Our research also found that the average estimated time to remediate a leaked secret is 27 days, even though 75% of organisations express strong confidence in their secrets management capabilities.
- That gap between exposure and remediation is why the NHI Lifecycle Management Guide matters when agent memory, secrets, and identity evidence start to converge.
What this signals
Agent memory is now part of the identity attack surface. If a log can drive replay, audit, and downstream model behaviour, then integrity controls around the event stream matter as much as access controls around the agent itself. Teams should be planning for evidence integrity, not just log retention, and that shifts the conversation toward gateway-enforced policy and lifecycle discipline.
With 43% of security professionals already concerned that AI systems could learn and reproduce sensitive information patterns from codebases, the memory layer cannot be treated as a neutral store. The governance question is whether the data path preserves identity context without amplifying sensitive state into future model behaviour.
Identity blast radius becomes broader when logs are replayable. The same agent event stream that helps an auditor understand a decision can also spread bad state into analytics, compliance, and training systems if access and masking are weak. Practitioners should evaluate the entire event lifecycle, not just the broker, and align it with the NHI Lifecycle Management Guide and the NIST AI Risk Management Framework.
For practitioners
- Define the agent log as governed evidence Classify agent event streams as compliance-relevant records and assign ownership for retention, access, and replay. Do not leave memory data under generic observability rules if it can influence audit or downstream model behaviour.
- Enforce schema compatibility at write time Require versioned schemas and compatibility checks before agent events land in the log so replay and consumer reads do not break when prompts, tools, or orchestration patterns change.
- Move policy enforcement to the gateway layer Apply topic access control, masking, retention policy, and lineage controls before data reaches Kafka so identity context is enforced consistently across agents and services.
- Test replay as a governance control Run controlled replay exercises against historical agent sessions to verify that the log can support audit, debugging, and state reconstruction without manual reconstruction from traces.
Key takeaways
- Agent memory is no longer a plumbing problem. It is a governance and identity evidence problem.
- Kafka matters here because replay, ordering, and retention turn transient agent activity into durable, auditable state.
- The control point that matters most is the gateway layer, where identity-aware policy can protect the log before it becomes a liability.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 address the attack and risk surface, while NIST AI RMF and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | A2 | Agent memory and tool-call logs affect agent identity and replay integrity. |
| NIST AI RMF | GOVERN | Governance of agent memory logs maps to accountability and oversight for AI behaviour. |
| NIST Zero Trust (SP 800-207) | PR.AC-4 | Identity-aware access to the memory layer is a zero-trust access problem. |
Treat agent event streams as governed identity evidence and restrict tool-call persistence by policy.
Key terms
- Agent Memory Layer: The agent memory layer is the durable record that stores an AI agent’s decisions, tool calls, and context shifts over time. It is not a simple log buffer. In governed environments it must preserve ordering, support replay, and remain trustworthy enough for audit, incident review, and model validation.
- Durable Commit Log: A durable commit log is an append-only record that preserves the sequence of actions in a form that can be replayed later. For agentic systems, it becomes the evidence layer for behaviour, not just a transport mechanism for events. Its value depends on retention, ordering, and schema stability.
- Schema Governance: Schema governance is the discipline of controlling how event formats change over time so old and new consumers can still read the data. In agentic systems this prevents logs from becoming unreadable as prompts, tools, and orchestration patterns evolve. It is essential for replay, auditability, and downstream trust.
- Identity-Aware Policy Enforcement: Identity-aware policy enforcement applies access, masking, and lineage rules based on who or what is sending data, reading data, or replaying it. For machine and agent identities, it is the control that keeps the memory layer from becoming an uncontrolled write surface or a hidden path to sensitive state.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity security are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are responsible for identity strategy, lifecycle governance, or secrets management, it is worth exploring.
This post draws on content published by Kong: Kafka Was Built for This: The Case for Kafka as the Agent's Memory Layer. Read the original.
Published by the NHIMG editorial team on 2026-06-17.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org