Debug a Kafka stream with the Kafka Console plugin
Drive the Kafka Console plugin's three commands across a lag incident: /topic-info for inventory, /lag-triage for per-partition lag and rebalance detection, and /sample-topic for a read-only message sample with a PII redaction pass. Permissions stay at kafka-sasl-read throughout.
At a glance
| When | A lag incident needs topic inventory, triage, and sampling from one place; Message samples must pass PII redaction before entering the agent context |
|---|---|
| Where | Kafka |
| Why | One plugin covers inventory, lag triage, and redacted sampling, so debugging does not sprawl across raw CLI tools and unredacted output. |
Learning objectives
- Inventory topics with /topic-info before touching lag
- Triage per-partition lag and rebalance detection with /lag-triage
- Sample messages through the PII redaction pass
What you need
- A consumer group showing lag
- Kafka SASL read credentials
- [object Object]
Steps
- Run /topic-info for topic inventory. (from plugin-kafka-console )
- Run /lag-triage for per-partition lag triage and rebalance detection. (from plugin-kafka-console )
- Run /sample-topic for the read-only message sampler. (from plugin-kafka-console )
- Know what the plugin covers — topic inventory, per-partition lag triage, rebalance detection, and a read-only message sampler with a PII redaction pass. (from plugin-kafka-console )
- Expect the PII redaction pass on every sample — the plugin ships with hook-pii-leak-guard wired in. (from plugin-kafka-console )
- Stay inside the permission model — filesystem none, network kafka, credentials kafka-sasl-read. (from plugin-kafka-console )
Check yourself
- /lag-triage output distinguishes a skewed partition from uniformly distributed lag before any scaling decision is made.
- /sample-topic output contains no unredacted personal data because the PII leak guard hook runs on the sampling path.
Worked example
Install the plugin — from plugin-kafka-console
amp plugin add de-agent/kafka-console
The three commands — from plugin-kafka-console
/lag-triage
/topic-info
/sample-topic
Permissions and the PII redaction hook — from plugin-kafka-console
permissions: { filesystem: none, network: kafka, credentials: kafka-sasl-read }
hooks: [hook-pii-leak-guard]
skills: [skill-kafka-lag-triage, skill-kafka-topic-design]
Sourced from
Security scan
Last sweep 2026-10-24: 0 finding(s), 0 marked as examples.
Common gotchas
- Credentials are kafka-sasl-read only — the plugin cannot and should not mutate the cluster.
- The PII redaction pass (hook-pii-leak-guard) exists because sampling is how personal data leaks into agent contexts.
- Lag triage builds on skill-kafka-lag-triage — the command is only as good as the signature model behind it.
Production considerations
- Keep the plugin on read-only SASL credentials even in debug clusters.
- Pin the plugin's hook-pii-leak-guard so sampling paths can never bypass redaction.
Diagram
kafka console plugin
|
|- /topic-info --> topic inventory
|
|- /lag-triage --> per-partition lag + rebalance detection
|
|- /sample-topic --> read-only sample --> PII redaction pass
|
--> permissions: network kafka, sasl read-only
Registry stats
| Verification | community · Oct 21, 2026 |
|---|---|
| Completeness | 81 |
| Trust multiplier | ×1.25 |
| Composite | 34.15 · adequate |
| Freshness | 3 days since last source check |
| Difficulty | intermediate |
| Version | 0.1.0 |
| License | CC-BY-4.0 |
| Security flags | none |
Did this solve your problem?
Debug a Kafka stream with the Kafka Console plugin