The Problem

Most AI coding agents depend on cloud APIs, which means sending sensitive code and data to third parties, paying per-token costs, and dealing with rate limits. Teams that handle private or regulated data need agentic coding assistance that runs entirely on their own hardware, with no network egress.

What This Does

Magnitude is an open-source agent that runs fully local—models, inference, and tool execution—with zero cloud dependencies. It packages a custom Rust inference engine built on llama.cpp (in inference/), a TypeScript agent core (in packages/agent/), and a CLI (in cli/) that profiles hardware, recommends models, and manages loading/switching.

The agent can inspect/edit files, run shell commands, and manage long sessions. Skills extend it to handle Excel, PowerPoint, PDFs, and browser automation. The packages/ directory holds the bulk of the logic (1,257 files), with inference/ as the Rust engine, cli/ as the entry point, and web//desktop/ as UI shells.

How It Is Wired

Execution starts at cli/src/index.tsx, which boots the interactive terminal UI. From there, the app routes through cli/src/features/local-inference/index.ts to the agent core in packages/agent/, and to the Rust engine via inference/crates/icn-api/. The agent's events module is the central hub—98 modules depend on it, making it the highest-blast-radius file in the codebase.

The agent lifecycle (packages/agent/src/projections/agent-lifecycle.ts) tracks state transitions and sits in a circular dependency with events.ts and turn.ts. That cycle means a change to any of those three files can ripple unpredictably through the import graph. The packages/acn/src/agent-runtime.ts file handles runtime orchestration and is flagged for deep nesting (indentation depth 6), which makes control flow hard to follow.

The inference engine (inference/) is a separate Rust workspace with crates for API, catalog, and benchmarking. It handles memory calculation, acceleration tuning, and batching before model loading. The packages/acn/ directory appears to handle agent-communication-network logic, though its wiring to the CLI is not fully mapped in this analysis.

How To Use It

npm install -g @magnitudedev/cli
cd your-project
magnitude

The CLI supports macOS and Linux (Windows via WSL). No API keys or environment variables are required. On first run, it profiles hardware and prompts you to pick a model tier (Balanced, Best Quality, Fastest, Lightweight), then handles download and configuration. Skills are added via npx skills add <repo>.

Real-World Use

A financial analyst working with confidential client data runs magnitude inside a secured VM. They use it to review code for PII leaks, generate audit summaries, and build Excel reports via the xlsx skill—all without data leaving the machine. The built-in inference engine keeps context windows intact across parallel agent sessions, so multi-file refactors remain coherent.

Code Health & Issues

Static analysis (not opinion) found 288 findings: 99 high, 188 medium, 1 low. Key items:

  • High – Import cycle: packages/agent/src/events.ts, projections/agent-lifecycle.ts, and projections/turn.ts are mutually reachable. Breaking this requires extracting shared types or deferring imports.
  • High – Oversized files: events.ts (602 lines), agent-lifecycle.ts, and acn/src/agent-runtime.ts exceed maintainable size.
  • High – Hub modules: events.ts has 98 dependents; churn there is high-blast-radius.
  • Medium – High branching density in cli/src/components/button.tsx, cli/src/utils/clipboard.ts, and acn-protocol/src/acn-identity.ts.

SDLC observations: CI exists but the 4 workflows read do not invoke the 339 test files—a green check that never ran assertions. Third-party GitHub Actions are pinned to tags (oven-sh/setup-bun@v2) rather than commit SHAs. No Dependabot/Renovate config. Two large binaries (9.0MB GIF, 5.6MB MP4) bloat every clone. No dependency vulnerability scan in CI.

The Bottom Line

Magnitude is a serious, well-structured local-agent project with real engineering depth—the Rust inference engine and the agent core are substantial. The circular dependency and hub modules in the agent layer will make changes there costly. Teams needing fully offline, private agentic coding should evaluate it; teams comfortable with cloud APIs have cheaper options.