Back to Blog

Craft Agents OSS: Lukilabs Open-Source AI Agent Framework

If you spend more than five minutes on GitHub these days, you will trip over another AI agent framework. The formula is painfully predictable: wrap a few OpenAI API calls in a convoluted Python class hierarchy, slap a catchy name on it, and farm stars on Hacker News. So when Lukilabs dropped `craft-agents-oss` under an Apache 2.0 license, my initial reaction was to roll my eyes. We don't need another abstraction layer over `chat/completions`. But pulling down the monorepo and ripping it apart reveals something slightly different. Lukilabs isn't building another cloud-tethered SaaS router. They are pushing what they call an "Agent Native" software philosophy, backed by a heavy desktop-first stack. Let’s tear down how this thing actually works, where it breaks, and whether it deserves the hype it is currently riding. ## The "Agent Native" Dogma Lukilabs throws around the term "Agent Native" like it's the next microservices. Ignore the marketing speak for a second. In engineering terms, Agent Native implies that the application isn't just a UI that occasionally asks an LLM for text. The agent is the core runtime controller. Instead of an agent sitting behind a REST endpoint, Craft Agents embeds the agent directly into the application's event loop. It manages its own state, handles its own retries, and executes tools directly in the local environment rather than bouncing through a sandboxed cloud container. This explains their choice of architecture. Craft Agents OSS is built on Electron and Bun. ### Why Electron and Bun? Deploying a local AI framework in 2026 using Electron feels like a step backward to the Slack desktop client days. It is heavy, it eats RAM for breakfast, and it bundles an entire Chromium instance. But look at the execution model. ```bash git clone https://github.com/lukilabs/craft-agents-oss.git cd craft-agents-oss bun install bun run electron:start ``` By using Bun, Lukilabs gets sub-second package resolution and an incredibly fast test runner. By using Electron, they get something much more dangerous: unfiltered access to the host operating system via Node.js, combined with a headless browser ready for automated DOM manipulation. Cloud-based agents fail at basic web scraping because they get blocked by Cloudflare turnstiles. A local Electron instance executing an agentic workflow is just a Chrome browser to the outside world. It bypasses headless detection naturally. The agent runs in the Main Process, holding the file system hostage, while the Renderer Process acts as a scratchpad for the LLM to render dynamic UIs or execute client-side JavaScript. ## Architecture and Internals The monorepo structure is standard enterprise TypeScript. But the execution path for the agent is where things get interesting. Unlike LangChain, which tries to be everything to everyone, Craft Agents is highly opinionated about how text and tool calls flow through the system. You can see this clearly in their recent patch history. Take PR #580, for example. ### The PR #580 Refactor: State Management is Hard Before this release, the framework had a nasty habit of arbitrarily truncating agent memory buffers and UI labels because some junior engineer hardcoded a 140-character limit into the UI state tree. The fix in `#580` stripped this out. The agent path now uses a `normalizeFollowUpText` utility that only handles whitespace-collapsing, with zero length capping. The UI layer is finally decoupled from the agent's internal memory string processing. ```typescript // @craft/utils/text.ts - Post PR #580 export function normalizeFollowUpText(rawInput: string): string { // Strip null bytes and collapse massive whitespace gaps // No arbitrary string slicing allowed here anymore. return rawInput.replace(/\0/g, '').replace(/\s{2,}/g, ' ').trim(); } export function truncateForChipTooltip(text: string, options: { maxLength: number }): string { if (text.length <= options.maxLength) return text; return `${text.slice(0, options.maxLength)}...`; } ``` This seems trivial, but it points to a core problem in agent frameworks: context window management versus UI rendering. If your agent decides to output a 4,000-token internal monologue before taking an action, you cannot have your React state explode because a tooltip tried to render the whole thing. Moving truncation strictly to the presentation layer (`truncateForChipTooltip`) while leaving the execution memory intact (`normalizeFollowUpText`) is just basic software engineering that AI researchers constantly forget. ### IPC Routing and Tool Execution Because Craft Agents uses Electron, it has to marshal data between the Node.js backend (Main) and the Chromium frontend (Renderer). The framework abstracts this via an IPC (Inter-Process Communication) event bus. When the LLM decides to trigger a tool—say, reading a local file or clicking a button on a web page—it emits a JSON-RPC formatted payload. ```json { "jsonrpc": "2.0", "method": "agent.tool.execute", "params": { "tool_id": "fs_read", "args": { "path": "~/.ssh/config" } }, "id": "req_88f91" } ``` The Main process intercepts this, checks a local RBAC (Role-Based Access Control) policy, executes the Node `fs.readFile`, and fires the result back across the IPC bridge. It is fast, but it is also a massive security vector. Running arbitrary LLM output against local file system tools requires airtight sandboxing, which Lukilabs attempts to enforce via strict tool schema definitions. ## Framework Comparison How does Craft Agents OSS stack up against the incumbents? | Feature | Craft Agents OSS | AutoGen (Microsoft) | LangGraph | | :--- | :--- | :--- | :--- | | **Primary Runtime** | Desktop / Local (Electron) | Cloud / Docker (Python) | Server-side (Python/JS) | | **Execution Speed** | High (Bun backend) | Medium (Python GIL) | Medium | | **State Management** | Local SQLite + IPC | In-memory / Redis | Checkpointer / Postgres | | **Local OS Access** | Native (Node.js) | Requires Docker volumes | Requires custom tools | | **Complexity** | High (Monorepo setup) | High (Multi-agent routing) | Very High (Graph theory) | | **License** | Apache 2.0 | MIT | MIT | Craft Agents is not designed for deploying a generic chatbot to a Vercel edge function. It is designed to run on a user's machine, acting as a high-privilege personal assistant. ## The Open-Source Angle Releasing this under Apache 2.0 is a strategic move by Lukilabs. They added standard open-source badges for project health and CI/CD status to signal stability to enterprise teams. But let's not be naive. Building an agent framework is expensive. Releasing an "OSS" version implies the existence of an "Enterprise" or "Cloud" version coming down the pipe. By hooking developers on a fast, Bun-powered local workflow, Lukilabs is building a distribution channel. Once you wire your entire internal tooling into the Craft Agents IPC bus, migrating away becomes a massive headache. ## Actionable Takeaways If you are evaluating frameworks for your next agentic project, ignore the Hacker News hype cycle and look at your deployment constraints. 1. **Adopt if you need local access:** If your agent needs to manipulate local files, control a browser directly to bypass anti-bot protections, or integrate with desktop APIs, Craft Agents OSS is structurally superior to cloud-based Python frameworks. 2. **Avoid if you are building SaaS:** Do not try to strip the Electron shell out of this to deploy it on AWS Lambda. The framework expects a long-lived process and relies heavily on IPC patterns. Use LangGraph or basic standard library routing if you are building a pure web service. 3. **Audit the Tool Schemas:** Because this framework executes locally, a prompt injection attack doesn't just ruin a database query; it can run `rm -rf` on your user's home directory. Enforce strict schema validation on every tool call and run the Electron process with dropped privileges. 4. **Watch the Bun integration:** Bun is fast, but it still has edge cases with certain native Node modules. If you are writing custom tools for Craft Agents that rely on obscure C++ bindings, test them thoroughly before shipping. Frameworks come and go. Craft Agents OSS brings a heavy, desktop-centric philosophy to a space obsessed with lightweight cloud wrappers. It is bloated, it is opinionated, and it is exactly what you need if you want an AI agent that actually controls a computer instead of just talking about it.