{"slug": "show-hn-kern-agent-see-inside-your-agent-s-brain", "title": "Show HN: Kern Agent – See inside your agent's brain", "summary": "Developer Oguz Bilgic released Kern Agent, an open-source autonomous agent framework that runs on a user's own machine and pairs with the agent-kernel project to manage memory, tools, and multi-channel sessions. Kern Agent unifies terminal, browser, Telegram, Slack, Matrix, and Nostr into a single session, segments and summarizes conversations into an L0-to-L2 hierarchy for semantic recall, and lets agents generate their own HTML dashboards served from the agent. The software ships as a Docker image (ghcr.io/oguzbilgic/kern-ai) and an npm package (kern-ai), supports OpenRouter or fully local Ollama inference, and stores all data in a git-tracked agent folder so users pay only for API tokens.", "body_md": "Agents that do the work and show it.\n\nAgents that run on your machine, use real tools, remember everything, and publish their own dashboards. Not chatbots — autonomous workers with one brain across every channel.\n\n- **One brain, every channel** — terminal, browser, Telegram, Slack, Matrix, Nostr feed into one session. The agent knows who's talking, what channel it's in, and what happened 10,000 messages ago.\n- **Memory that compounds** — conversations segmented by topic, summarized into a hierarchy, compressed into context. Semantic recall over everything. The agent gets better the longer it runs.\n- **Agents build their own UI** — dashboards with live data, served from the agent, displayed in a side panel. Not chat — real interfaces that update themselves.\n- **Your infra, your data** — runs on your laptop, server, or homelab. The whole agent is a git-tracked folder. Pay only for API tokens — or use Ollama for fully local, zero-cost inference.\n\nkern pairs with [agent-kernel](https://github.com/oguzbilgic/agent-kernel) — the kernel defines how an agent remembers, kern runs it.\n\n```\n# Run an agent\ndocker run -d --restart=unless-stopped \\\n  -p 4100:4100 \\\n  -v my-agent:/home/kern/agent \\\n  -e OPENROUTER_API_KEY=sk-or-... \\\n  -e KERN_AUTH_TOKEN=my-secret-token \\\n  ghcr.io/oguzbilgic/kern-ai\n\n# Run the web UI\ndocker run -d -p 8080:8080 ghcr.io/oguzbilgic/kern-ai kern web run\n```\n\nOpen `http://localhost:8080`, click **Add agent**, enter `http://localhost:4100` and your token. That's it.\n\nOr skip the web UI and talk to your agent on Telegram:\n\n```\ndocker run -d --restart=unless-stopped \\\n  -v my-agent:/home/kern/agent \\\n  -e OPENROUTER_API_KEY=sk-or-... \\\n  -e TELEGRAM_BOT_TOKEN=123456:ABC-... \\\n  ghcr.io/oguzbilgic/kern-ai\n```\n\nNo ports, no web UI — just message your bot. First message auto-pairs you as operator.\n\nAgent data lives in the `my-agent` volume — sessions, memory, dashboards persist across restarts. Mount `-v my-agent:/home/kern` instead to persist the entire home directory (installed packages, SSH keys, etc). Configure with env vars: `KERN_NAME`, `KERN_MODEL`, `KERN_PORT`. See [configuration docs](/oguzbilgic/kern-ai/blob/master/docs/config.md) for other providers and options.\n\n```\nnpm install -g kern-ai\nkern init my-agent\nkern tui\n```\n\nThe init wizard scaffolds your agent, asks for a provider and API key, then starts it. `kern tui` opens an interactive chat. `kern web start` serves the web UI.\n\nFor automation: `kern init my-agent --api-key sk-or-...` (no prompts, defaults to openrouter + opus 4.6). For Ollama: `kern init my-agent --provider ollama --api-key http://localhost:11434 --model gemma4:31b`.\n\nAgents create and maintain their own dashboards — HTML pages with live data, served from the agent and displayed in the web UI side panel. Not chat transcripts. Real interfaces that update themselves.\n\n```\ndashboards/homelab/\n  index.html       # visualization\n  data.json        # structured data (injected as window.__KERN_DATA__)\n```\n\nThe agent writes `data.json`, creates the HTML, then calls `render({ dashboard: \"homelab\" })` to display it. Dashboards appear in the sidebar and can be switched from the panel header.\n\n[Dashboards docs](/oguzbilgic/kern-ai/blob/master/docs/dashboards.md) · [Blog: Why every agent needs a dashboard](https://kern-ai.com/blog/agent-dashboards)\n\nConversations are automatically segmented by topic, summarized, and rolled up into a hierarchy (L0 → L1 → L2). When old messages are trimmed from context, compressed summaries take their place — the agent sees its full history at decreasing resolution. Semantic recall searches everything.\n\nThe web UI includes a Memory overlay with five tabs for inspecting sessions, segments, notes, recall, and the full context pipeline with token breakdowns.\n\n[Memory docs](/oguzbilgic/kern-ai/blob/master/docs/memory.md) · [Blog: Lossless context management](https://kern-ai.com/blog/lossless-context-management) · [Blog: See inside your agent's brain](https://kern-ai.com/blog/memory-ui)\n\n```\nTerminal ─────┐\nWeb UI ───────┤\nTelegram ─────┤── one session\nSlack ────────┤\nMatrix ───────┤\nNostr ────────┘\n```\n\nEvery interface feeds into the same session. Message from Telegram, pick up in the terminal, continue in the browser. Each message carries metadata — who said it, which channel, when — so the agent connects context across all of them without losing track.\n\nThe agent reads and writes its own memory files through tools — takes notes, updates knowledge, commits to git. The next time you talk to it, from any interface, it picks up exactly where it left off.\n\n[Blog: Why your agent needs one session](https://kern-ai.com/blog/why-your-agent-needs-one-session)\n\n```\nkern init <name>          # create or configure an agent\nkern start [name|path]    # start agents in background\nkern stop [name]          # stop agents\nkern restart [name]       # restart agents\nkern install [name|--web|--proxy] # install systemd services\nkern tui [name]           # interactive chat\nkern web <run|start|stop> # static web UI server\nkern proxy <start|stop|token>  # authenticated reverse proxy\nkern logs [name]          # follow agent logs\nkern list                 # show all agents and services\nkern backup <name>        # backup agent to .tar.gz\n```\n\nAgents bind to `0.0.0.0` on sticky ports (4100-4999), accessible over Tailscale or LAN. The web UI connects directly — enter the agent's URL and `KERN_AUTH_TOKEN` in the sidebar.\n\nOptionally, `kern proxy start` launches an authenticated reverse proxy that discovers and forwards to local agents.\n\n```\n/status     # agent status, model, uptime, session size\n/restart    # restart the agent daemon\n/help       # list available commands\n```\n\n| Interface | Setup | \n|---|---|\n| **Terminal** | `kern tui` — interactive chat | \n| **Web UI** | `kern web start` — browser at port 8080 | \n| **Telegram** | Set `TELEGRAM_BOT_TOKEN` in`.kern/.env` | \n| **Slack** | Set `SLACK_BOT_TOKEN` and`SLACK_APP_TOKEN` in`.kern/.env` | \n| **Matrix** | Set `MATRIX_HOMESERVER` ,`MATRIX_USER_ID` ,`MATRIX_ACCESS_TOKEN` in`.kern/.env` | \n| **Nostr** | Set `NOSTR_NSEC` in`.kern/.env` — DM the agent's npub from any Nostr client | \n| **Desktop** | macOS app via Tauri ( [releases](https://github.com/oguzbilgic/kern-ai/releases) ) | \n\nFirst Telegram/Slack/Matrix/Nostr user is auto-paired as operator. Others pair with `KERN-XXXX` codes.\n\n```\n{\n  \"model\": \"anthropic/claude-opus-4.6\",\n  \"provider\": \"openrouter\",\n  \"toolScope\": \"full\",\n  \"maxContextTokens\": 100000,\n  \"summaryBudget\": 0.75\n}\n```\n\n- **full** — shell, read, write, edit, glob, grep, webfetch, websearch, kern, message, recall, pdf, image, render\n- **write** — everything except shell\n- **read** — read-only tools\n\n| Provider | Description | \n|---|---|\n| **openrouter** | Any model via OpenRouter (default) | \n| **anthropic** | Direct Anthropic API | \n| **openai** | OpenAI / Azure | \n| **ollama** | Local models via [Ollama](https://ollama.com) | \n\nSet `model` for chat and optionally `mediaModel` for image vision. Embedding and summary models are chosen automatically per provider — see [docs/config.md](/oguzbilgic/kern-ai/blob/master/docs/config.md#providers).\n\n- [Vercel AI SDK](https://sdk.vercel.ai) — model-agnostic AI layer\n- [grammY](https://grammy.dev) — Telegram bot framework\n- [@slack/bolt](https://slack.dev/bolt-js) — Slack bot framework\n- [agent-kernel](https://github.com/oguzbilgic/agent-kernel) — the memory pattern\n\nMIT", "url": "https://wpnews.pro/news/show-hn-kern-agent-see-inside-your-agent-s-brain", "canonical_source": "https://github.com/oguzbilgic/kern-ai", "published_at": "2026-09-11 01:57:14+00:00", "updated_at": "2026-09-11 02:22:42.491828+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-products", "developer-tools", "ai-infrastructure"], "entities": ["Kern Agent", "Oguz Bilgic", "agent-kernel", "OpenRouter", "Ollama", "Telegram", "Slack", "Docker"], "alternates": {"html": "https://wpnews.pro/news/show-hn-kern-agent-see-inside-your-agent-s-brain", "markdown": "https://wpnews.pro/news/show-hn-kern-agent-see-inside-your-agent-s-brain.md", "text": "https://wpnews.pro/news/show-hn-kern-agent-see-inside-your-agent-s-brain.txt", "jsonld": "https://wpnews.pro/news/show-hn-kern-agent-see-inside-your-agent-s-brain.jsonld"}}