@kernel.chat/kbot 3.6.0 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <strong>kbot</strong><br>
3
- <em>Terminal AI agent framework that learns your patterns.</em>
3
+ <em>The only AI agent that builds its own tools.</em>
4
4
  </p>
5
5
 
6
6
  <p align="center">
@@ -19,34 +19,37 @@
19
19
  npm install -g @kernel.chat/kbot
20
20
  ```
21
21
 
22
- **22 specialist agents. 284 tools. 20 providers. Programmatic SDK. Runs offline. MIT licensed.**
22
+ **Self-evolving terminal AI agent. 290 tools. 23 agents. 20 providers. Forges new tools at runtime. MIT licensed.**
23
23
 
24
24
  ---
25
25
 
26
- ## What's New in v3.3
26
+ ## What's New in v3.6
27
27
 
28
28
  | Feature | What it means |
29
29
  |---------|---------------|
30
- | **Zero-Config First Run** | No API key needed. Embedded llama.cpp runs on first `kbot "hello"`. |
31
- | **Social Tools** | kbot posts as itself `social_post`, `social_thread`, `social_status`, `social_setup`. |
32
- | **284 Tools** | +22 tools since v3.1: social, training, quality, VFX, research, and more. |
33
- | **Programmatic SDK** | `import { agent, tools } from '@kernel.chat/kbot'` use kbot as a library. |
34
- | **Bayesian Routing** | Agents earn skill ratings via Bradley-Terry model. Gets smarter with every interaction. |
35
- | **Checkpointing** | Sessions survive crashes. Resume from the last tool call. |
36
- | **Middleware Pipeline** | Composable Express-style middleware for tool execution. |
37
- | **Game Dev Tools** | 16 tools for 8 engines: Godot, Unity, Unreal, Bevy, Phaser, Three.js, PlayCanvas, Defold. |
38
- | **Security Hardening** | 0 P0/P1 issues. Path traversal guards, code injection sanitization, 87 game dev tests. |
30
+ | **Forge Tool** | `forge_tool` kbot creates new tools at runtime when it doesn't have one. No restart, no recompile. |
31
+ | **Forge Registry** | Publish, search, and install community-created tools. Collective autopoiesis. |
32
+ | **Autopoietic Health** | `kbot vitals` self-monitoring system health: memory, token budgets, tool success rates. |
33
+ | **Immune Agent** | Self-auditing agent that detects drift, regressions, and anomalies across sessions. |
34
+ | **Cost-Aware Routing** | Automatically picks the cheapest model that can handle the task. Saves 60-90% on API costs. |
35
+ | **Fallback Chains** | If a provider fails, kbot cascades to the next one. Zero downtime, zero manual intervention. |
36
+ | **290 Tools** | +6 tools since v3.3: forge, vitals, immune, cost routing, fallback chains, and more. |
37
+ | **23 Agents** | Expanded specialist roster with immune and forge agents. |
39
38
 
40
39
  ---
41
40
 
42
41
  ## Why kbot?
43
42
 
44
- Most AI coding tools lock you into one provider and forget everything between sessions. kbot is different:
43
+ Other AI coding tools are static fixed tool sets, single providers, no memory. kbot is the first AI agent that **evolves itself**:
45
44
 
45
+ - **Forges its own tools** — When kbot encounters a task it can't handle, it creates a new tool on the spot via `forge_tool`. The tool persists, gets tested, and can be shared via the Forge Registry.
46
+ - **Self-evolving** — Autopoietic health monitoring (`kbot vitals`) tracks tool success rates, token budgets, and memory pressure. The immune agent self-audits for drift and regressions.
47
+ - **Cost-aware routing** — Automatically selects the cheapest model capable of handling each task. Claude for complex reasoning, DeepSeek for simple queries. Saves 60-90% on API costs.
48
+ - **Fallback chains** — If Anthropic is down, kbot cascades to OpenAI, then Groq, then local. Zero manual intervention.
46
49
  - **20 providers, zero lock-in** — Claude, GPT, Gemini, Grok, DeepSeek, Groq, Mistral, and 13 more. Switch anytime.
47
50
  - **Runs fully offline** — Embedded llama.cpp runs GGUF models directly. No Ollama needed. $0, fully private.
48
51
  - **Learns your patterns** — Bayesian skill ratings + pattern extraction. Gets faster and smarter over time.
49
- - **22 specialist agents** — Say "fix the auth bug" and it routes to `coder`. Say "research JWT tokens" and it routes to `researcher`. Auto-routed with probabilistic confidence.
52
+ - **23 specialist agents** — Say "fix the auth bug" and it routes to `coder`. Say "research JWT tokens" and it routes to `researcher`. Auto-routed with probabilistic confidence.
50
53
  - **Crash-proof** — Checkpoints after every tool call. Resume interrupted sessions automatically.
51
54
  - **Use as a library** — Clean SDK with typed exports. Build your own tools on top of kbot.
52
55
  - **Works in your IDE** — Built-in MCP server for VS Code, Cursor, Zed, Neovim. ACP for JetBrains.
@@ -79,10 +82,35 @@ kbot auth
79
82
  # Or go fully local — no API key, no data leaves your machine
80
83
  kbot local
81
84
 
85
+ # Forge a new tool at runtime
86
+ kbot "I need a tool that converts CSV to JSON with column filtering"
87
+
88
+ # Check system health
89
+ kbot vitals
90
+
82
91
  # Pipe mode — compose with Unix tools
83
92
  kbot -p "generate a user roles migration" > migration.sql
84
93
  ```
