Skip to main content

English | 中文

Spark

Local-first AI coding agent and office workbench, with guardrails you can audit.

Spark gives you one agent loop across the terminal, browser, desktop, IDE and API. Every write is gated by approval and a sandbox, every turn can be rolled back, and the model layer works with any OpenAI-compatible endpoint.

# Linux / macOS — SHA256-verified installer
curl -fsSL https://raw.githubusercontent.com/badhope/spark/main/scripts/install.sh | sh

# Windows (PowerShell)
irm https://raw.githubusercontent.com/badhope/spark/main/scripts/install.ps1 | iex

spark init    # connect any OpenAI-compatible endpoint
spark web     # open the browser UI

No API key? Spark starts in demo mode with a local mock model. Add a key in settings and the next turn uses the real model without a restart.

Spark chat with reasoning, tool calls and a live context meter

What it does

  • Auditable execution. Approval modes and sandbox levels are enforced before a write or command runs. Wildcard rules are scoped to user, project and local config; deny always wins. Protected credential paths and shell token checks stay on.
  • Recoverable by design. Each turn snapshots the workspace and can restore files and conversation together, including outside git repositories.
  • Task-as-branch. Start a task, commit each verified step, and finish on green tests; a failed run abandons its branch instead of leaking changes.
  • Built for real files. The office workbench turns documents, meeting recordings and spreadsheets into cited minutes, action items, reports and exports. Local OCR and transcription keep the source on your machine.
  • Provider freedom. Any OpenAI-compatible endpoint, fallback model chain and credential pool, plus a separate small model for auxiliary calls.

Run it

spark                         # terminal TUI
spark web                     # browser UI on loopback
spark desktop                 # native window, loopback only
spark exec "task" --json      # NDJSON events for scripts and CI
spark review                  # inspect the uncommitted diff
spark doctor                  # check config, credentials and runtime

The office workbench runs through the enterprise control plane:

spark enterprise --host 127.0.0.1 --port 18800
# http://127.0.0.1:18800/office

spark exec emits one JSON object per line and ends with {"type":"final","text":"…"}, so it pipes directly into jq.

Interfaces

Interface Command Use it for
Web UI spark web Chat, files, terminal, execution graph
Enterprise API spark enterprise /api/v1 control plane and /office
Desktop spark desktop Native window, loopback only
TUI / CLI spark · spark exec --json Terminal work and automation
IDE / ACP spark acp · spark ide install Zed, JetBrains, Neovim
MCP / A2A spark mcp-serve · spark a2a-serve Tool and agent-to-agent integration

Safety model

Three layers narrow each other:

  1. Approval — from plan-only to full-auto. The default asks before writes and commands.
  2. Sandbox — workspace isolation by default; escapes and protected paths are refused.
  3. Rules — tool and resource matching across user, project and local scopes. A cloned repository can tighten permissions, never grant itself more.

OS-level isolation is used where available: bwrap on Linux, Job Objects on Windows, sandbox-exec on macOS. When a platform cannot enforce a control, the tool result says so instead of pretending.

Documentation

Doc 中文
Install & build 安装与打包
Configuration 配置
HTTP API API
Architecture 架构
Features 功能总览
Enterprise control plane 企业控制面
A2A protocol A2A
ACP / IDE setup IDE 接入

More: docs index · English docs · VS Code extension · audit notes.

Verify locally

pytest -q
ruff check src tests scripts
mypy src/spark --ignore-missing-imports

CI also runs a Windows checkout check, frontend build drift, packaging checks, a secret scan, an OpenAPI snapshot check and a mock-mode agent eval.

Requirements

Python 3.11.5+ (or the bundled executable), Node.js 18+ only for frontend development, Windows / macOS / Linux.


License: MIT · Author: badhope

Metadata

Release files for spark-agent 0.15.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spark-agent 0.15.4
File Size Uploaded Provenance Actions
spark_agent-0.15.4.tar.gz 1.5 MB Without provenance Details for spark_agent-0.15.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spark-agent 0.15.4
File Interpreter ABI Platform Actions
spark_agent-0.15.4-py3-none-any.whl Python 3 none any Details for spark_agent-0.15.4-py3-none-any.whl

Total release size: 2.7 MB

Release files / spark_agent-0.15.4.tar.gz

Download URL spark_agent-0.15.4.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
3e33537170d2a070725e11d4722f7da57e7d16df7e4d3cb211d053b363a2aad6
BLAKE2b-256 checksum
How to use checksums
d15ede1c2d0a85df002f72dd04d591071734f2bafab3f367c47d4371c1f6847b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / spark_agent-0.15.4-py3-none-any.whl

Download URL spark_agent-0.15.4-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a4919cfc2eeaf60c72c076f636487dc225df168b44dc9415124401fad54b695c
BLAKE2b-256 checksum
How to use checksums
443310e65b9b9c8a375194e8e5e7171b6e7b3896e563d0cbcf9e98fc14d1d273
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for spark-agent 0.15.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page