Agent Kernel: Three Markdown Files for Stateful AI Agents

✍️ OpenClawRadar📅 Published: March 28, 2026🔗 Source
Agent Kernel: Three Markdown Files for Stateful AI Agents
Ad

What Agent Kernel Does

Agent Kernel is a minimal implementation that makes AI coding agents stateful using three markdown files and a git repository. Instead of requiring databases, vector stores, or custom frameworks, it leverages the existing mechanism where agents read project instructions from files like AGENTS.md, CLAUDE.md, or .cursorrules.

Core Components

The kernel consists of three markdown files:

  • AGENTS.md – The kernel itself (generic, don't edit)
  • IDENTITY.md – Defines who the agent is (maintained by the agent)
  • KNOWLEDGE.md – Index of knowledge files (maintained by the agent)

Two directory structures handle different types of memory:

  • knowledge/ – Contains state information: facts about how things are right now. The agent updates these when reality changes.
  • notes/ – Contains narrative information: daily session logs that record decisions, actions, and open items. These are append-only and never modified after the day ends.
Ad

Setup and Usage

Basic setup with any coding agent:

git clone https://github.com/oguzbilgic/agent-kernel.git my-agent
cd my-agent
opencode # or claude, codex, cursor, etc.

With kern-ai (a runtime built for agent-kernel that adds daemon mode, Telegram, and Slack integration):

npx kern-ai init my-agent
npx kern-ai tui

When an agent first reads the kernel, it recognizes it's new and asks who you want it to be. Once configured, it remembers across sessions.

Multiple Agents and Architecture

Each agent runs in its own repository. To create another agent:

git clone https://github.com/oguzbilgic/agent-kernel.git another-agent
cd another-agent
opencode # or claude, codex, etc.

This allows running multiple specialized agents (homelab, investing, health) with the same kernel but different identities and knowledge bases.

How It Works

The approach works because AI agents already read files like AGENTS.md as project instructions. The kernel teaches the agent how to remember by providing a file that says "you are stateful, here's how" and using the git repository to store memory in plain markdown files.

📖 Read the full source: HN AI Agents

Ad

👀 See Also

Savant Commander 48B: A Custom Qwen 3 Mixture-of-Experts Model with 12 Distilled Models
Tools

Savant Commander 48B: A Custom Qwen 3 Mixture-of-Experts Model with 12 Distilled Models

Savant Commander 48B is a custom Qwen 3 Mixture-of-Experts model with hand-coded routing that combines 12 distilled models from providers like Claude, Gemini, OpenAI, and Deepseek. It features 256K context length and allows prompt-controlled activation of specific distilled models.

OpenClawRadar
Open-source Gmail MCP server adds multi-account support and write access
Tools

Open-source Gmail MCP server adds multi-account support and write access

An open-source MCP server enables Claude AI to connect to multiple Gmail accounts with full read/write capabilities, including archiving, labeling, and auto-unsubscribe functionality. It supports Gmail search syntax and can be deployed to Railway in 5 minutes or self-hosted.

OpenClawRadar
KV Cache Reuse for Long Conversations on Apple Silicon Delivers 200x Speedup
Tools

KV Cache Reuse for Long Conversations on Apple Silicon Delivers 200x Speedup

A developer implemented session-based KV cache reuse for local LLM inference using Apple's MLX framework, achieving a 200x improvement in time-to-first-token at 100K context length. The approach keeps the KV cache in memory across conversation turns, processing only new tokens.

OpenClawRadar
Audacity MCP Server Gives Claude AI Full Audio Editing Control
Tools

Audacity MCP Server Gives Claude AI Full Audio Editing Control

A developer built an MCP server that connects Claude AI to Audacity via mod-script-pipe, providing 99 tools for natural language audio editing commands. The open-source tool works with Claude Desktop, Claude Code, or Cursor.

OpenClawRadar