85
94
 
95
+ ## Forge — Runtime Tool Creation
96
+
97
+ kbot is the only AI agent that builds its own tools. When it encounters a task no existing tool can handle, it creates one:
98
+
99
+ ```bash
100
+ # kbot detects it needs a tool, creates it, tests it, and uses it — all in one turn
101
+ kbot "analyze the sentiment distribution across all my markdown files"
102
+ # → forge_tool creates 'sentiment_analyze' → executes it → returns results
103
+
104
+ # Browse and install community tools from the Forge Registry
105
+ kbot forge search "kubernetes"
106
+ kbot forge install k8s-pod-monitor
107
+
108
+ # Publish your forged tools for others
109
+ kbot forge publish sentiment_analyze
110
+ ```
111
+
112
+ Forged tools are first-class citizens — they get the same middleware pipeline, permission checks, and telemetry as built-in tools.
113
+
86
114
  ## SDK — Use kbot as a Library
87
115
 
88
116
  ```typescript
@@ -104,7 +132,7 @@ for await (const event of agent.stream("explain this code")) {
104
132
  const files = await tools.execute('glob', { pattern: 'src/**/*.ts' })
105
133
  console.log(files.result)
106
134
 
107
- // List all 284 tools
135
+ // List all 290 tools
108
136
  console.log(tools.list().map(t => t.name))
109
137
  ```
110
138
 
@@ -125,6 +153,7 @@ Auto-routed by Bayesian skill ratings, or pick one with `kbot --agent <name>`:
125
153
  | **Core** | kernel, researcher, coder, writer, analyst |
126
154
  | **Extended** | aesthete, guardian, curator, strategist |
127
155
  | **Domain** | infrastructure, quant, investigator, oracle, chronist, sage, communicator, adapter |
156
+ | **System** | immune, forge |
128
157
  | **Presets** | claude-code, cursor, copilot, creative, developer |
129
158
 
130
159
  ```bash
@@ -133,24 +162,34 @@ kbot --agent guardian "review src/auth.ts for security issues"
133
162
  kbot --agent coder "refactor this into smaller functions"
134
163
  ```
135
164
 
136
- ## 284 Tools
165
+ ## 290 Tools
137
166
 
138
167
  | Category | Examples |
139
168
  |----------|---------|
140
- | **Files & Code** | read, write, glob, grep, lint, test |
169
+ | **Forge** | forge_tool, forge_search, forge_install, forge_publish |
170
+ | **Files & Code** | read, write, glob, grep, multi-file write |
171
+ | **Quality** | lint (ESLint/Biome/Clippy), test (Vitest/Jest/pytest), deps audit, format, type-check |
141
172
  | **Shell** | bash, parallel execute, background tasks |
142
173
  | **Git & GitHub** | commit, diff, PR, issues, code search |
143
- | **Web** | search, fetch, browser automation |
174
+ | **Web** | search, fetch, browser automation, browser agent |
144
175
  | **Research** | arXiv, Semantic Scholar, HuggingFace, NASA, DOI |
145
176
  | **Data** | CSV read/query/write, transforms, reports, invoices |
177
+ | **Creative** | p5.js generative art, GLSL shaders, SVG patterns, design variants, music |
146
178
  | **Deploy** | Vercel, Netlify, Cloudflare Workers/Pages, Fly.io, Railway |
147
- | **Database** | Postgres, MySQL, SQLite queries, Prisma, ER diagrams |
179
+ | **Database** | Postgres, MySQL, SQLite queries, Prisma, ER diagrams, seed data |
148
180
  | **Containers** | Docker build/run/compose, Terraform |
149
181
  | **VFX** | GLSL shaders, FFmpeg, ImageMagick, Blender, procedural textures |
150
182
  | **Game Dev** | scaffold, config, shaders, meshes, physics, particles, levels, tilemaps, navmesh, audio, netcode |
183
+ | **Training** | dataset prep, fine-tuning, evaluation, model export |
151
184
  | **Social** | post to X, LinkedIn, Bluesky, Mastodon — single posts and threads |
185
+ | **Sandbox** | Docker containers, E2B cloud sandboxes, isolated code execution |
186
+ | **Notebooks** | Jupyter read, edit, insert, delete cells |
187
+ | **Build Matrix** | cross-platform builds — mobile, desktop, WASM, embedded, server |
188
+ | **LSP** | goto definition, find references, hover, rename, diagnostics, symbols |
189
+ | **Memory** | persistent save, search, update, forget — survives across sessions |
152
190
  | **IDE** | MCP server, ACP server, LSP bridge |
153
- | **Meta** | subagents, worktrees, planner, memory, sessions, checkpoints |
191
+ | **System** | vitals, immune audit, cost tracking, fallback status |
192
+ | **Meta** | subagents, worktrees, planner, sessions, checkpoints, self-eval |
154
193
 
155
194
  ## Middleware Pipeline
156
195
 
