Here's a concise, professional technical briefing for OpenJarvis, written to consultant standards.


The Problem

OpenJarvis is a personal AI framework designed to run locally by default, avoiding cloud dependency. However, the repository is a loose collection of five self-contained projects sharing minimal integration—Python, Rust, TypeScript/React, Docker, and example scripts—rather than a single coherent codebase. For a technical team looking to adopt or extend it, the architecture is fragmented: there is no single entry point, no unified build pipeline, and the five projects (src, rust, frontend, examples, scripts) operate with independent dependency management and toolchains.

What This Does

The repo delivers a local-first AI stack across five domains:

  • src/ (810 files, 561 code files): Core Python framework—config, engine, memory, channels, and skill orchestration. Entry points include src/openjarvis/core/config.py and src/openjarvis/core/engine.py. This is the largest, most integrated project; it defines the data model and evaluation loop.
  • rust/ (145 files, 124 code files): Tauri-based Rust extensions and bindings. Structured as a Cargo crate; compiled via maturin develop. Touching this requires Rust tooling and familiarity with Tauri/async architecture.
  • frontend/ (93 files, 67 code files): React + Tauri UI. Built with Vite/React; entry points are frontend/src/App.tsx, frontend/src/main.rs, and frontend/src-tauri/src/lib.rs. State is managed through frontend/src/lib/store.ts and API calls to frontend/src/lib/api.ts.
  • examples/ (29 files, 17 code files): Standalone demo scripts (browser_assistant.py, doc_qa.py, security_scanner.py, multi_model_router.py). These show concrete usage patterns but contain duplicated 6-line blocks (2074 repeats across 360 files) that should be extracted into shared helpers.
  • scripts/ (13 files, 7 code files): Utility and CI scripts.

Recurring techniques include: Dockerized deployment (GPU/ROCm/sandbox variants), Tauri + React desktop wrapping, Python p03.10+ with uv package management, and local LLM backends (Ollama, vLLM, llama.cpp). The framework evaluates models on energy, FLOPs, latency, and cost—not just accuracy.

How It Is Wired

Execution flow depends on which project you target:

  • Python core: src/openjarvis/core/engine.py orchestrates the main loop, calling src/openjarvis/core/config.py for settings (which contains an eval() over a runtime value—see Code Health audit). Skills are loaded from src/openjarvis/skills/. The API surface is in src/openjarvis/core/api.py, which the frontend calls via Tauri RPC.
  • Frontend: User interaction flows through frontend/src/App.tsx → frontend/src/lib/store.ts → frontend/src/lib/api.ts. The API module is the hub: 20 modules import it, and it imports 1 module (instability 0.05). Any change ripples widely. It also has 784 lines of code—high cognitive load.
  • Rust/Tauri: Built with maturin develop; the binary runs in the Tauri window via frontend/src-tauri/src/lib.rs and frontend/src-tauri/src/main.rs. The Rust crate is in rust/Cargo.toml.
  • Docker: Four Dockerfiles exist (deploy/docker/Dockerfile, .gpu, .gpu.rocm, .sandbox) and three compose files. Base images are mutable (python:3.12-slim-bookworm, node:22-slim)—no digest pinning (see Code Health).

What the code touches outside itself: the Python core reads/writes JSON config, touches a SQLite or SQLite-backed database for memory, and can invoke external inference endpoints (Ollama, OpenAI, etc.). The frontend makes HTTP requests to the local FastAPI server (started via uv run jarvis server) or to cloud APIs if keys are set. The Rust extension compiles to a .so/.dylib loaded by Tauri.

How To Use It

Setup (from dependency files and README):

# Clone and sync Python deps
git clone https://github.com/open-jarvis/OpenJarvis.git
cd OpenJarvis
uv sync                      # core framework
uv sync --extra server       # + FastAPI server

# Build Rust extension
uv run maturin develop -m rust/crates/openjarvis-python/Cargo.toml

# Start the server
uv run jarvis init           # initializes config
uv run jarvis start          # starts FastAPI + Tauri window

