Engineering

Kronos Agent OS: an operational layer for AI agents, open source

What is an Agent OS?

An Agent OS is an operational layer between the LLM and the user. Unlike agent frameworks that optimize a single conversation, an Agent OS manages the full agent lifecycle: persistent memory, skills, tool auditing, scheduled tasks, multi-agent coordination, and an operator dashboard.

TL;DR

  • -KAOS — a self-hosted Python runtime for AI agents with 5-layer memory (sessions, FTS5, vectors, knowledge graph, shared facts), progressive disclosure of skills, and 12+ scheduled automations
  • -Custom ReAct engine without LangGraph — 200 lines, full control over tool calling, timeouts, audit trail
  • -5-layer security: prompt injection shield (28 patterns), sanitizer, loop detector, output validator, cost guardian ($5/day)
  • -Swarm Mode: 6 independent agents coordinate via SQLite IMMEDIATE transactions — deterministic arbitration without pub/sub
  • -Comparison with Hermes Agent (100K+ stars, learning loop, but flat-file memory) and OpenClaw (347K stars, 50+ integrations, but 9 CVEs in 4 days)
  • -MIT license, pip install, offline demo without API keys

Kronos Agent OS: an operational layer for AI agents, open source

A self-hosted Python runtime for AI agents with memory, skills, automations, multi-agent coordination, and a dashboard. Compared against Hermes Agent and OpenClaw.


Why yet another agent framework

Agent frameworks are everywhere: OpenClaw (~347K stars), Hermes Agent (100K+), LangGraph, CrewAI, AutoGen. Most of them optimize the conversation — prompts, tool calling, retrieval. That matters, but it only covers part of the problem.

When an agent runs for weeks instead of minutes, the requirements change: inspectable state, tool call auditing, scheduled tasks, security controls, multi-agent coordination. Existing frameworks punt these problems to the developer.

KAOS (Kronos Agent OS) is an operational layer around the agent: memory, skills, tools with auditing, automations, multi-agent coordination, a dashboard, and capability gates — all included.


What KAOS is

KAOS is a self-hosted Python runtime for long-running AI agents. “Long-running” means the agent persists state across sessions, runs scheduled tasks, keeps inspectable memory, and is managed through a local dashboard — no cloud service needed.

pip install kronos-agent-os
kaos demo

The demo works offline. No API keys required.

Mental model:

Пользователь / Cron / Коннектор → KAOS Runtime
                                     ├── Память (сессии, FTS5, векторы, граф знаний)
                                     ├── Навыки (workspace-процедуры)
                                     ├── Tool Gateway (MCP, кастомные, браузер, динамические)
                                     ├── Автоматизации (12+ задач по расписанию)
                                     ├── Координация суб-агентов (опциональный swarm)
                                     └── Dashboard Control Room

KAOS is not a framework for building agents. It is an operating system for running them.


The field: Hermes, OpenClaw, and everyone else

Hermes Agent (Nous Research)

100,000+ GitHub stars, 140+ contributors. The standout feature: a learning loop where the agent creates skills from experience, refines them on use, and builds a user model across sessions. Self-assessment checkpoint fires every 15 tool invocations.

Strengths:

  • Self-improving skills with progressive disclosure — the library grows, token costs stay flat
  • Dialectical user modeling (Honcho)
  • 6 backends: local, Docker, SSH, Daytona, Singularity, Modal (serverless persistence)
  • Built-in migration from OpenClaw
  • Any LLM provider, no lock-in

