kagent: Instructions file for Codex

AGENTS.md

kagent AGENTS.md is an instructions file for Codex, OpenCode from kagent-dev/kagent. It costs 2,000 tokens per session, scanned A, a copy of skills AGENTS.md, Apache-2.0.

Project instructions for kagent-dev/kagent, a cloud-native agentic AI project. The excerpt does not describe any additional coding tasks supported by these instructions.

In plain words
What is it for?
Working on the kagent project when its repository instructions are present.
Why use it?
It gives a coding agent project-specific context, but the available description is too limited to identify a particular problem it solves.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions Claude Code; mentions AGENTS.md.

This is kagent-dev/kagent's own configuration. It tells Codex and OpenCode how to work on kagent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kagent configures →

About the project

kagent is a Kubernetes-native framework for building, deploying, and managing AI agents as Kubernetes resources. It is intended for teams operating agents and tools alongside Kubernetes workloads, with catalogue entries supporting its agent-management workflows.

kagent-dev/kagent · 4,165 stars · on GitHub · kagent.dev

Reuse

Borrowing it

Nothing to install: this file belongs to kagent-dev/kagent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/kagent-dev/kagent/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/kagent-dev/kagent

Made for: Codex, OpenCode.

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 kagent AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kagent-dev/kagent/agents-md/github.svg)](https://agentmods.dev/instructions/kagent-dev/kagent/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/kagent-dev/kagent/agents-md"><img src="https://agentmods.dev/badge/instructions/kagent-dev/kagent/agents-md/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 kagent AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/kagent-dev/kagent/agents-md"><img src="https://agentmods.dev/badge/instructions/kagent-dev/kagent/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,000 This file is loaded in full into every session.
When invoked 2,000 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.02000 $0.02000
Opus 5.5 $0.00800 $0.00800
Sonnet 5.5 $0.00400 $0.00400
Haiku 4.5 $0.00200 $0.00200

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

Security

Grade A, and why

kagent AGENTS.md 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 3d 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.

Origin

This is a copy

100% identical to skills AGENTS.md — 137 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

AGENTS.md · 136 lines

How it starts

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

Kagent Development Guide

This file defines the repository-wide rules for agents working on kagent. Read the code in scope before changing it. For detailed development and CI workflows, use the kagent-dev skill. See STYLE.md for language-specific conventions.

AGENTS.md is the canonical repository instruction filename. Before editing a file, read every applicable nested AGENTS.md along its directory path, even when starting from the repository root. Nested guidance adds directory-specific rules; the shared architecture and component boundaries below still apply.

1. Current Architecture

Kagent is a Kubernetes-native control plane for defining, running, and invoking AI agents.

  • Agent, Harness, and AgentTemplate are api.kagent.dev/v1alpha3 Kubernetes APIs. Agent composes inline or referenced behavior with a referenced Harness. AgentTemplate is reusable behavior; Harness is platform-managed runtime policy.
  • Session is PostgreSQL-backed control-plane state exposed through gRPC. It is not a Kubernetes resource.
  • Upstream A2A owns task, interaction, streaming, and history semantics. Do not create parallel session or task models.
  • Substrate Actors are the compute backend. Durable directories own private runtime state that must survive actor replacement.
  • Harness compilers translate resolved templates into backend inputs. Keep compilation separate from applying those inputs.
  • The public API describes agent behavior, not infrastructure mechanics. Do not expose Kubernetes scheduling, service accounts, arbitrary containers, channels, profiles, or generic extension maps.

The release-blocking harnesses are kagent, Codex, and Claude. Prefer clean-install behavior over compatibility with legacy session-backed agents unless compatibility is explicitly required.

2. Sources of Truth

  • Current architecture is documented in docs/architecture.
  • Development workflows and current architecture notes are in .agents/skills/kagent-dev/SKILL.md.
  • .agents/skills/ is the source of truth for repository skills. Keep one relative per-skill symlink under .claude/skills/ for Claude Code; do not symlink the whole directory.
  • General and language-specific conventions are in STYLE.md.
  • Generated code is never the source of truth. Change the API, protobuf, SQL, or schema source and regenerate its outputs.

Read the full file on GitHub · 136 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. 3d ago Changed · +3 lines · +60 tokens per session 11ede12b03df
  2. 22d ago Changed · +3 lines · +46 tokens per session e007aeb64a47
  3. 25d ago Changed · +2 tokens per session 32bb847db765
  4. 28d ago Changed · +1 tokens per session a78fcd36e679
  5. 1mo ago Changed · -1 lines · -57 tokens per session cbee0ef608db
  6. 1mo ago Changed · +130 lines · +1,944 tokens per session 2c2ad52b28ba
  7. 2mo ago First seen · 1 lines · 4 tokens per session scan A 6ebdb617a810

Subscribe to this mod's changes

kagent AGENTS.md is an instructions file published in the GitHub repository kagent-dev/kagent (4,165 stars, last pushed today), licensed Apache-2.0. It adds 2,000 tokens to every session, about $0.0080 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to skills AGENTS.md, differing in 137 lines, and is treated as a copy.

Related

kagent AGENTS.md compared with instructions from other repositories

kagent AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kagent AGENTS.mdkagent-dev/kagentInstructions file4.2ktodayApache-2.0A2,000Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode