@lakitu/sdk 0.1.1 → 0.1.3

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +487 -119
  3. package/package.json +2 -2
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lakitu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -2,79 +2,450 @@
2
2
  <img src="assets/laki2-banner.jpeg" alt="Lakitu Banner" width="100%">
3
3
  </p>
4
4
 
5
- # Lakitu
5
+ # @lakitu/sdk
6
6
 
7
- > AI agent runtime using **code execution**, not JSON tool calls.
7
+ > **The Professional OS for Autonomous AI Agents**
8
8
 
9
- Lakitu is an autonomous development environment that runs in an [E2B](https://e2b.dev) sandbox. The agent writes TypeScript code that imports from **KSAs** (Knowledge, Skills, and Abilities), which gets executed in the sandbox.
9
+ Lakitu is a framework for building AI agents that actually finish what they start. While most agents suffer from "agentic amnesia"—forgetting their plan halfway through complex tasks—Lakitu provides the execution environment, structured memory, and competency system that transforms unreliable chatbots into autonomous professionals.
10
+
11
+ ```bash
12
+ npx @lakitu/sdk init
13
+ ```
14
+
15
+ ---
16
+
17
+ ## The Problem with Current AI Agents
18
+
19
+ Today's coding agents fail in predictable ways:
20
+
21
+ | Failure Mode | What Happens | Root Cause |
22
+ |--------------|--------------|------------|
23
+ | **Agentic Amnesia** | Agent completes 30% of work, declares victory | Context window fills with noise, plan is forgotten |
24
+ | **Environment Corruption** | Agent breaks the host system | No execution isolation |
25
+ | **Behavioral Drift** | Agent ignores instructions over time | Competencies buried in monolithic prompts |
26
+ | **State Blindness** | Agent hallucinates progress | No structured state to verify against |
27
+
28
+ Lakitu solves each of these with four integrated systems:
29
+
30
+ ```
31
+ ┌─────────────────────────────────────────────────────────────────────┐
32
+ │ LAKITU FRAMEWORK │
33
+ ├─────────────────────────────────────────────────────────────────────┤
34
+ │ │
35
+ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌────────┐ │
36
+ │ │ E2B Sandbox │ │ KSA Files │ │ Beads │ │ Convex │ │
37
+ │ │ (Security) │ │ (Competency) │ │ (Memory) │ │(State) │ │
38
+ │ └──────────────┘ └──────────────┘ └──────────────┘ └────────┘ │
39
+ │ │ │ │ │ │
40
+ │ ▼ ▼ ▼ ▼ │
41
+ │ Hardware-level Structured Git-backed Real-time │
42
+ │ isolation via behavioral task graph reactive │
43
+ │ Firecracker configuration with decay database │
44
+ │ microVMs & modular skills & forensics │
45
+ │ │
46
+ └─────────────────────────────────────────────────────────────────────┘
47
+ ```
48
+
49
+ ---
10
50
 
11
51
  ## The Code Execution Model
12
52
 
53
+ Traditional agents use JSON tool calls. Lakitu agents write and execute code:
54
+
55
+ ```
56
+ Traditional Agent: Lakitu Agent:
57
+ ┌───────────────────┐ ┌───────────────────┐
58
+ │ LLM Response │ │ LLM Response │
59
+ │ { │ │ ```typescript │
60
+ │ "tool": "x", │ vs │ import { x } │
61
+ │ "args": {...} │ │ await x(...) │
62
+ │ } │ │ ``` │
63
+ └────────┬──────────┘ └────────┬──────────┘
64
+ │ │
65
+ Parse JSON Execute TypeScript
66
+ Route to executor in E2B sandbox
67
+ │ │
68
+ ┌────▼────┐ ┌───────▼───────┐
69
+ │ Limited │ │ Full Computer │
70
+ │ Actions │ │ File, Shell, │
71
+ └─────────┘ │ Browser, etc. │
72
+ └───────────────┘
73
+ ```
74
+
75
+ **Why code execution?**
76
+
77
+ - **Token Efficient** — No tool schemas sent every request (saves 40-60% tokens)
78
+ - **Composable** — Chain operations naturally: `const data = await fetch(); await process(data);`
79
+ - **Debuggable** — See exactly what code ran, not just tool call logs
80
+ - **Model Agnostic** — Any LLM that generates code works
81
+
82
+ ---
83
+
84
+ ## The Four Pillars
85
+
86
+ ### 1. E2B Sandbox — Hardware-Level Security
87
+
88
+ Agents need filesystem access and terminal commands. Running this on your machine is dangerous. Lakitu uses [E2B](https://e2b.dev) sandboxes powered by **Firecracker microVMs**—the same technology AWS uses for Lambda.
89
+
90
+ | Metric | Docker | E2B Firecracker |
91
+ |--------|--------|-----------------|
92
+ | Startup | 500ms - 2s | **~150ms** |
93
+ | Isolation | OS-level (namespaces) | **Hardware-level (KVM)** |
94
+ | Security | Process boundaries | **Full VM isolation** |
95
+ | Persistence | Ephemeral | **Up to 14 days** |
96
+
97
+ The agent gets its own cloud computer where it can install packages, run tests, and verify actions—without any risk to your environment.
98
+
99
+ ```typescript
100
+ // Agent writes code that executes in the sandbox
101
+ import { file, shell } from './ksa';
102
+
103
+ await file.write('app.ts', code);
104
+ const result = await shell.exec('bun test');
105
+
106
+ if (result.exitCode !== 0) {
107
+ // Agent can read errors and self-correct
108
+ const errors = await file.read('test-output.log');
109
+ // ... fix and retry
110
+ }
111
+ ```
112
+
113
+ ### 2. KSA Files — Structured Competency
114
+
115
+ The "monolithic prompt" problem: instructions, persona, and tool definitions crammed into one system message leads to behavioral drift. Lakitu introduces **KSA (Knowledge, Skills, and Abilities) files**—a framework borrowed from industrial-organizational psychology.
116
+
117
+ | Component | Definition | Agent Example |
118
+ |-----------|------------|---------------|
119
+ | **Knowledge** | Theoretical understanding | "TypeScript generics", "REST API design" |
120
+ | **Skills** | Practical application | "Writing unit tests", "Database migrations" |
121
+ | **Abilities** | Underlying capabilities | "Multi-step reasoning", "Self-correction" |
122
+
123
+ Instead of prose prompts, you define machine-readable competency files:
124
+
125
+ ```typescript
126
+ import { defineKSA, fn, service } from "@lakitu/sdk";
127
+
128
+ export const migrationKSA = defineKSA("database-migrations")
129
+ .description("Perform zero-downtime database migrations")
130
+ .category("skills")
131
+
132
+ .fn("planMigration", fn()
133
+ .description("Analyze schema changes and create migration plan")
134
+ .param("currentSchema", { type: "string", required: true })
135
+ .param("targetSchema", { type: "string", required: true })
136
+ .impl(service("services.Migration.internal.plan"))
137
+ )
138
+
139
+ .fn("executeMigration", fn()
140
+ .description("Run migration with rollback capability")
141
+ .param("plan", { type: "object", required: true })
142
+ .param("dryRun", { type: "boolean", default: true })
143
+ .impl(service("services.Migration.internal.execute"))
144
+ )
145
+
146
+ .build();
147
+ ```
148
+
149
+ This achieves **behavioral firmware**—stable, testable, version-controlled agent capabilities.
150
+
151
+ ### 3. Beads — Git-Backed Task Memory
152
+
153
+ Markdown todo lists fail because they're unstructured and fall out of sync. Agents using them complete a subtask, forget the six-phase plan, and declare victory at 30%.
154
+
155
+ **Beads** is a git-backed graph issue tracker designed for AI agents:
156
+
157
+ ```bash
158
+ bd init # Initialize task database
159
+ bd create "Migrate to Riverpod" -t epic
160
+ bd create "Setup dependencies" --parent bd-a1b2
161
+ bd ready # List unblocked tasks
162
+ bd update bd-c3d4 --status in_progress
163
+ bd close bd-c3d4 --reason "Migration complete"
164
+ bd compact # Summarize old tasks, preserve context
165
+ ```
166
+
167
+ **Key features:**
168
+
169
+ - **Dependency-aware**: `bd ready` returns only unblocked tasks
170
+ - **Hash-based IDs**: No merge conflicts in multi-agent workflows
171
+ - **Semantic decay**: `bd compact` summarizes 100 lines of history into 5 lines of context
172
+ - **Forensic audit**: Every task change is tracked in git
173
+
174
+ ```
175
+ ┌─────────────────────────────────────────────────────────────────┐
176
+ │ BEADS TASK GRAPH │
177
+ ├─────────────────────────────────────────────────────────────────┤
178
+ │ │
179
+ │ [Epic: Migrate App] │
180
+ │ │ │
181
+ │ ┌────┴────┐ │
182
+ │ ▼ ▼ │
183
+ │ [Setup] [Core Migration] │
184
+ │ │ │ │
185
+ │ ▼ ┌────┴────┐ │
186
+ │ ✓ [Service A] [Service B] ← blocked by Service A │
187
+ │ │ │
188
+ │ ▼ │
189
+ │ [discovered: memory leak] ← auto-created during work │
190
+ │ │
191
+ └─────────────────────────────────────────────────────────────────┘
13
192
  ```
14
- Traditional Agent: Lakitu Agent:
15
- ┌─────────────────┐ ┌─────────────────┐
16
- │ LLM Response │ │ LLM Response │
17
- │ { │ │ ```typescript │
18
- │ "tool": "x", │ vs │ import { x } │
19
- │ "args": {} │ │ await x(...) │
20
- │ } │ │ ``` │
21
- └────────┬────────┘ └────────┬────────┘
22
- │ │
23
- Parse JSON Execute TypeScript
24
- Route to tool (E2B sandbox)
25
- │ │
26
- ┌────▼────┐ ┌───────▼───────┐
27
- │ Executor │ │ KSA Modules │
28
- └─────────┘ └───────────────┘
29
- ```
30
-
31
- **Why?** Token efficiency (no tool schemas), composability (chain operations in code), debuggability (read exactly what ran).
32
-
33
- ## KSAs (Knowledge, Skills, and Abilities)
34
-
35
- KSAs are TypeScript modules the agent imports. They combine:
36
- - **Knowledge**: JSDoc documentation
37
- - **Skills**: Executable functions
38
- - **Abilities**: What the agent can accomplish
39
-
40
- ### Available KSAs
41
-
42
- | Category | KSA | Functions |
43
- |----------|-----|-----------|
44
- | **System** | `file` | `read`, `write`, `edit`, `glob`, `grep`, `ls` |
45
- | | `browser` | `open`, `screenshot`, `click`, `type`, `getText` |
46
- | | `beads` | `create`, `update`, `close`, `list`, `getReady` |
47
- | | `pdf` | `generate` |
48
- | **Research** | `web` | `search`, `scrape`, `news` |
49
- | | `news` | `trending`, `monitorBrand`, `analyzeSentiment` |
50
- | | `social` | `tiktokProfile`, `instagramPosts`, `twitterPosts`, `searchSocial` |
51
- | **Data** | `companies` | `enrichDomain`, `searchCompanies`, `getTechStack` |
52
- | **Create** | `email` | `send`, `sendText`, `sendWithAttachment` |
53
-
54
- ### Example Agent Code
193
+
194
+ ### 4. Convex — Localized Real-Time State
195
+
196
+ For agents to work as collaborative partners, they need more than files—they need a **reactive state layer**. Lakitu deploys a localized [Convex](https://convex.dev) backend inside the sandbox.
197
+
198
+ **Why this matters:**
199
+
200
+ - **State Persistence**: Complex application state survives process restarts
201
+ - **Reactive Orchestration**: Database changes trigger functions—coordinate multi-agent swarms
202
+ - **Verification**: Agent can check actual state vs. claimed progress (prevents hallucinated completion)
203
+ - **Full-Stack Autonomy**: Agent can develop, deploy, and manage entire applications
55
204
 
56
205
  ```typescript
57
- import { search, scrape } from './ksa/web';
58
- import { enrichDomain } from './ksa/companies';
59
- import { send } from './ksa/email';
60
-
61
- // Research a company
62
- const results = await search('Stripe payments company');
63
- const content = await scrape(results[0].url);
64
-
65
- // Enrich with company data
66
- const company = await enrichDomain('stripe.com');
67
- console.log(`${company.name}: ${company.industry}, ${company.employeeRange} employees`);
68
-
69
- // Send findings
70
- await send({
71
- to: 'user@example.com',
72
- subject: 'Company Research: Stripe',
73
- text: `Industry: ${company.industry}\nEmployees: ${company.employeeRange}`
206
+ // Agent stores structured state, not just files
207
+ await ctx.runMutation(api.tasks.complete, {
208
+ taskId: "bd-a1b2",
209
+ result: { filesChanged: 3, testsPass: true }
74
210
  });
211
+
212
+ // Other agents (or humans) see updates instantly
213
+ const status = await ctx.runQuery(api.project.status);
214
+ // { completed: 23, remaining: 4, blocked: 1 }
75
215
  ```
76
216
 
77
- ## Architecture
217
+ ---
218
+
219
+ ## Quick Start
220
+
221
+ ### Installation
222
+
223
+ ```bash
224
+ npm install @lakitu/sdk
225
+ # or
226
+ bun add @lakitu/sdk
227
+ ```
228
+
229
+ ### Initialize in Your Convex Project
230
+
231
+ ```bash
232
+ npx @lakitu/sdk init
233
+ ```
234
+
235
+ This creates:
236
+ ```
237
+ convex/
238
+ └── lakitu/
239
+ ├── config.ts # Framework configuration
240
+ └── example.ts # Example KSA to get started
241
+ ```
242
+
243
+ ### Build Your Sandbox Template
244
+
245
+ ```bash
246
+ npx @lakitu/sdk build
247
+ ```
248
+
249
+ This:
250
+ 1. Starts a local Convex backend
251
+ 2. Pre-deploys your functions
252
+ 3. Builds an E2B template with everything baked in
253
+ 4. Sandboxes boot in ~150ms with functions ready
254
+
255
+ ### Configure
256
+
257
+ Edit `convex/lakitu/config.ts`:
258
+
259
+ ```typescript
260
+ import { Lakitu } from "@lakitu/sdk";
261
+
262
+ export default Lakitu.configure({
263
+ template: "lakitu",
264
+ model: "anthropic/claude-sonnet-4-20250514",
265
+
266
+ ksas: [
267
+ // Core capabilities
268
+ "file", "shell", "browser", "beads",
269
+
270
+ // Your custom KSAs
271
+ "./migrations",
272
+ "./testing",
273
+ ],
274
+
275
+ pool: {
276
+ min: 0,
277
+ max: 5,
278
+ idleTimeout: 300_000,
279
+ },
280
+ });
281
+ ```
282
+
283
+ ---
284
+
285
+ ## CLI Reference
286
+
287
+ | Command | Description |
288
+ |---------|-------------|
289
+ | `npx @lakitu/sdk init` | Initialize Lakitu in your Convex project |
290
+ | `npx @lakitu/sdk init --dir ./convex` | Specify custom Convex directory |
291
+ | `npx @lakitu/sdk build` | Build E2B template (base + custom) |
292
+ | `npx @lakitu/sdk build --base` | Build base template only |
293
+ | `npx @lakitu/sdk build --custom` | Build custom template only |
294
+ | `npx @lakitu/sdk publish` | Manage E2B templates |
295
+
296
+ ---
297
+
298
+ ## KSA SDK Reference
299
+
300
+ ### Defining a KSA
301
+
302
+ ```typescript
303
+ import { defineKSA, fn, service, primitive, composite } from "@lakitu/sdk";
304
+
305
+ export const myKSA = defineKSA("name")
306
+ .description("What this KSA enables")
307
+ .category("skills") // "core" | "skills" | "deliverables"
308
+ .group("subcategory") // Optional grouping
309
+ .icon("mdi-icon-name") // Optional MDI icon
310
+
311
+ .fn("functionName", fn()
312
+ .description("What this function does")
313
+ .param("input", { type: "string", required: true })
314
+ .param("limit", { type: "number", default: 10 })
315
+ .returns<ResultType>()
316
+ .impl(/* implementation */)
317
+ )
318
+
319
+ .build();
320
+ ```
321
+
322
+ ### Implementation Types
323
+
324
+ **Service** — Call cloud Convex functions:
325
+ ```typescript
326
+ .impl(service("services.MyService.internal.action")
327
+ .mapArgs(({ input }) => ({ data: input }))
328
+ .mapResult(r => r.value)
329
+ )
330
+ ```
331
+
332
+ **Primitive** — Local sandbox operations:
333
+ ```typescript
334
+ .impl(primitive("file.read"))
335
+ .impl(primitive("shell.exec"))
336
+ .impl(primitive("browser.screenshot"))
337
+ ```
338
+
339
+ **Composite** — Chain multiple operations:
340
+ ```typescript
341
+ .impl(composite()
342
+ .call("file.read", { path: "./config.json" }, "config")
343
+ .call("myKsa.process", ctx => ({ data: ctx.vars.config }), "result")
344
+ .return(ctx => ctx.vars.result)
345
+ )
346
+ ```
347
+
348
+ ### Available Primitives
349
+
350
+ | Category | Operations |
351
+ |----------|------------|
352
+ | **file** | `read`, `write`, `edit`, `glob`, `grep`, `ls`, `exists`, `stat` |
353
+ | **shell** | `exec` |
354
+ | **browser** | `open`, `screenshot`, `click`, `type`, `getHtml`, `getText`, `close` |
355
+
356
+ ### Parameter Types
357
+
358
+ ```typescript
359
+ .param("name", { type: "string", required: true })
360
+ .param("count", { type: "number", default: 10 })
361
+ .param("enabled", { type: "boolean", default: false })
362
+ .param("items", { type: "array" })
363
+ .param("config", { type: "object" })
364
+ ```
365
+
366
+ ---
367
+
368
+ ## Built-in KSAs
369
+
370
+ | Category | KSA | Capabilities |
371
+ |----------|-----|--------------|
372
+ | **Core** | `file` | Filesystem CRUD, glob, grep |
373
+ | | `shell` | Terminal command execution |
374
+ | | `browser` | Playwright-based web automation |
375
+ | | `beads` | Task tracking and memory management |
376
+ | **Skills** | `web` | Search, scrape, content extraction |
377
+ | | `news` | News monitoring and sentiment |
378
+ | | `social` | Social media data extraction |
379
+ | | `companies` | Company enrichment and tech stacks |
380
+ | **Deliverables** | `pdf` | PDF generation from markdown |
381
+ | | `email` | Email composition and sending |
382
+
383
+ ---
384
+
385
+ ## The Lakitu Workflow
386
+
387
+ A complete example of how the four pillars work together:
388
+
389
+ ### Phase 1: Planning & Competency Loading
390
+
391
+ ```bash
392
+ # Developer initializes project
393
+ bd init
394
+ bd create "Migrate Flutter app from Provider to Riverpod" -t epic
395
+ ```
396
+
397
+ Agent loads relevant KSAs: `flutter-widgets`, `riverpod-state`, `testing`.
398
+
399
+ ### Phase 2: Execution in Secure Sandbox
400
+
401
+ ```typescript
402
+ // Agent queries for unblocked work
403
+ const tasks = await beads.getReady();
404
+ // → [{ id: "bd-a1b2", title: "Setup Riverpod dependencies" }]
405
+
406
+ // Works in isolated E2B environment
407
+ await shell.exec("flutter pub add flutter_riverpod");
408
+ await file.edit("pubspec.yaml", oldDeps, newDeps);
409
+
410
+ // Runs tests to verify
411
+ const result = await shell.exec("flutter test");
412
+ if (result.exitCode !== 0) {
413
+ // Self-corrects based on error output
414
+ }
415
+ ```
416
+
417
+ ### Phase 3: Continuous Memory Management
418
+
419
+ ```typescript
420
+ // Agent completes task
421
+ await beads.close("bd-a1b2", "Dependencies configured");
422
+
423
+ // Discovers secondary issue during work
424
+ await beads.create({
425
+ title: "Memory leak in Widget #22",
426
+ type: "bug",
427
+ discoveredFrom: "bd-a1b2"
428
+ });
429
+
430
+ // Periodic compaction keeps context fresh
431
+ await beads.compact(); // 100 lines → 5 line summary
432
+ ```
433
+
434
+ ### Phase 4: Session Handoff
435
+
436
+ ```bash
437
+ # End of session
438
+ bd sync # Sync to git
439
+ git push
440
+
441
+ # Next session (human or agent)
442
+ bd sync # Pull latest state
443
+ bd ready # Immediately oriented to project state
444
+ ```
445
+
446
+ ---
447
+
448
+ ## Architecture Deep Dive
78
449
 
79
450
  ```
80
451
  ┌─────────────────────────────────────────────────────────────────────────┐
@@ -92,75 +463,72 @@ await send({
92
463
  │ ▼ │
93
464
  │ ┌─────────────────────────────────────────────────────────────────┐ │
94
465
  │ │ CLOUD GATEWAY │ │
95
- │ │ HTTP → Convex Services (OpenRouter, APITube, ScrapeCreators) │ │
466
+ │ │ HTTP → Convex Services (LLMs, APIs, External Data) │ │
96
467
  │ └─────────────────────────────────────────────────────────────────┘ │
97
468
  │ │
469
+ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────────┐ │
470
+ │ │ /workspace/ │ │ /artifacts/ │ │ .beads/ │ │
471
+ │ │ Working files │ │ PDFs, images │ │ Task graph (JSONL) │ │
472
+ │ └─────────────────┘ └─────────────────┘ └─────────────────────┘ │
473
+ │ │
98
474
  │ ┌─────────────────────────────────────────────────────────────────┐ │
99
- │ │ /home/user/workspace/ Working files │ │
100
- │ │ /home/user/artifacts/ Persistent outputs (PDFs, screenshots) │ │
475
+ │ │ LOCALIZED CONVEX │ │
476
+ │ │ Real-time state Reactive triggers • Multi-agent coordination │ │
101
477
  │ └─────────────────────────────────────────────────────────────────┘ │
102
478
  └─────────────────────────────────────────────────────────────────────────┘
103
479
  ```
104
480
 
105
- ## Directory Structure
106
-
107
- ```
108
- lakitu/
109
- ├── ksa/ # KSA modules (agent imports these)
110
- │ ├── _shared/ # Shared utilities
111
- │ │ └── gateway.ts # Cloud gateway client
112
- │ ├── _templates/ # Templates for new KSAs
113
- │ ├── web.ts # Web search & scraping
114
- │ ├── news.ts # News research & monitoring
115
- │ ├── social.ts # Social media scraping
116
- │ ├── companies.ts # Company data enrichment
117
- │ ├── email.ts # Email sending
118
- │ ├── file.ts # File operations
119
- │ ├── browser.ts # Browser automation
120
- │ ├── beads.ts # Task tracking
121
- │ ├── pdf.ts # PDF generation
122
- │ └── index.ts # Discovery & exports
123
-
124
- ├── convex/ # Convex backend
125
- │ ├── agent/ # Agent loop implementation
126
- │ │ └── codeExecLoop.ts # Code execution loop (no tool schemas)
127
- │ ├── actions/ # Convex actions
128
- │ │ └── codeExec.ts # Code execution runtime
129
- │ ├── prompts/ # System prompts
130
- │ │ └── codeExec.ts # KSA documentation for agent
131
- │ └── tools/ # LEGACY: Being removed
132
-
133
- ├── shared/ # Shared types
134
- │ └── chain-of-thought.ts # Execution tracing
135
-
136
- └── runtime/ # CLI commands for bash
137
- ```
138
-
139
- ## Adding New KSAs
140
-
141
- See `ksa/README.md` for detailed instructions. Quick steps:
142
-
143
- 1. Copy template from `ksa/_templates/`
144
- 2. Implement functions (use `callGateway()` for external services)
145
- 3. Add to `ksa/index.ts` registry
146
- 4. Document in system prompt (`convex/prompts/codeExec.ts`)
147
-
148
- ## Scripts
481
+ ---
149
482
 
150
- | Command | Description |
151
- |---------|-------------|
152
- | `bun dev` | Start local Convex dev server |
153
- | `bun deploy` | Deploy to Convex cloud |
154
- | `bun test` | Run unit tests |
155
- | `bun typecheck` | TypeScript type check |
483
+ ## Environment Variables
484
+
485
+ | Variable | Description |
486
+ |----------|-------------|
487
+ | `E2B_API_KEY` | Your E2B API key (or run `e2b auth login`) |
488
+
489
+ ---
490
+
491
+ ## Comparison with Other Frameworks
492
+
493
+ | Framework | Focus | Lakitu Synergy |
494
+ |-----------|-------|----------------|
495
+ | **CrewAI** | Role-based agent collaboration | Lakitu provides secure execution environment |
496
+ | **LangGraph** | Deterministic state flows | Lakitu provides persistent memory across nodes |
497
+ | **AutoGen** | Multi-agent conversation | Lakitu provides structured task coordination |
498
+ | **Lakitu** | **Infrastructure & Memory** | Foundation layer for reliable autonomy |
499
+
500
+ While orchestration frameworks manage *how* agents talk, Lakitu manages *where* they work, *what* they remember, and *how* they verify their progress.
501
+
502
+ ---
503
+
504
+ ## The Future: Agent Villages
156
505
 
157
- ## Related Documentation
506
+ Lakitu is designed for the "Agent Village"—coordinated swarms working toward massive goals. In this model:
158
507
 
159
- - `CLAUDE.md` - Instructions for AI agents working on this codebase
160
- - `ksa/README.md` - KSA documentation and extension guide
161
- - `convex/prompts/codeExec.ts` - System prompt with KSA examples
508
+ - **State lives in Convex**: Agents don't need leaders; they query `bd ready`
509
+ - **Memory lives in Beads**: Blockers auto-propagate across the swarm
510
+ - **Execution lives in E2B**: Each agent has isolated, secure compute
511
+
512
+ The human role shifts from "manager of minutiae" to "strategist of epics."
513
+
514
+ ---
162
515
 
163
516
  ## Links
164
517
 
518
+ - [npm package](https://www.npmjs.com/package/@lakitu/sdk)
519
+ - [GitHub](https://github.com/shinyobjectz/lakitu)
165
520
  - [E2B Documentation](https://e2b.dev/docs)
166
521
  - [Convex Documentation](https://docs.convex.dev)
522
+ - [Beads Issue Tracker](https://github.com/steveyegge/beads)
523
+
524
+ ---
525
+
526
+ ## License
527
+
528
+ MIT
529
+
530
+ ---
531
+
532
+ <p align="center">
533
+ <i>The future of AI is not a better chatbot—it's a system that lands the plane every time.</i>
534
+ </p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lakitu/sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Self-hosted AI agent framework for Convex + E2B with code execution",
5
5
  "type": "module",
6
6
  "main": "./dist/sdk/index.js",
@@ -59,7 +59,7 @@
59
59
  ],
60
60
  "repository": {
61
61
  "type": "git",
62
- "url": "https://github.com/project-social/lakitu"
62
+ "url": "https://github.com/shinyobjectz/lakitu"
63
63
  },
64
64
  "license": "MIT",
65
65
  "dependencies": {