$ show AtomicBot-ai/Atomic-Chat
Atomic Chat is a full-featured desktop application for running local large language models and connecting to cloud AI providers. Built with Tauri v2 (Rust backend) and a React/TypeScript frontend, it provides a unified chat interface, agent mode with tool execution, MCP server integration, model hub, and an OpenAI-compatible local API server. The application supports multiple inference backends (llama.cpp, MLX, Apple Foundation Models) and handles model downloads, hardware detection, and agent orchestration. It includes extensive testing, telemetry (PostHog/Sentry), and a plugin architecture for extensibility. The codebase demonstrates clean separation of concerns through a service hub pattern, consistent state management with versioned persistence, and robust resource handling for MCP lifecycle and grammar-safe tool calling. Some duplication exists between two llama.cpp provider plugins, but overall architecture is well-structured.
The LLM identified 4 files worth highlighting for reuse:
Defines service interfaces (e.g., MCPService, VoiceService, HardwareService) with default, Tauri, and mobile implementations. Services are injected via a ServiceHub pattern (seedServiceHub) enabling easy testability and platform abstraction. This pattern is clean, self-contained, and reusable across any multi-platform application.
Implements a filesystem-based lockfile to prevent concurrent MCP server launches. Handles stale lock cleanup, process crash recovery, and cross-process atomicity. Demonstrates robust resource management and could be extracted for any scenario requiring exclusive access to a child process.
Contains the stripSizeBounds function which recursively removes minLength/maxLength constraints from JSON schema before tool call generation. This prevents llama.cpp's GBNF grammar from hitting internal size limits, a non-obvious optimization that solves a common problem when serving tools to local models. Pure function, self-contained, easily reusable.
A complete GAIA evaluation harness with dataset loading, agent run orchestration, scoring, and JSON report generation. Includes custom hooks for workspace access approvals and denial. Self-contained module that could be extracted for any agent benchmarking effort, showcasing careful instrumentation and deterministic evaluation.