by OpenSparX
Build AI agents that run 100% on-device. Sub-100ms latency on Qualcomm NPU. Zero cloud dependency.
# Add to your Claude Code skills
git clone https://github.com/OpenSparX/MasterAgentMasterAgent is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by OpenSparX. Build AI agents that run 100% on-device. Sub-100ms latency on Qualcomm NPU. Zero cloud dependency. It has 93 GitHub stars.
MasterAgent's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/OpenSparX/MasterAgent" and add it to your Claude Code skills directory (see the Installation section above).
MasterAgent is primarily written in C++. It is open-source under OpenSparX on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh MasterAgent against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
原生端侧智能体内核 — Native by design, open by nature.
Build AI agents that run 100% on-device. 构建 100% 本地运行的 AI Agent。
No cloud APIs. No latency. No privacy leaks. 无需云端 API · 无网络延迟 · 无隐私泄露
OAK 是面向终端设备的开源智能体操作系统内核,为 AI Agent 提供端侧推理、任务调度、工具调用与硬件加速的完整软件基座。
OAK 之于 Agent OS,如同 Linux 内核之于安卓 / Ubuntu。我们不做完整操作系统,我们提供开源开放的内核层,车企、手机厂商、机器人公司基于 OAK 自研专属 Agent OS。
Cloud-based agents are slow, expensive, and leak your data. Every request goes to a remote API — adding 2–5s of latency, costing $0.01–0.05 per call, and sending your prompts to third-party servers.
Sparx runs the entire agent pipeline locally:
| ⚡ Sub-100ms Response | 🔒 Private by Default | 💰 Zero API Costs |
|---|---|---|
| No network round-trip | Data never leaves your device | Unlimited usage, $0/call |
| 🚀 Works Offline | 🎯 NPU-Accelerated |
|---|---|
| No internet dependency | Optional Qualcomm hardware, 10–100x speedup |
Automotive voice assistant — turn natural language into vehicle control:
sparx demo automotive
# 🚗 Automotive Voice Assistant
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#
# You: "Turn on AC, set to 22°C, interior mode"
#
# ⚙️ Processing...
# ├─ Intent: climate_control ✓
# ├─ Skills: ac.power, ac.temperature, ac.circulation ✓
# ├─ MCP Services: vehicle.climate [87ms] ✓
# └─ Result: Climate control updated ✓
#
# ⚡ Latency: 87ms
Execution plan builder — visualize multi-step agent workflows:
sparx plan show examples/automotive_assistant/plans/turn-off-ac.yaml
# Plan: turn-off-ac (priority=p1, deadline=3000ms)
#
# ┌─────────────┐
# │ read_temp │ vehicle.climate.getTemperature
# └──────┬──────┘
# ▼
# ┌─────────────┐
# │ set_ac │ vehicle.climate.setPower (power: off)
# └─────────────┘
#
# ✓ valid — 2 nodes, 1 dependency
Every request flows through a deterministic-first pipeline — most requests never touch an LLM:
UNKNOWN terminal state for crash safetyKey components:
The problem: What happens when your agent crashes mid-payment?
| Framework | Behavior | Result |
|---|---|---|
| LangChain | Retries blindly | May charge twice 💸💸 |
| AutoGPT | Ignores the error | Money lost silently 💸❓ |
| Sparx | Enters UNKNOWN state |
Requires explicit reconciliation ✅ |
sparx demo crash
# Simulates power loss during payment:
#
# ⚠️ payment.charge → side_effect=UNKNOWN
# idempotency_key: a3f1c7e2
# amount: 49.99 CNY
#
# → Requires manual reconciliation (sparx reconcile)
#
# Why this matters:
# - Retrying may duplicate the charge
# - Ignoring may lose the money
# - UNKNOWN is the only honest answer
Read more: WAL Recovery Mechanism
80% of requests never touch the model. Sparx uses pattern matching and rule-based skills for common tasks — saving latency and compute:
# skills/climate.yaml
name: climate_control
trigger:
patterns:
- "turn {power} (the )?AC"
- "set temperature to {temp}"
handler:
type: deterministic
action: vehicle.climate.setPower
Only ambiguous or complex requests invoke the LLM. Most requests route in microseconds.
Develop on any machine (Mac/Linux/Windows) using CPU inference. Deploy to Qualcomm NPU devices for 10–100x speedup:
| Platform | Backend | Latency | Power |
|---|---|---|---|
| Development (CPU) | llama.cpp | ~1,200ms | 8.1W |
| Production (NPU) | Qualcomm QNN | 87ms | 2.3W |
| Cloud (API) | OpenAI | 2,500ms+ | N/A |
Supported NPU platforms: SA8155P, SA8295P, SA8650P, SA8775P (automotive); Snapdragon 8 Gen 3+ (mobile, coming Q4 2026)
Option 1: npm (recommended)
npm install -g @sparx/cli
Option 2: Homebrew (macOS)
brew install OpenSparX/masteragent/sparx
Option 3: curl (macOS / Linux)
curl -fsSL https://raw.githubusercontent.com/OpenSparX/MasterAgent/main/scripts/install.sh | sh
# 1. Initialize a new project
sparx init my-agent
cd my-agent
# Generated structure:
# my-agent/
# ├── agent.yaml # Agent configuration
# ├── skills/
# │ └── hello.yaml # Skill definitions
# └── .sparx/
# └── wal.log # Recovery log
# 2. Download a model (~530 MB, takes 1–2 min)
sparx pull qwen2.5-0.5b-instruct
# 3. Run locally (CPU inference, no GPU/NPU needed)
sparx run --model ~/.sparx/models/qwen2.5-0.5b-instruct-q8_0.gguf
# Agent "my-agent" is running. Type a message or Ctrl+C to exit.
# > hello
# ✓ route=deterministic skill=hello 0.02ms (model not invoked)
# > what is the capital of France?
# ✓ route=inference ttft=142ms total=1830ms tokens=28
# The capital of France is Paris.
# 4. Try built-in demos
sparx demo automotive # Voice assistant
sparx demo crash # WAL recovery simulation
💡 Tip:
sparx runwithout--modelstill works — deterministic skills (pattern-matched responses) answer normally. Only open-ended questions require a model. Addmodel.pathinagent.yamlto avoid typing the path every time.
# Create a YAML plan spec
cat > plans/my-plan.yaml <<EOF
plan: my-task
priority: p1
deadline_ms: 3000
nodes:
- id: fetch_data
action: api.getData
- id: process
action: logic.transform
after: [fetch_data]
EOF
# Validate against the orchestrator
sparx plan validate plans/my-plan.yaml
# Visualize as Mermaid diagram
sparx plan export plans/my-plan.yaml --format=mermaid
# Export as JSON for programmatic use
sparx plan export plans/my-plan.yaml --format=json
git clone https://github.com/OpenSparX/MasterAgent.git
cd MasterAgent/v2/examples/automotive_assistant
sparx run
# Supported commands:
# • "Turn on AC, set to 22°C"
# • "Navigate to nearest charging station"
# • "Play my favorite playlist"
# • "Call John"
cd examples/smart_home
sparx run
# Controls lights, temperature, security via MCP services
cd examples/iot_edge
sparx run --low-power
# Optimized for battery-powered devices
Once you've developed your agent using CPU inference, deploy to Qualcomm NPU hardware for production:
# List connected devices
sparx devices
# Deploy to device
sparx deploy --device 1
# Interactive session
sparx shell
Supported platforms:
| Platform | SoC | Status | Notes |
|---|---|---|---|
| Automotive | SA8155P | ✅ Supported | Gen 3 |
| Automotive | SA8295P | ✅ Supported | Gen 4 |
| Automotive | SA8650P | ✅ Supported | Gen 4+ |
| Automotive | SA8775P | 🔄 Testing | Gen 4 |
| Mobile | Snapdragon 8 Gen 3 | 🔄 Planned | Q4 2026 |
| IoT | QCS6490 | 🔄 Planned | 2027 |
No. Sparx runs on any Mac/Linux/Windows machine using CPU inference (llama.cpp). Qualcomm NPU is optional for production deployments where you need <100ms latency.