Configuration: Environment variables are read from configs/openjarvis/config.toml. Keys for cloud backends (OpenAI, Anthropic, Gemini, OpenRouter, MiniMax) are set as env vars. The config file also contains eval() over a computed value in src/openjarvis/core/config.py—this needs replacing with json.loads or ast.literal_eval.

Running it: The primary entry is uv run jarvis start, which launches the Tauri desktop app (frontend + Rust backend) and the FastAPI server. For headless use, uv run jarvis chat or the example scripts in examples/ can be invoked directly.

Real-World Use

A knowledge-worker clones the repo, runs uv sync, pulls a model via Ollama (llama3.2:3b), and opens the desktop app. The agent answers single-turn queries locally 88.7% of the time (per the project's research), falling back to cloud only when confidence is low. Skills (defined in src/openjarvis/skills/) can be added to extend capabilities—e.g., a calendar skill, a code-execution skill, or a web-research skill. The learning loop writes local traces to ~/.local/share/openjarvis/traces/ for later retraining.

Code Health & Issues

The static analysis (1323 files) found 479 issues across 4 kinds:

  • [HIGH/cognitive_load] Oversized file x4: frontend/src/lib/api.ts, frontend/src/pages/AgentsPage.tsx, frontend/src/pages/DataSourcesPage.tsx (784 lines each). Split into cohesive units.
  • [MEDIUM/clarity] Hub module x3: frontend/src/lib/api.ts, frontend/src/lib/store.ts, tests/channels/channel_test_helpers.py. 20 modules depend on the API module; churn is high-blast-radius. Keep it stable and small.
  • [HIGH/cognitive_load] Deep nesting x52: Max indentation depth 8 in frontend/src/components/CommandPalette.tsx, AgentsPage.tsx, DataSourcesPage.tsx. Flatten with guard clauses.
  • [HIGH/clarity] Duplicated code blocks x360 files, 2074 repeated 6-line blocks across examples. Extract shared helpers.

Code Health Audit (10 findings, 0 critical):

  • [HIGH] Pin third-party GitHub Actions to commit SHA—.github/workflows (astral-sh/setup-uv@v8.0.0, dtolnay/rust-toolchain@stable, etc.). Tags can move; lock to SHAs.
  • [HIGH] Remove eval over a runtime value—src/openjarvis/core/config.py. Parse with json.loads or ast.literal_eval.
  • [MEDIUM] Declare least-privilege GITHUB_TOKEN permissions—.github/workflows/ci.yml. Add permissions: contents: read.
  • [MEDIUM] Enable Dependabot or Renovate—24 manifests, no update bot. Commit .github/dependabot.yml.
  • [MEDIUM] Install from lockfile in CI—.github/workflows. Use npm ci or equivalent.
  • [MEDIUM] Pin container base image by digest—deploy/docker/Dockerfile. Use image:tag@sha256:<digest>.
  • [MEDIUM] Gate PRs on dependency vulnerability scan—.github/workflows. Add dependency-review-action or osv-scanner.
  • [MEDIUM] Set persist-credentials: false on checkout—.github/workflows/desktop.yml. Add with: persist-credentials: false.
  • [MEDIUM] Add non-root USER to Docker image—deploy/docker/Dockerfile. Create unprivileged user, chown needed paths, end with USER.
  • [LOW] Set timeout-minutes on CI workflow jobs—.github/workflows/ci.yml. Add realistic bounds.

The Bottom Line

OpenJarvis is a capable local-first AI framework research platform, not a turnkey product. The Python core and Tauri frontend are the most integrated and immediately usable parts; the Rust extension and examples require additional tooling. The repo’s main weakness is its fragmented structure—five projects with independent build chains and no unified onboarding. Teams should adopt it if they need a customizable local AI stack and have Python/Rust/React expertise; others may find the integration overhead prohibitive. Pin Action SHAs, replace the eval(), and lock Docker base images before production use.


Word count: 528