Skip to main content

MindSync AI

CI PyPI version Python versions License: MIT

adityarya24.github.io/mindsync-ai

Local-first MCP orchestration for coding agents. The CLI already talking to you stays in charge: MindSync routes work by capability, blocks file collisions, and keeps session memory across runs. No MindSync account. Remote sync is optional.

You → human-facing CLI (orchestrator) → MindSync → Codex / Claude / Gemini / AGY / Grok / Cursor / OpenCode / Aider

Workers get bounded tasks. They cannot recursively delegate through MindSync.

Quick start

pip install mindsync-ai
mindsync setup --mode auto
mindsync doctor
mindsync agents

Requires Python 3.10+. Restart the configured CLI sessions after setup.

setup registers known MCP hosts (Codex, Claude, Gemini, Grok, Cursor, OpenCode) and recognised PATH agent CLIs. MCP is installed only when MindSync has a real recipe — it will not guess mcp add flags. Unknown binaries are suggested, not registered, and never executed. Use mindsync register for an unusual name.

mindsync setup --dry-run          # preview
mindsync setup --cli grok         # one known host, no PATH scan
mindsync setup --no-discover      # hosts only
mindsync setup --no-hooks         # skip Codex standalone hooks

Install from source: python -m pip install -e ".[dev]"

Supported clients

A CLI may be an MCP host, a worker, or both.

CLI MCP host Worker Notes
OpenAI Codex Native Yes Also gets standalone memory hooks
Anthropic Claude Native Yes Architecture, review, large context
Google Gemini CLI Native Yes Gemini/Antigravity family
Antigravity (agy) Via Gemini Yes Preferred worker in that family
Grok CLI Native Yes Research, review, security
Cursor Agent JSON Yes ~/.cursor/mcp.json
OpenCode JSON Yes ~/.config/opencode/opencode.jsonc
Aider Yes Focused editing

Gemini CLI and agy are one family. When either is the human-facing orchestrator, both are excluded from automatic worker selection.

Orchestration

Policy lives in ~/.mindsync/orchestration.json. Modes: auto, suggest, off.

mindsync config orchestration.mode auto
mindsync-dispatch run auto "implement and test the fix" --capability coding
mindsync-dispatch status

Provider quota handoff is opt-in and requires an isolated worktree:

mindsync-dispatch run auto "implement and test the fix" --write --worktree --on-limit handoff
mindsync-dispatch limits                 # inspect provider/account cooldowns
mindsync-dispatch limits clear           # clear cooldowns after operator verification

Pre-emptive usage readers are pluggable per provider. The Codex adapter can read primary and weekly OAuth usage windows from the local ~/.codex/auth.json source when a reader is configured. Pre-emptive polling and threshold handoff are opt-in: they require both usage.enabled: true in agents.json and --on-limit handoff on an isolated worktree job. Global usage settings default to disabled:

{
  "usage": {
    "enabled": false,
    "defaultThresholdPercent": 90,
    "pollingIntervalSeconds": 60
  }
}

When enabled, dispatch polls at pollingIntervalSeconds during a running attempt, skips cooling or over-threshold provider accounts before spawn, and may transfer only when a privacy-safe MindSync checkpoint already exists for that attempt (plus the worktree diff and original task). There is no generic CLI control channel: dispatch does not ask arbitrary agents to write HANDOFF.md. Without a checkpoint, threshold hits are recorded as preemptiveBlocked and the attempt keeps running so reactive quota handoff remains the floor. Job status shows usage evaluation, skips, blocks, and handoffs; only percentages, window labels, reset times, scope, and reasons are persisted — never raw usage, auth, or source payloads.

Per-adapter overrides use usageReader and optional usageThresholdPercent. The bundled Codex preset declares usageReader: "codex-oauth".

