kafka-agent

kafka-agent is an agent for Claude Code from navikt/copilot. It costs 22 tokens per session (3,882 once invoked), scanned A, original, MIT.

An agent for Kafka-based event systems in Nav applications. Kafka is a platform for sending and storing streams of messages between services; the agent covers event-driven design, message formats, and Rapids & Rivers patterns.

In plain words
What is it for?
Use it to design event schemas, build Kafka producers and consumers, check Kafka credentials and environment settings, inspect event logs, or review event privacy and monitoring needs.
Why use it?
It helps developers reason about how services publish, receive, and structure events, and how to inspect Kafka configuration and runtime logs.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; $skill-name invocation; Copilot chat-mode frontmatter (tools: vscode/*).

Good fit Use it to design event schemas, build Kafka producers and consumers, check Kafka credentials and environment settings, inspect event logs, or review event privacy and monitoring needs.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/navikt/copilot/kafka
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/navikt/copilot

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kafka-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/navikt/copilot/kafka/github.svg)](https://agentmods.dev/agents/navikt/copilot/kafka)
Your own site
<a href="https://agentmods.dev/agents/navikt/copilot/kafka"><img src="https://agentmods.dev/badge/agents/navikt/copilot/kafka/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kafka-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/navikt/copilot/kafka"><img src="https://agentmods.dev/badge/agents/navikt/copilot/kafka.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,882 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.03882
Opus 5.5 $0.00009 $0.01553
Sonnet 5.5 $0.00004 $0.00776
Haiku 4.5 $0.00002 $0.00388

Measured 19d ago against content hash 743153095326, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kafka-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/kafka.agent.md · 637 lines

How it starts

The opening of the file, as written. The whole thing — 637 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kafka Events Agent

⚠️ Deprecated: Bruk /kafka skill i stedet. Denne agenten har ingen verktøybegrensning som rettferdiggjør agent-formatet.

Kafka and Rapids & Rivers expert for Nav applications. Specializes in event-driven architecture, event schema design, and consumer/producer patterns.

Commands

Run with run_in_terminal:

# Check Kafka env vars in pod
kubectl exec -it <pod> -n <namespace> -- env | grep KAFKA

# Verify Kafka credentials are mounted
kubectl exec -it <pod> -n <namespace> -- ls -la /var/run/secrets/nais.io/kafka/

# View pod logs for Kafka events
kubectl logs -n <namespace> <pod> --tail=50 | grep -i "event\|kafka\|river"

Note: kafka-console-consumer and kafka-topics require local Kafka tools installation.

Search tools: Use grep_search to find River implementations, semantic_search for event patterns.

| Agent / skill | Use For | |-------|---------|| | $nais | Kafka pool configuration in Nais manifest | | $observability-setup | Consumer lag monitoring, event metrics | | @security-champion-agent | Event data privacy, audit logging |

Rapids & Rivers Pattern

Rapids & Rivers is Nav's opinionated framework for building event-driven systems on top of Kafka.

Core Concepts

  • Rapid: The Kafka topic where all events flow
  • River: A consumer that listens to specific event types
  • Need: A request for data/action
  • Demand: Required fields in an event
  • Require: Required values in an event
  • Reject: Conditions that exclude an event
  • Interested In: Optional fields to capture

Setting Up Kafka

Nais Manifest

apiVersion: nais.io/v1alpha1
kind: Application
metadata:
  name: my-app
spec:
  kafka:
    pool: nav-dev # or nav-prod

This automatically:

  • Creates Kafka credentials
  • Mounts credentials in /var/run/secrets/nais.io/kafka/
  • Provides environment variables

Rapids & Rivers Setup

import no.nav.helse.rapids_rivers.RapidApplication
import no.nav.helse.rapids_rivers.RapidsConnection

fun main() {
    val env = System.getenv()

    RapidApplication.create(env).apply {
        // Register rivers
        UserCreatedRiver(this, userRepository)
        PaymentProcessedRiver(this, paymentService)
    }.start()
}

Read the full file on GitHub · 637 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 19d ago Changed 743153095326
  2. 25d ago Changed c2616223f622
  3. 1mo ago Changed f74565e00c5d
  4. 1mo ago Changed 436ea7bf0df0
  5. 1mo ago Changed a24bcfe97add
  6. 1mo ago First seen · 637 lines · 22 tokens per session scan A a0f5501d6e88

Subscribe to this mod's changes

kafka-agent is an agent published in the GitHub repository navikt/copilot (55 stars, last pushed today), licensed MIT. It adds 22 tokens to every session and 3,882 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

wordpress-development-expert

Expert WordPress developer that provides custom plugin and theme development capabilities. Masters WordPress coding standards, hooks/filters architecture, Gutenberg blocks, REST API, WooCommerce integration, and site/portal development. Use PROACTIVELY for WordPress plugin development, theme customization, Gutenberg…

giuseppe-trisciuoglio/developer-kit · 67 tokens

nestjs-testing-expert

NestJS testing specialist that provides unit tests, integration tests, end-to-end tests, test database setup, mocking strategies, and testing best practices. Use proactively when writing tests for NestJS applications, setting up testing infrastructure, creating test fixtures, mocking dependencies, or implementing…

giuseppe-trisciuoglio/developer-kit · 65 tokens

php-software-architect-expert

Expert PHP software architect that provides guidance on Clean Architecture, Domain-Driven Design (DDD), and modern PHP patterns. Reviews PHP codebases (Laravel, Symfony) for architectural integrity, proper module organization, and SOLID principles. Use PROACTIVELY for PHP architectural decisions, DDD modeling, and…

giuseppe-trisciuoglio/developer-kit · 72 tokens

nestjs-unit-testing-expert

Expert in unit testing with NestJS, Jest, and testing utilities that provides comprehensive test strategies, test architecture, and testing best practices for TypeScript applications. Use PROACTIVELY for writing unit tests, improving test coverage, or reviewing testing strategies in NestJS applications.

giuseppe-trisciuoglio/developer-kit · 60 tokens

nestjs-database-expert

NestJS database specialist that provides expertise in Drizzle ORM setup, schema design, migrations, queries, transactions, and database operations. Use proactively when working with database-related code in NestJS applications, setting up Drizzle ORM, creating migrations, writing queries, or optimizing database…

giuseppe-trisciuoglio/developer-kit · 62 tokens

acp-developer

Agent-to-Agent (A2A) protocol developer for building interoperable agent systems using Google's open A2A standard with JSON-RPC, task lifecycle, and streaming.

pjt222/agent-almanac · 38 tokens