Weaknesses:

  • Memory is flat Markdown files with a hard character limit. Exceed the limit — get an error, clean up by hand. No semantic search, no relationship graph, no auto-cleanup of stale facts. Structured memory with typed nodes and graph edges is only planned (GitHub Issue #346, March 2026)
  • One memory provider at a time. Cannot combine Qdrant + FTS5 + flat files
  • No multi-agent ledger. Sub-agents run in parallel but without coordination: no arbitration, no shared state, no anti-flood
  • No scheduled automations. Hermes waits for you to speak. No news digests, no overnight memory consolidation, no weekly analytics
  • No dashboard or audit trail. It learns — but what it did stays invisible
  • Security is implicit. No capability gates, no tool call editing, no cost guardian

OpenClaw

~347,000 stars — one of the fastest-growing open source projects in GitHub history. TypeScript/Node.js. Gateway-first architecture. 50+ messenger integrations.

Strengths:

  • Unmatched integration count: WhatsApp, Telegram, Discord, Slack, Signal, iMessage, Matrix, Teams, and 40+ more
  • Markdown-file workspace (SOUL.md, MEMORY.md, TOOLS.md) — human-readable and editable
  • Canvas — a live UI controlled by the agent
  • ClawHub — a skills marketplace
  • openclaw onboard — step-by-step onboarding from the terminal

Weaknesses:

  • 9 CVEs in 4 days in March 2026. Including CVE-2026-25253 (CVSS 8.8) — insecure WebSocket, auth token leaks
  • Supply chain attack on ClawHub: of 2,857 skills, 341 turned out to be malicious (Koi Security audit). The skills marketplace became an attack vector, not an advantage
  • Multi-agent is non-deterministic. The LLM decides when to launch a reviewer, when to retry. sessions_spawn creates child agents via LLM session — flow control is unpredictable
  • Memory is flat files. No FTS5, no semantic search, no graph. Works for simple cases; falls apart when an agent needs to remember thousands of facts over months
  • Skills are static. The agent does not learn — skills work the same on day 1 and day 100
  • Unstable updates. Reddit threads regularly mention breaking changes between versions

KAOS architecture: technical breakdown

1. Custom ReAct engine (no LangGraph)

KAOS runs a custom ReAct loop (engine.py) built directly on langchain_core messages and tools. No LangGraph. No framework dependency beyond the message protocol.

result = await react_loop(
    model=model,
    messages=history,
    tools=tools,
    system_prompt=system_prompt,
    max_turns=25,
)

LangGraph works well for prototyping. But when you need control over tool call execution, error propagation, and loop termination — you want a loop you can read in 200 lines, not a graph abstraction.

The engine gives you:

  • Async tool execution with timeouts (120 seconds by default)
  • Error classification and recovery
  • Callbacks for audit trail on every tool call
  • Graceful termination on iteration exhaustion

2. Five-layer memory

This is where KAOS breaks from the competition.

LayerStoragePurposeSearch
SessionsSQLite per threadRecent conversation historySequential
Extracted factsFTS5 (SQLite)Exact recall — names, IDs, dates, URLs, decisionsFull-text
Vector memoryMem0 + Qdrant (local)Semantic recall — concepts, topics, similar contextVector similarity
Knowledge graphSQLiteEntities and relationships — people, companies, projectsGraph traversal
Shared factsSwarm SQLite (FTS5)Cross-agent user profileFull-text

Hermes has 4 layers (session, persistent, skill, user model), but all backed by flat files with a character limit. No semantic search, no graph. OpenClaw has Markdown files without structured search.

KAOS memory lifecycle:

  1. Retrieve — before each LLM call, FTS5 + Mem0 + knowledge graph results inject as transient context
  2. Store — after the response, facts extract in the background (DeepSeek lite, ~$0.001/turn)
  3. Consolidate — nightly sleep-compute deduplicates facts, extracts entities into the knowledge graph, generates actionable insights, cleans up stale data
  4. Share — facts from user messages mirror into shared_user_facts so all agents in the swarm see the same profile

Sleep-compute draws from biological memory: short-term memories (sessions) consolidate into long-term structures (knowledge graph) during “sleep” (nightly cron).

3. Skills: Progressive Disclosure

Both Hermes and KAOS support skills, but the philosophy differs.

Hermes creates skills automatically from successful executions. The learning loop improves them. A strong approach for repetitive personal workflows.

KAOS uses workspace-local procedures with progressive disclosure:

LevelContentToken cost
L1 CatalogName + one-line descriptionAlways in the prompt (~50 tokens/skill)
L2 ProtocolFull SKILL.md with steps and rulesLoaded via load_skill() on demand
L3 ReferencesSupporting files, examples, fixturesLoaded via load_skill_reference() on request

An agent with 20 skills pays ~1,000 tokens in the base prompt (catalog), not 20,000. The full protocol loads only when the agent decides it matters.

KAOS ships with 5 skill packs (research, productivity, ops, content, finance-lite) and 5 agent templates (Personal Operator, Research Agent, Ops Assistant, Founder Strategy, Analyst Reporter).

kaos templates list
kaos templates install personal-operator my-agent --force
kaos skills packs
kaos skills install-pack productivity --agent my-agent --force

4. Tool Gateway: MCP with auditing

All three frameworks support tools. KAOS adds an auditing and security layer on top.

Every tool call generates two events in tool_calls.jsonl:

  • tool_call — tool name, redacted arguments, session context
  • tool_result — success/error, redacted result, latency

Secret values (token, secret, password, api_key, bearer tokens, sk-* keys) are redacted automatically before writing.

Capability gates control what the agent can do:

ENABLE_DYNAMIC_TOOLS=false          # Может ли агент создавать Python-инструменты?
REQUIRE_DYNAMIC_TOOL_SANDBOX=true   # Обязателен ли Docker для динамических инструментов?
ENABLE_MCP_GATEWAY_MANAGEMENT=false # Может ли агент добавлять/удалять MCP-серверы?
ENABLE_DYNAMIC_MCP_SERVERS=false    # Загружать ли сохранённые динамические MCP-серверы?
ENABLE_SERVER_OPS=false             # Может ли агент подключаться к серверам по SSH?

A fresh install ships locked down by default. That’s intentional. An agent that can create arbitrary Python tools and SSH into production servers should require explicit opt-in, not implicit trust.

Context: OpenClaw racked up 9 CVEs in 4 days and 341 malicious skills landed on ClawHub. When the community grows faster than security — users pay the price.

5. Five-layer security

LayerWhat it doesHow
L1: Input ShieldBlocks prompt injection before the LLM28 regex patterns (EN + RU), rate limiter (10 requests/min)
L2: SanitizerNeutralizes injections in external contentUnicode homoglyph folding, hidden HTML elements, boundary markers
L3: Loop DetectorPrevents infinite tool loops3 detectors (repeat, ping-pong, poll), 3-step escalation (WARNING → CRITICAL → CIRCUIT_BREAKER at 30 calls)
L4: Output ValidatorRedacts secrets from responsesAPI key patterns, connection strings, system paths, prompt leaks
L5: Cost GuardianPrevents runaway spending$5/day, $1/session, warning at 80%

Neither Hermes nor OpenClaw ship with this depth of protection. KAOS was built to run 24/7 on a VPS without babysitting.

6. Automations: the agent works while you sleep

This is what makes KAOS an “Agent OS” rather than a chat wrapper.

TaskScheduleWhat it does
heartbeatEvery 30 minChecks tasks in workspace and Notion, notifies only if actionable
news-monitorDaily 08:30Scans watchlist via Brave Search, sends HTML digest
group-digestDaily 09:00Collects messages from Telegram groups, ranks by engagement, digest
sleep-computeDaily 11:00Overnight memory consolidation: deduplication, entity extraction, insights
self-improveDaily 22:00Analyzes the last 24h of interactions, proposes ONE specific improvement
expense-digestWeeklySummarizes expenses from Notion: categories, trends, recommendations
skill-improveWeeklyAuto-improves skills based on usage patterns
user-modelWeeklyDialectical user modeling: hypothesis validation and updates
market-reviewWeeklyAggregates news by tickers, sentiment analysis
people-scoutWeeklyLinkedIn discovery: rotating focus (US founders → EU → AI engineers → Indie)
email-expensesDaily 08:00Auto-extracts expenses from Gmail receipts via MCP
swarm-retentionWeeklyCleans up stale messages in the swarm ledger (90 days)

The scheduler is pure asyncio — no external dependencies. Tasks run in the main event loop alongside the Telegram bridge and dashboard. State survives restarts.

Hermes has no scheduler. OpenClaw offers basic cron support via HEARTBEAT.md, but nothing close to this set of pre-built pipelines.

7. Swarm Mode: multi-agent coordination without pub/sub

KAOS runs 6 independent agent processes, each with its own Telegram account, persona, workspace, and memory — coordinated through a single shared SQLite file.

All agents see every message in the group. Each decides independently whether to respond using a 3-tier routing system:

TierTriggerDelayBypasses arbitration?
Tier 1Explicit @mention or reply to my message1-5 secYes — always responds
Tier 2Topic relevance >= 7/10 (LLM check)5-20 secNo — subject to cap
Tier 3Peer reaction (meaningful disagreement)15-45 secNo — cap + cooldown

Anti-flood:

  • Hard cap: at most 2 implicit replies per user message across all agents
  • Tier 3: 5-minute cooldown per agent, “PASS” protocol for silent decline
  • Re-check after delay (another agent may have responded while we waited)

Arbitration via SQLite IMMEDIATE transactions:

# Агент вставляет claim перед ответом
swarm.claim_reply(agent_name="kronos", tier=2, eta_ts=time.time() + 12)

# Перед отправкой — атомарная проверка:
outcome = swarm.can_send_claim(agent_name="kronos", tier=2)
# Правило победителя: tier ASC, eta_ts ASC, agent_name ASC

Simpler and more debuggable than pub/sub or consensus protocols. One SQLite file, six concurrent writers, WAL mode, IMMEDIATE transactions. All coordination state is inspectable via sqlite3 data/swarm.db.

OpenClaw multi-agent is LLM-orchestrated: the model decides when to launch a reviewer, when to retry. Flow control is non-deterministic. Hermes sub-agents run in isolation — parallel, but without a shared ledger.

Peer reactions in KAOS are ephemeral by design:

  • Peer text passes via transient extra_system_context (not persisted to history)
  • No writes to Mem0 — peer reactions do not pollute long-term memory
  • If the agent has nothing substantive to add — “PASS” — the claim gets cancelled silently

This kills the “parrot bug” where agents echo each other’s text because it leaked into the session history.

8. Dashboard Control Room

The dashboard is the operator surface of KAOS. Not a chat UI — a control room.

ViewWhat it shows
OverviewHealth, uptime, agent activity, anomalies
Memory ExplorerFacts with search, shared facts, knowledge graph entities, sessions — with deletion and reset
Audit TrailEvery tool call: arguments, results, latency, status
JobsCron schedule, recent runs, errors
SwarmArbitration history, claim outcomes, per-agent metrics
SkillsWorkspace skills with toggles
MCP ServersStatic and managed servers
SettingsCapability gates, provider status, configuration

When a capability is blocked by policy, the dashboard shows the gate name and the environment variable to enable it — instead of hiding the feature silently.

9. LLM routing: cost savings by default

KAOS uses a two-tier strategy:

TierUsed forDefault provider
LiteRelevance checks, parsing, bulk operations, fact extractionDeepSeek V3
StandardOrchestration, analysis, complex reasoning, tool callingKimi K2.5

KAOS is not locked to any models. Configure OpenAI, OpenRouter, Groq, Together, LiteLLM, Ollama, or any OpenAI-compatible endpoint in .env. No code changes.


Comparison matrix

FeatureKAOSHermes AgentOpenClaw
GitHub starsNew (v0.1.0)~100,000~347,000
LanguagePythonPython + TS (TUI)TypeScript/Node.js
LicenseMITMITMIT
Self-hostedYes (core design)YesYes
Memory layers5 (sessions, FTS5, vectors, graph, shared)4 (flat files with char limit)Markdown files
Knowledge graphYes (SQLite, entities + relationships)No (planned)No
Sleep-time consolidationYes (nightly pipeline)NoNo
SkillsProgressive disclosure (L1/L2/L3)Auto-created learning loopSOUL.md + static skills
Skill auto-improvementYes (weekly cron)Yes (built-in loop)No
User modelingYes (dialectical, weekly)Yes (Honcho)Basic preferences
Tool audit trailYes (redacted, persistent)NoNo
Capability gates5 env-based gatesNoNo
Security layers5 (shield, sanitize, loop, output, cost)Basic9 CVEs in 4 days (March 2026)
Cost guardianYes ($5/day, $1/session)NoNo
Automations12 base + 6 agent-specificNoBasic HEARTBEAT.md
DashboardControl Room (8 views)NoBasic web UI
Multi-agent6-agent swarm, SQLite arbitrationIsolated sub-agentsLLM-orchestrated (non-deterministic)
MessengersTelegram, Discord, CLI, webhook6+ channels50+ channels
Offline demoYes (kaos demo)NoNo

Who KAOS is for

Good fit if you:

  • Want to own the agent runtime, not rent it from a cloud service
  • Need inspectable state — memory, tool calls, decisions — not a black box
  • Need scheduled automations — digests, monitoring, analytics, self-improvement — running without human input
  • Need multi-agent coordination for tasks that benefit from multiple perspectives
  • Care about secure defaults — capability gates, tool auditing, cost controls
  • Prefer Python and the LangChain/Mem0/Qdrant stack

Not a good fit if you:

  • Need 50+ messenger integrations out of the box (use OpenClaw)
  • Want a learning loop that creates skills from scratch (use Hermes)
  • Need the largest community (OpenClaw by stars, Hermes by quality contributors)
  • Want a hosted solution with zero ops (KAOS is self-hosted by design)

Quick start

30-second demo

pip install kronos-agent-os
kaos demo

No API keys. No Docker. No configuration.

Full installation

git clone https://github.com/spyrae/kronos-agent-os.git
cd kronos-agent-os
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

kaos doctor                    # валидация setup
kaos init personal-operator    # создать первого агента
# отредактируй .env: добавь FIREWORKS_API_KEY или DEEPSEEK_API_KEY
kaos chat                      # начать диалог

Dashboard

kaos demo-seed --reset
kaos dashboard
# Открой http://127.0.0.1:8789

Templates and skills

kaos templates list            # 5 шаблонов агентов
kaos skills packs              # 5 паков навыков
kaos skills install-pack productivity --agent my-agent --force

Building AI agents and want to keep control of the runtime? I help startups and engineering teams design agent systems — belov.works

pip install kronos-agent-os
kaos demo

GitHub: github.com/spyrae/kronos-agent-os License: MIT Python: 3.11+

Frequently Asked Questions

How is KAOS different from LangGraph?

LangGraph is a library for building graph-based agents. KAOS is a runtime for running and operating them. LangGraph handles orchestration within a single invocation; KAOS adds memory, skills, auditing, automations, a dashboard, and multi-agent coordination around it. They work together — the ASO module in KAOS uses LangGraph for its pipeline.

Can KAOS run with a local model (Ollama, llama.cpp)?

Yes. KAOS supports any OpenAI-compatible endpoint. Set the URL and model in .env — then use Ollama, LM Studio, vLLM, or any other local provider. No code changes.

Is Swarm Mode required?

No. Swarm Mode is optional. By default, KAOS runs as a single-agent runtime with the full feature set: memory, skills, tools, automations, dashboard. Multi-agent coordination kicks in only when the task benefits from multiple independent perspectives.

How safe is KAOS for running on a VPS 24/7?

KAOS was designed for exactly this. 5 layers of protection (input shield, sanitizer, loop detector, output validator, cost guardian), 5 capability gates disabled by default, tool calls logged with secret redaction. Default budget: $5/day, $1/session.

Which LLM providers are supported?

Out of the box: Fireworks (Kimi K2.5), DeepSeek, OpenAI, OpenRouter, Groq, Together, LiteLLM, Ollama. Any OpenAI-compatible API connects via environment variables. No code changes.