Only configured provider-specific exhaustion messages rotate. Timeouts, auth errors, generic rate limits, failing tests, and ordinary agent failures stop the job. A successor receives the same worktree, the original task, and the latest structured MindSync checkpoint; because routing may select another provider, enable handoff only when that cross-provider context transfer is acceptable.

Completed jobs keep their branch by default. To push a successful isolated job and open a pull request for review, enable it for that repository:

mindsync config onComplete pr --project .

MindSync never merges the pull request. It also declines to publish when a requested check failed or did not report, private prompt framing cannot be separated safely, commit hooks refuse the work, or changed paths look like secrets. Use MINDSYNC_ON_COMPLETE=pr for a one-run override.

Custom worker:

mindsync register --name my-worker --bin my-cli --capability coding

Heavy tags (security, large-context, multimodal) need --confirm. Roster and jobs: ~/.mindsync/dispatch/ (AGENT_DISPATCH_HOME overrides).

Memory

Dispatch memory defaults to auto in git checkouts (opaque git identity, never a path or repo name). Failures warn; they do not fail the job.

mindsync memory stats
mindsync memory list --project my-repo
mindsync memory recall --project my-repo --query "database decision"

Nothing is pruned without --yes. See MCP tools on the server (get_sync_context, delegate_task, job_wait, …) once a host is configured.

Optional remote sync

export MINDSYNC_SSH_HOST=my-server
export MINDSYNC_REMOTE_ROOT=/opt/mindsync

Worker loop and VPS scripts: examples/remote/. Environment variables: .env.example.

Safety

  • The human-facing CLI owns authorization and the final answer.
  • Setup never executes a binary it cannot name.
  • Existing MCP registrations are preserved unless --force.
  • Local state uses crash-safe locks and atomic writes. On Windows, tune queue lock deadlines and OS-lock contention backoff via MINDSYNC_QUEUE_LOCK_TIMEOUT, MINDSYNC_LOCK_CONTENTION_BACKOFF_BASE, and MINDSYNC_LOCK_CONTENTION_BACKOFF_MAX (see .env.example).

Runs with the current user's privileges. See SECURITY.md.

Development

python -m venv .venv && . .venv/bin/activate   # Windows: .venv\Scripts\activate
python -m pip install -e ".[dev]"
python -m ruff check .
python -m pytest -q

Use the venv. sqlite-vec is a package dependency; a bare system Python will fail the Tier 2 tests.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mindsync_ai-1.7.0.tar.gz (245.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mindsync_ai-1.7.0-py3-none-any.whl (167.5 kB view details)

Uploaded Python 3

File details

Details for the file mindsync_ai-1.7.0.tar.gz.

File metadata

  • Download URL: mindsync_ai-1.7.0.tar.gz
  • Upload date:
  • Size: 245.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mindsync_ai-1.7.0.tar.gz
Algorithm Hash digest
SHA256 3a12bf8b518d1e6c20666294a6bded7832ceb5eaeb876958e1e0e659b4c39480
MD5 1a96fe41ec1c0547fc76c7f1d2a6b0c6
BLAKE2b-256 4b5df940a5fa2db0201dc56ac38472648ee2cad341914ba87e84965911967252

See more details on using hashes here.

Provenance

The following attestation bundles were made for mindsync_ai-1.7.0.tar.gz:

Publisher: release.yml on adityarya24/mindsync-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mindsync_ai-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: mindsync_ai-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 167.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mindsync_ai-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1856d9e088a21b77a53315b14511f6c2350bddd4943efe973491c9e5b638ca00
MD5 0d575f829e67f2539fecff89e030e431
BLAKE2b-256 39e19c33257e6f583ce82be1043224a9af40096909354f9777bbd8aaa22ca27f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mindsync_ai-1.7.0-py3-none-any.whl:

Publisher: release.yml on adityarya24/mindsync-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.9.0

2 files

1.8.1

2 files

1.8.0

2 files

This release

1.7.0 This release

2 files

1.6.0

2 files

1.5.3

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

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