# Cabinet Developer Reference Wiki > Cabinet is an AI-first "startup OS" that stores an entire knowledge base as markdown files on disk, orchestrates BYOAI agents (Claude, Codex, Gemini, Grok, and more) with persistent memory and cron-scheduled jobs, and exposes a Next.js + WebSocket daemon architecture with zero database dependency. This is a Grok-Wiki source-grounded repository wiki. Use the complete Markdown link when an agent needs the full repo context. ## Context Links - [Complete Markdown wiki](https://grok-wiki.com/public/wiki/hilash-cabinet-73c70f449a59/llms-full.txt) - [Complete Markdown alias](https://grok-wiki.com/public/wiki/hilash-cabinet-73c70f449a59.md) - [Human interactive wiki](https://grok-wiki.com/public/wiki/hilash-cabinet-73c70f449a59) - [GitHub repository](https://github.com/hilash/cabinet) ## Repository - Repository: hilash/cabinet - Generated: 2026-05-27T06:37:40.526Z - Updated: 2026-05-27T07:02:29.053Z - Runtime: Pi · Claude Code · claude-sonnet-4-6:high - Format: Technical - Pages: 6 ## Pages - [Technical Orientation](https://grok-wiki.com/public/wiki/hilash-cabinet-73c70f449a59/pages/01-technical-orientation.md): What Cabinet is, its two-process runtime (Next.js on port 4000 + daemon on port 4100), the file-on-disk data model, the npx CLI entry points (cabinetai / create-cabinet), the full tech stack (Next.js 16, TypeScript, Tiptap, Zustand, xterm.js, node-cron, better-sqlite3, ws), and how the rest of this reference is organized. - [Cabinet Daemon — WebSocket Bus, PTY Sessions & Job Scheduler](https://grok-wiki.com/public/wiki/hilash-cabinet-73c70f449a59/pages/02-cabinet-daemon-websocket-bus-pty-sessions-job-scheduler.md): The unified background server (server/cabinet-daemon.ts) that combines the WebSocket event bus, node-cron job scheduler, PTY/xterm terminal sessions with Claude lifecycle management, full-text search indexing, SQLite initialization, and file-watcher-driven real-time updates. Covers the daemon HTTP + WS server boot sequence, message protocol, and how each subsystem registers with the single server instance. - [Provider Adapter Layer — BYOAI Adapters & Registries](https://grok-wiki.com/public/wiki/hilash-cabinet-73c70f449a59/pages/03-provider-adapter-layer-byoai-adapters-registries.md): The pluggable adapter registry (src/lib/agents/adapters/) that maps provider IDs to concrete CLI-backed adapters: claude-local, codex-local, cursor-local, gemini-local, opencode-local, pi-local, grok-local, and copilot-local. Documents the AgentAdapter interface, per-adapter stream parsers, the plugin-loader for third-party adapters, provider-registry resolution, and how per-run provider/model overrides are applied at launch time. - [Agent Runtime — Conversations, Skills & Scheduled Jobs](https://grok-wiki.com/public/wiki/hilash-cabinet-73c70f449a59/pages/04-agent-runtime-conversations-skills-scheduled-jobs.md): End-to-end lifecycle of an agent run: persona templating (persona-manager.ts), conversation creation and transcript storage (conversation-store.ts, conversation-runner.ts), skill loading and scoping (skills/loader.ts, skills/scope.ts), heartbeat polling (heartbeat.ts), action parsing and dispatching (action-parser.ts, action-dispatcher.ts), and the cron-based job scheduler (jobs/job-manager.ts, job-normalization.ts). Includes the agent library of 20 pre-built templates. - [File-Based Storage & Git-Backed History](https://grok-wiki.com/public/wiki/hilash-cabinet-73c70f449a59/pages/05-file-based-storage-git-backed-history.md): How Cabinet stores all knowledge as markdown files on disk with no traditional database: path conventions (path-utils.ts), page I/O with gray-matter front-matter (page-io.ts), the virtual file tree builder (tree-builder.ts), low-level filesystem operations (fs-operations.ts), and the simple-git integration that auto-commits every save and powers the full diff viewer (git-service.ts). Covers cabinet discovery, multi-cabinet support, and the data-dir layout. - [Next.js API Routes, Zustand Stores & UI Architecture](https://grok-wiki.com/public/wiki/hilash-cabinet-73c70f449a59/pages/06-next.js-api-routes-zustand-stores-ui-architecture.md): The complete surface of Next.js API routes under src/app/api/ (agents, jobs, kb, git, search, terminal, onboarding, registry, and more), the Zustand client state stores (app-store, tree-store, ai-panel-store, editor-store, search-store), and the major React component groups (editor with Tiptap, sidebar, agents panel, composer, skills browser, settings). Closes the reference with extension points: adding a new provider adapter, registering a skill source, and what to inspect next. ## Source Files - `cabinetai/README.md` - `next.config.ts` - `package.json` - `README.md` - `server/cabinet-daemon.ts` - `server/db.ts` - `server/pty/claude-lifecycle.ts` - `server/pty/manager.ts` - `server/pty/types.ts` - `server/search/index-builder.ts` - `server/search/search-service.ts` - `src/app/api/agents` - `src/app/api/jobs` - `src/app/api/kb` - `src/components/agents` - `src/components/editor` - `src/lib/agents/action-dispatcher.ts` - `src/lib/agents/adapters/claude-local.ts` - `src/lib/agents/adapters/codex-local.ts` - `src/lib/agents/adapters/index.ts` - `src/lib/agents/adapters/plugin-loader.ts` - `src/lib/agents/adapters/types.ts` - `src/lib/agents/conversation-runner.ts` - `src/lib/agents/conversation-store.ts` - `src/lib/agents/heartbeat.ts` - `src/lib/agents/persona-manager.ts` - `src/lib/agents/provider-registry.ts` - `src/lib/agents/provider-runtime.ts` - `src/lib/agents/providers/claude-code.ts` - `src/lib/agents/skills/loader.ts` - `src/lib/agents/skills/scope.ts` - `src/lib/cabinets/discovery.ts` - `src/lib/git/git-service.ts` - `src/lib/jobs/job-manager.ts` - `src/lib/runtime/runtime-config.ts` - `src/lib/storage/fs-operations.ts` - `src/lib/storage/page-io.ts` - `src/lib/storage/path-utils.ts` - `src/lib/storage/tree-builder.ts` - `src/stores/ai-panel-store.ts` - `src/stores/app-store.ts` - `src/stores/tree-store.ts`