Jon Saad-FalconandClaude Opus 4.6 852259f18b Restructure codebase into 5-pillar architecture with MCP tool management, composition layer, and structured learning
Phase 1: Move RoutingContext to core/types.py, add RouterPolicy and QueryAnalyzer ABCs to intelligence/_stubs.py
Phase 2: Move memory backends to tools/storage/, convert memory/ to backward-compat shims
Phase 3: Add MCPToolAdapter, storage MCP tools, upgrade MCP server to spec 2025-11-25
Phase 4: Add SystemBuilder + JarvisSystem composition layer (system.py)
Phase 5: Add InstrumentedEngine for opt-in telemetry, simplify all agents
Phase 6: Add LearningPolicy ABC taxonomy with SFTPolicy, AgentAdvisorPolicy, ICLUpdaterPolicy
Phase 7: Update config schema (ToolsConfig, MCPConfig, TracesConfig, per-pillar learning policies)

Also: update all docs, README (DSPy-inspired), CLAUDE.md, and add logo assets.
1391 tests pass, 32 skipped. Zero new lint errors. Full backward compatibility via shims.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:57:13 +00:00

OpenJarvis

Programming abstractions for on-device AI.


OpenJarvis is a framework for building AI systems that run entirely on local hardware. Rather than treating intelligence as a cloud service, OpenJarvis provides composable abstractions for local model selection, inference, agentic reasoning, tool use, and learning — all aware of the hardware they run on.

You write Python programs that compose five pillars — Intelligence (which model), Engine (which runtime), Agents (which reasoning strategy), Tools (which capabilities, via MCP), and Learning (which adaptation policy) — and OpenJarvis handles hardware detection, model routing, telemetry, and trace-driven improvement automatically.

from openjarvis import Jarvis

j = Jarvis()                                      # auto-detect hardware + engine
response = j.ask("Explain backpropagation")       # route to best local model

j.ask("Solve x^2 - 5x + 6 = 0",                  # multi-turn agent with tools
      agent="orchestrator",
      tools=["calculator", "think"])

j.memory.index("./papers/")                       # index documents into local storage
results = j.memory.search("attention mechanism")  # semantic retrieval

j.close()
pip install openjarvis
jarvis ask "Hello, what can you do?"
jarvis serve --port 8000                           # OpenAI-compatible API

Installation

pip install openjarvis            # core framework
pip install openjarvis[server]    # + FastAPI server
pip install openjarvis[openclaw]  # + OpenClaw agent (requires Node.js 22+)

You also need a local inference backend: Ollama, vLLM, SGLang, or llama.cpp.

The Five Pillars

Pillar What it does Key abstractions
Intelligence Model management and routing RouterPolicy, QueryAnalyzer, ModelCatalog
Engine Inference runtime abstraction InferenceEngine ABC — Ollama, vLLM, SGLang, llama.cpp, MLX, cloud
Agents Pluggable reasoning strategies BaseAgent ABC — Simple, Orchestrator, ReAct, OpenHands, OpenClaw
Tools Capabilities via MCP BaseTool ABC — calculator, code interpreter, web search, memory, LLM sub-calls; external MCP servers auto-discovered
Learning Trace-driven adaptation LearningPolicy ABC — SFT (model routing), AgentAdvisor (restructuring), ICL (tool usage)

Every interaction produces a Trace — a structured record of the full reasoning chain (routing decisions, tool calls, latencies, outcomes). Learning policies consume traces to improve model selection, agent behavior, and tool usage over time.

Config-Driven Composition

OpenJarvis is fully configurable via ~/.openjarvis/config.toml or programmatically via SystemBuilder:

from openjarvis.system import SystemBuilder

system = (SystemBuilder()
          .engine("ollama")
          .model("qwen3:8b")
          .agent("orchestrator")
          .tools(["calculator", "think", "memory_retrieve"])
          .telemetry(True)
          .build())

result = system.ask("What is 2+2?")
system.close()

Hardware auto-detection selects the best engine: Apple Silicon → Ollama, NVIDIA datacenter GPUs → vLLM, AMD → vLLM, CPU-only → llama.cpp.

MCP Interoperability

All tools are managed via the Model Context Protocol (MCP). The built-in MCP server exposes every OpenJarvis tool — including memory operations — to any MCP-compatible client (Claude, GPT, Gemini, etc.). External MCP servers are auto-discovered and their tools appear as native BaseTool instances inside OpenJarvis agents.

Documentation

Full docs at the OpenJarvis documentation site or in-repo:

  • VISION.md — Project vision and design principles
  • CLAUDE.md — Developer reference for the codebase
  • docs/ — Architecture guides, API reference, tutorials

About

OpenJarvis is part of Intelligence Per Watt, a research initiative studying the efficiency of on-device AI systems. The project is developed at Hazy Research and the Scaling Intelligence Lab at Stanford SAIL.

License

Apache 2.0

S
Description
No description provided
Readme
105 MiB
Languages
Python 82.8%
Rust 8.6%
TypeScript 7.1%
Shell 0.7%
HTML 0.3%
Other 0.5%