ak-dev-architecture

ak-dev-architecture is a skill for Claude Code, Codex from yaalalabs/agent-kernel. It costs 223 tokens per session (24,752 once invoked), scanned A, original, Apache-2.0.

Architecture guidance for Agent Kernel, a framework-independent system for building and running agents. It explains how sessions, agents, tools, runners, modules, runtimes, services, configuration, adapters, and storage fit together.

In plain words
What is it for?
Use it to navigate the codebase, design integrations with agent frameworks, configure sessions, and choose session storage.
Why use it?
It helps developers understand the system structure before changing core behavior or adding framework support.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/yaalalabs/agent-kernel/ak-dev-architecture
Any agent
npx skills add yaalalabs/agent-kernel --skill ak-dev-architecture
Clone the repo
git clone --depth 1 https://github.com/yaalalabs/agent-kernel

Made for: Claude Code, Codex.

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 ak-dev-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/yaalalabs/agent-kernel/ak-dev-architecture.svg)](https://agentmods.dev/skills/yaalalabs/agent-kernel/ak-dev-architecture)
Your own site
<a href="https://agentmods.dev/skills/yaalalabs/agent-kernel/ak-dev-architecture"><img src="https://agentmods.dev/badge/skills/yaalalabs/agent-kernel/ak-dev-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 223 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 24,752 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00223 $0.24752
Opus 5 $0.00112 $0.12376
Sonnet 5 $0.00045 $0.04950
Haiku 4.5 $0.00022 $0.02475

Measured today against content hash 6a8551296f0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ak-dev-architecture 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 today.

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/skills/ak-dev-architecture/SKILL.md · 1,047 lines

How it starts

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

Agent Kernel Architecture

Design Principles

  1. Framework-agnostic core: All core abstractions (Session, Agent, Tool, Runner, Module, Runtime) are framework-independent. Framework-specific logic lives exclusively in adapter modules under ak-py/src/agentkernel/framework/.
  2. Adapter pattern: Each supported agent framework (OpenAI Agents SDK, CrewAI, LangGraph, Google ADK, Smolagents, and Pydantic AI) implements Agent, Tool, Runner, and Module subclasses that wrap native framework objects.
  3. Config-driven behavior: All runtime behavior is governed by AKConfig (Pydantic-based), loaded from YAML/JSON files and environment variables (AK_ prefix, __ for nesting).
  4. Session lifecycle: Sessions are async context managers providing concurrency-safe state management. Session stores are pluggable (in-memory, Redis, Valkey, DynamoDB, Cosmos DB, Firestore). Session stores also provide the WebSocket gateway's WSConnectionStore on their backend via SessionStore.get_connection_store() (spec #495 §9): the ABC lives beside SessionStore in core/session/base.py, and each store file carries (or explicitly declines) its implementation, encapsulating its database operations over the shared drivers: InMemoryWSConnectionStore (in_memory.py, process-wide class-level state), RedisLikeWSConnectionStore (core/session/redis_like.py, client-library-agnostic; constructed by the redis/valkey stores with their own drivers), DynamoDBWSConnectionStore (dynamodb.py, over an existing table named by session.connection_store.table_name, same schema as the AWS adapters' connections table); cosmosdb/firestore raise actionably, as does the base default (so pre-method BYO stores keep working until a WS mode is enabled). Kafka's retry/dedup bookkeeping keeps its own session-type factory in pipeline/transport/bookkeeping.py (Q5).
  5. Plugin architecture: Tools, hooks, guardrails, tracing providers, session stores, knowledge base backends, sandbox providers, and messaging integrations are all pluggable via well-defined interfaces. Backend-selection factories (guardrail, trace, session/thread/multimodal stores, sandbox provider) share one shape via core/util/factory.py (resolve_dotted, require_extra, AKConfigError): built-ins resolved by if/elif + real imports, with a dotted-path "bring your own" branch on every surface.
  6. Minimal coupling: Integrations (Slack, WhatsApp, etc.), deployment adapters (AWS Lambda, Azure Functions, Google Cloud Run), and API layers (REST, MCP, A2A) depend on the core but the core never depends on them. The queue pipeline (pipeline/) imports only core and api; deployment/ imports pipeline; modules relocated into pipeline/ leave re-export shims at their old paths that must preserve existing patch targets (see the Queue Execution Pipeline section).
  7. Queue-pipeline execution (#495): chat execution on server surfaces runs through one five-component pipeline: Request Handler → Input Queue → Agent Runner → Output Queue → Response Handler: with the queue transport (execution.queues.type: in_memory default, sqs, kafka, nats) and process topology selected by configuration.

Read the full file on GitHub · 1,047 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. today Changed · +17 lines 6a8551296f0a
  2. 4d ago First seen · 1,030 lines · 223 tokens per session scan A 8c43eaa7c9b5

Subscribe to this mod's changes

ak-dev-architecture is a skill published in the GitHub repository yaalalabs/agent-kernel (166 stars, last pushed today), licensed Apache-2.0. It adds 223 tokens to every session and 24,752 once invoked, about $0.0011 per session on Opus 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.