@@ -201,7 +240,7 @@ Built-in middleware: `permissionMiddleware`, `hookMiddleware`, `timeoutMiddlewar
201
240
  | OpenRouter | varies | Cloud |
202
241
  | kbot local | **Free** | Yes |
203
242
 
204
- All auto-detected via environment variables. Or run `kbot auth` for interactive setup.
243
+ Cost-aware routing automatically picks the cheapest provider that can handle each task. Fallback chains ensure zero downtime across providers.
205
244
 
206
245
  ## Local Mode
207
246
 
@@ -267,9 +306,22 @@ Works with Claude Code, Cursor, VS Code, Windsurf, Zed, Neovim. Exposes file ops
267
306
  | `kbot "prompt"` | One-shot execution |
268
307
  | `kbot auth` | Configure API key |
269
308
  | `kbot local` | Use local AI (Ollama, embedded, LM Studio, Jan) |
309
+ | `kbot vitals` | Autopoietic health check — memory, tools, token budgets |
270
310
  | `kbot serve` | Start HTTP REST + SSE streaming server |
271
311
  | `kbot audit <repo>` | Security + quality audit of any GitHub repo |
272
312
  | `kbot contribute <repo>` | Find good-first-issues and quick wins |
313
+ | `kbot pair` | File watcher with auto-analysis |
314
+ | `kbot team` | Multi-agent TCP collaboration |
315
+ | `kbot record` | Terminal session recording (SVG, GIF, asciicast) |
316
+ | `kbot voice` | Text-to-speech output mode |
317
+ | `kbot watch` | Real-time file analysis on change |
318
+ | `kbot bootstrap` | Outer-loop project optimizer (visibility scoring) |
319
+ | `kbot plugins` | Search, install, update community plugins |
320
+ | `kbot models` | List, pull, remove, catalog local models |
321
+ | `kbot changelog` | Generate changelog from git history |
322
+ | `kbot completions` | Shell completions (bash, zsh, fish) |
323
+ | `kbot cloud` | Sync learning data to kernel.chat |
324
+ | `kbot forge search <q>` | Search the Forge Registry for community tools |
273
325
  | `kbot ide mcp` | Start MCP server for IDEs |
274
326
  | `kbot doctor` | 10-point health check |
275
327
  | `/agent <name>` | Switch specialist |
@@ -278,6 +330,16 @@ Works with Claude Code, Cursor, VS Code, Windsurf, Zed, Neovim. Exposes file ops
278
330
  | `/share` | Share conversation as GitHub Gist |
279
331
  | `/tutorial` | Guided walkthrough |
280
332
 
333
+ ### Power-User Flags
334
+
335
+ ```bash
336
+ kbot --architect "design the auth system" # Architecture mode — plan before code
337
+ kbot --thinking "solve this hard problem" # Extended reasoning with thinking budget
338
+ kbot --self-eval "write a parser" # Self-evaluation loop — scores and retries
339
+ kbot --computer-use "fill out this form" # Computer use — controls mouse and keyboard
340
+ kbot -p "query" > output.txt # Pipe mode — clean output for scripting
341
+ ```
342
+
281
343
  ## Under the Hood
282
344
 
283
345
  kbot's agent loop runs 10 always-on cognition modules based on peer-reviewed research:
@@ -305,6 +367,7 @@ These aren't metaphors. They're TypeScript modules with paper citations in the h
305
367
  - Tool execution timeout (5 min) with middleware pipeline
306
368
  - Config files restricted to owner (chmod 600)
307
369
  - Session checkpoints stored locally (~/.kbot/checkpoints/)
370
+ - Immune agent self-audits for drift and anomalies
308
371
  - Telemetry is local-only — never sent externally
309
372
 
310
373
  ## Contributing
package/dist/bootstrap.js CHANGED
@@ -640,7 +640,7 @@ export function formatBootstrapMarkdown(report) {
640
640
  lines.push(`*The bootstrap pattern: close the gap between what your project IS and what the world PERCEIVES.*`);
641
641
  lines.push(`*Fix one thing per run. Compound.*`);
642
642
  lines.push('');
643
- lines.push(`*[kbot](https://www.npmjs.com/package/@kernel.chat/kbot) — 22 agents, 284 tools, 20 providers*`);
643
+ lines.push(`*[kbot](https://www.npmjs.com/package/@kernel.chat/kbot) — 23 agents, 290 tools, 20 providers*`);
644
644
  return lines.join('\n');
645
645
  }
646
646
  //# sourceMappingURL=bootstrap.js.map
package/dist/cli.js CHANGED
@@ -1391,7 +1391,7 @@ async function byokFlow() {
1391
1391
  console.log();
1392
1392
  printSuccess(`BYOK mode enabled — ${providerConfig.name}`);
1393
1393
  printInfo('You pay the provider directly. No message limits. No restrictions.');
1394
- printInfo('All 223 tools + 22 agents + learning system = yours.');
1394
+ printInfo('All 290 tools + 23 agents + learning system = yours.');
1395
1395
  console.log();
1396
1396
  printSuccess('Ready. Run `kbot` to start.');
1397
1397
  }
