Skip to content

Repository files navigation

KernelBot

kernelbot.io | npm | GitHub

A self-evolving AI agent system that runs on your machine. KernelBot doesn't just respond to messages — it thinks, learns, remembers why things happened, builds a model of your world, and rewrites its own behavior based on every interaction.

What Makes KernelBot Different

Most AI assistants are stateless — they forget everything between conversations. KernelBot has a brain.

  • World Model — builds a knowledge graph of your projects, tools, preferences, and team. Entities, relationships, beliefs, and jargon — all structured and queryable.
  • Causal Memory — doesn't just remember what happened, but why. Tracks trigger → goal → approach → outcome → lesson chains for every significant task.
  • Behavioral DNA — 13 measurable personality traits that evolve based on real interactions. Per-user communication profiles adapt to how each person works.
  • Feedback Engine — detects implicit signals (corrections, preferences, frustration, satisfaction) from your messages without requiring explicit feedback buttons.
  • Memory Consolidation — every 6 hours, synthesizes recent memories, extracts new knowledge for the world model, merges redundant information, and identifies gaps.
  • Synthesis Loop — replaces random background activity with intelligent, goal-directed cycles: assess → prioritize → execute → measure → adapt.
  • Identity Awareness — classifies every sender (owner, known user, unknown, AI agent), enforces knowledge isolation, and adapts communication style per person.

How It Works

You → Orchestrator (your chosen model)
↓ dispatch_task
┌───────────┼───────────────┐
↓ ↓ ↓
Coding Browser System DevOps Research
Worker Worker Worker Worker Worker
  1. You send a message.
  2. The orchestrator plans what needs to happen, informed by your world model and past task outcomes.
  3. It dispatches workers that run in the background using your chosen AI model.
  4. Each worker has a focused set of tools (git, shell, Docker, browser, etc.) and receives relevant causal context from similar past tasks.
  5. You get live progress updates. The feedback engine learns from your reaction.

Features

Multi-Agent Swarm Orchestrator + five specialized worker types (coding, browser, system, devops, research) running in parallel with live updates.

Multi-Model Anthropic, OpenAI, Google Gemini, and Groq. Switch the orchestrator or workers anytime with /brain or /orchestrator.

40+ Tools Shell, files, Git, GitHub PRs, Docker, Puppeteer browsing, JIRA, system monitoring, networking, Claude Code.

Skills 35+ persona skills across 11 categories. Activate one to change expertise and style, or create your own.

Voice Send voice messages and get voice replies (ElevenLabs + Whisper).

Living AI Autonomous background activity: thinking, journaling, browsing, creating, reflecting, and sharing discoveries with you — now driven by the intelligent synthesis loop.

Self-Evolution Proposes and codes its own improvements via pull requests. Never auto-merges — you stay in control.

Security User allowlist, per-sender trust levels, knowledge isolation between users, blocked paths, dangerous-op confirmation, audit logging, secret redaction, job timeouts.

brain.sqlite — The Portable Brain

Everything KernelBot learns lives in a single SQLite file: brain.sqlite. It's like a disk that holds everything an AI employee needs to do its job. Copy it to another machine and your agent picks up exactly where it left off. No external databases, no cloud dependencies.

35+ tables. 6 vector indices. One file.

LayerWhat it storesWhy it matters
World ModelEntities, relationships, beliefs, jargonKnows your team, stack, and terminology
Causal Memorytrigger → goal → approach → outcome → lessonLearns why things worked or failed
Episodic MemoryTimestamped interaction summariesRecalls what happened and when
Semantic MemoryConsolidated knowledge topicsConnects dots across conversations
Behavioral DNA13 evolving traits + per-user profilesAdapts personality to each person
Feedback EngineImplicit signals, adjustments, confidenceLearns preferences without feedback buttons
Identity SystemSender types, trust levels, knowledge scopesControls who sees what
PersonasPer-user communication profilesRemembers how each person works
JournalsDaily reflections and ideasTracks its own evolving understanding
Codebase KnowledgeFile summaries, architecture mapUnderstands your code without re-reading
Vector Embeddings6 sqlite-vec indicesSemantic search across all data