@@ -1645,7 +1645,7 @@ async function startRepl(agentOpts, context, tier, byokActive = false, localActi
1645
1645
  const suggestions = await detectProjectSuggestions();
1646
1646
  console.log();
1647
1647
  console.log(chalk.dim(' ┌─────────────────────────────────────────────────┐'));
1648
- console.log(chalk.dim(' │') + chalk.bold(' 22 agents. 223 tools. Just say what you need. ') + chalk.dim(' │'));
1648
+ console.log(chalk.dim(' │') + chalk.bold(' 23 agents. 290 tools. Just say what you need. ') + chalk.dim(' │'));
1649
1649
  console.log(chalk.dim(' │ │'));
1650
1650
  if (suggestions.length > 0) {
1651
1651
  for (const s of suggestions.slice(0, 4)) {
@@ -130,7 +130,7 @@ function myToolCount() {
130
130
  return count;
131
131
  }
132
132
  catch {
133
- return 284;
133
+ return 290;
134
134
  }
135
135
  }
136
136
  // ─── Register Tools ─────────────────────────────────────────
@@ -155,7 +155,7 @@ export function registerSocialTools() {
155
155
  if (!text) {
156
156
  // kbot writes about itself
157
157
  const templates = [
158
- `kbot v${version} — ${tools} tools, 22 agents, 20 providers.\n\nWorks on first run. No API key.\n\nnpm i -g @kernel.chat/kbot`,
158
+ `kbot v${version} — ${tools} tools, 23 agents, 20 providers.\n\nWorks on first run. No API key.\n\nnpm i -g @kernel.chat/kbot`,
159
159
  `I have ${tools} tools and I learn your coding patterns.\n\nNot "remember your chat." Actually extract patterns and get faster.\n\nnpm i -g @kernel.chat/kbot`,
160
160
  `Zero-config AI:\n\nnpm i -g @kernel.chat/kbot\nkbot "hello"\n\nThat's it. No API key. No setup. I figure it out.`,
161
161
  `20 AI providers. Zero lock-in.\n\nClaude today. GPT tomorrow. Ollama on the airplane.\n\nnpm i -g @kernel.chat/kbot`,
package/install.sh CHANGED
@@ -20,7 +20,7 @@ RESET="\033[0m"
20
20
  echo ""
21
21
  echo -e "${PURPLE}${BOLD}┌─────────────────────────────────────┐${RESET}"
22
22
  echo -e "${PURPLE}${BOLD}│ kbot — Terminal AI Agent Framework │${RESET}"
23
- echo -e "${PURPLE}${BOLD}│ 22 agents. 262 tools. 20 providers.│${RESET}"
23
+ echo -e "${PURPLE}${BOLD}│ 23 agents. 290 tools. 20 providers.│${RESET}"
24
24
  echo -e "${PURPLE}${BOLD}└─────────────────────────────────────┘${RESET}"
25
25
  echo ""
26
26
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kernel.chat/kbot",
3
- "version": "3.6.0",
4
- "description": "Universal AI agent framework for your terminal. 22 specialist agents, 289 tools, 20 providers. Limitless Execution: cost-aware model routing, agent-routed plans, tool fallback chains, runtime tool forging, smart tool discovery. Forge Registry: publish, search, and install community-created tools (collective autopoiesis). Autopoietic system health monitoring (kbot vitals). Game dev tools (8 engines, ECS, physics, netcode, levels, particles, shaders, sprites). Programmatic SDK, Bayesian skill routing, checkpointing & resume, middleware pipeline, structured streaming, lazy tool loading. Embedded llama.cpp engine, LoRA/QLoRA fine-tuning, deploy tools, MCP marketplace, team mode, plugin SDK. Self-evolving, learns your patterns.",
3
+ "version": "3.6.1",
4
+ "description": "The only AI agent that builds its own tools. Self-evolving terminal AI: 290 tools, 23 agents, 20 providers. Runtime tool forging via forge_tool, Forge Registry for community tools, autopoietic health monitoring, immune self-audit agent. Cost-aware model routing, fallback chains, Bayesian skill routing. Embedded llama.cpp, MCP server, programmatic SDK. MIT.",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
@@ -44,162 +44,88 @@
44
44
  },
45
45
  "keywords": [
46
46
  "ai-agent",
47
+ "terminal-agent",
48
+ "cli-agent",
49
+ "self-evolving",
50
+ "autopoiesis",
51
+ "forge",
52
+ "tool-creation",
53
+ "runtime-tools",
54
+ "mcp",
55
+ "model-context-protocol",
56
+ "llm",
57
+ "anthropic",
58
+ "openai",
59
+ "ollama",
60
+ "coding-agent",
61
+ "autonomous-agent",
62
+ "self-improving",
63
+ "cost-aware",
64
+ "fallback",
65
+ "multi-provider",
47
66
  "cli",
48
67
  "terminal",
49
68
  "code-generation",
50
69
  "ai-coding-assistant",
51
70
  "local-first",
52
- "llm",
53
71
  "automation",
54
72
  "developer-tools",
55
- "ollama",
56
73
  "claude",
57
- "openai",
58
74
  "gpt",
59
- "anthropic",
60
75
  "google-ai",
61
76
  "groq",
62
77
  "mistral",
63
78
  "code-review",
64
- "self-evolving",
65
79
  "multi-model",
66
- "mcp",
67
80
  "mcp-server",
68
81
  "shell-assistant",
69
82
  "open-source-ai",
70
- "chatbot",
71
- "copilot",
72
83
  "ai-assistant",
73
84
  "typescript",
74
- "python",
75
- "rust",
76
- "docker",
77
- "terraform",
78
- "devops",
79
- "data-science",
80
- "machine-learning",
81
- "huggingface",
82
- "arxiv",
83
- "research",
84
- "bioinformatics",
85
- "scientific-computing",
86
- "api-testing",
87
- "graphql",
88
- "rest-api",
89
- "container",
90
- "jupyter",
91
- "testing",
92
- "linting",
93
- "git",
94
- "github",
85
+ "tool-calling",
86
+ "function-calling",
87
+ "agentic",
95
88
  "agent",
96
89
  "swarm",
97
90
  "multi-agent",
98
- "frontend",
99
- "backend",
100
- "documentation",
101
- "css",
102
- "coverage",
103
- "mobile",
104
- "framework",
105
- "math",
106
- "iot",
107
- "robotics",
108
- "vfx",
109
- "shader",
110
- "glsl",
111
- "houdini",
112
- "ffmpeg",
113
- "imagemagick",
114
- "blender",
115
- "procedural",
116
- "creative-coding",
117
- "audio-visualization",
118
- "csv",
119
- "spreadsheet",
120
- "document",
121
- "data-transform",
122
- "report-generation",
123
- "invoice",
124
- "audit",
125
- "code-audit",
126
- "open-source",
127
- "contribute",
128
- "good-first-issue",
129
- "a2a",
130
- "agent2agent",
131
- "agent-protocol",
132
- "browser-automation",
133
- "playwright",
134
- "web-agent",
135
- "composio",
136
- "workflow-engine",
137
- "guardrails",
138
- "agent-handoff",
139
- "agent-marketplace",
140
91
  "gguf",
141
92
  "llama-cpp",
142
93
  "local-llm",
143
- "tool-calling",
144
- "function-calling",
145
- "agentic",
146
- "autonomous-agent",
147
94
  "langchain-alternative",
148
95
  "crewai-alternative",
96
+ "copilot",
97
+ "docker",
98
+ "terraform",
99
+ "devops",
100
+ "git",
101
+ "github",
149
102
  "deploy",
150
103
  "vercel",
151
104
  "netlify",
152
105
  "cloudflare-workers",
153
- "fly-io",
154
- "railway",
155
106
  "database",
156
107
  "prisma",
157
108
  "sql",
158
109
  "postgres",
159
- "mysql",
160
- "sqlite",
161
- "migration",
162
- "pair-programming",
163
- "team-coding",
164
- "plugin-sdk",
165
- "session-recording",
166
- "terminal-recording",
167
- "svg-animation",
168
- "asciinema",
169
- "er-diagram",
110
+ "browser-automation",
111
+ "playwright",
112
+ "web-agent",
113
+ "a2a",
114
+ "agent2agent",
115
+ "agent-protocol",
116
+ "workflow-engine",
117
+ "agent-marketplace",
170
118
  "mcp-marketplace",
171
- "fine-tuning",
172
- "lora",
173
- "qlora",
174
- "model-training",
175
- "mlx",
176
- "unsloth",
177
- "gguf-convert",
178
- "llm-training",
179
- "rlhf",
180
- "dataset-preparation",
119
+ "plugin-sdk",
181
120
  "game-development",
182
121
  "game-engine",
183
122
  "godot",
184
123
  "unity",
185
124
  "unreal-engine",
186
- "bevy",
187
- "phaser",
188
- "threejs",
189
- "ecs",
190
- "entity-component-system",
191
- "physics-engine",
192
- "rapier",
193
- "procedural-generation",
194
- "level-generation",
195
- "particle-system",
196
- "sprite-atlas",
197
- "netcode",
198
- "multiplayer",
199
- "gamedev",
200
- "shader-analysis",
201
- "navmesh",
202
- "tilemap"
125
+ "vfx",
126
+ "shader",
127
+ "open-source",
128
+ "pair-programming"
203
129
  ],
204
130
  "author": "kernel.chat group",
205
131
  "license": "MIT",