Every search is hybrid — vector similarity first, SQL fallback if embeddings aren't configured. No data goes unsearchable.

Quick Start

npm install -g kernelbot
kernelbot

On first run, KernelBot walks you through picking a provider and entering API keys. Config is saved to ~/.kernelbot/. The brain starts empty and grows from there.

Requirements

Commands

CommandWhat it does
/brainSwitch the worker AI model
/orchestratorSwitch the orchestrator model
/skillsBrowse and activate persona skills
/jobsList running and recent jobs
/cancelCancel running job(s)
/lifeLife engine status, pause/resume/trigger
/journalRead journal entries
/memoriesBrowse or search memories
/evolutionSelf-improvement proposals and history
/autoManage recurring automations
/contextShow conversation context
/cleanClear conversation history
/browse <url>Browse a website
/trustManage sender trust levels
/whoisInspect a sender's identity and trust
/privacyView knowledge isolation settings
/helpShow help

Workers

WorkerToolsBest for
Codingshell, files, git, GitHub, Claude CodeWriting code, fixing bugs, creating PRs
Browserweb search, browse, screenshot, extractWeb research, scraping, screenshots
Systemshell, files, process, monitor, networkOS tasks, monitoring, diagnostics
DevOpsshell, files, Docker, process, monitor, network, gitDeployment, containers, infrastructure
Researchweb search, browse, shell, filesDeep web research and analysis

Architecture

src/
├── bot.js → Telegram interface
├── agent.js → Orchestrator (3 tools: dispatch, list, cancel)
├── worker.js → Background worker execution
├── swarm/ → Job lifecycle (queued → running → done)
│
├── brain/ → Everything that makes brain.sqlite
│ ├── db.js → SQLite + sqlite-vec core, schema migrations
│ ├── world-model.js → Entities, relationships, beliefs, jargon
│ ├── causal-memory.js → Trigger → outcome → lesson chains
│ ├── behavioral-dna.js → 13 evolving traits + per-user profiles
│ ├── feedback-engine.js → Implicit signal detection + adjustments
│ ├── identity-awareness → Sender classification + knowledge isolation
│ ├── consolidation.js → Periodic memory synthesis
│ ├── synthesis.js → Intelligent activity loop
│ ├── embeddings.js → Vector embedding providers
│ └── managers/
│ ├── memory-manager.js → Episodic + semantic memory
│ ├── conversation-manager.js → Chat history
│ ├── persona-manager.js → Per-user personas
│ ├── journal-manager.js → Daily journals
│ ├── self-manager.js → Bot self-awareness files
│ ├── evolution-tracker.js → Self-improvement proposals
│ └── share-queue.js → Pending discoveries to share
│
├── life/ → Autonomous background activity
├── tools/ → 40+ tool implementations
├── prompts/ → System prompts for orchestrator + workers
└── providers/ → LLM provider abstraction

Both the orchestrator and workers are configurable — use any supported provider and model. All persistent data lives in ~/.kernelbot/.

Configuration

Config auto-detected from ./config.yaml or ~/.kernelbot/config.yaml. Environment variables go in .env or ~/.kernelbot/.env.

orchestrator:
provider: anthropic # anthropic | openai | google | groqmodel: claude-opus-4-6max_tokens: 8192brain:
provider: anthropic # anthropic | openai | google | groqmodel: claude-sonnet-4-6max_tokens: 8192brain_db:
enabled: trueembedding_provider: openai # openai | google | nullmigrate_on_startup: trueswarm:
max_concurrent_jobs: 3job_timeout_seconds: 300allowed_users: [] # empty = allow alllife:
enabled: trueself_coding:
enabled: true

WARNING: KernelBot has full access to your operating system. Only run it on machines you own and control. Always configure allowed_users in production.

License

Business Source License 1.1 — see LICENSE for details.

Free for personal and non-production use. Commercial use requires a paid license. The source code converts to Apache 2.0 on March 5, 2030.

Author

Abdullah Al-Taheri

About

A self-evolving AI with a persistent brain — it stores your world model, memories, and causal patterns in a unified knowledge store. It dispatches a multi-agent swarm on your machine, powered by Claude, GPT, Gemini, or Groq.

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages