Skip to main content

Local project memory that helps coding agents continue work across AI sessions.

Project description

djobs logo

djobs

Local project memory for AI coding agents.
Continue the repository instead of explaining it again in every new session.

CI PyPI Python 3.10–3.14 VS Code Marketplace MIT License

See it work in 60 seconds

Install the VS Code extension, or install the CLI once:

pipx install djobs
# or: uv tool install djobs

djobs setup          # defaults to Copilot; add codex/claude/gemini/kimi/all as needed
djobs doctor
djobs memory list

A healthy first run does not require a project-local .vscode/mcp.json. The extension and djobs setup use user-level registration, while the shared local database is created on first use.

After an agent session records work, djobs memory list shows what can be recovered:

{
  "ok": true,
  "workspace": "oauth-service",
  "count": 3,
  "memories": [
    {
      "id": "6f3c...",
      "event": "user_intent",
      "summary": "Fix the OAuth callback loop without changing the public API.",
      "status": "active"
    },
    {
      "id": "ab91...",
      "event": "tool_failure",
      "summary": "Normalization removed '+' from the state parameter.",
      "status": "active"
    },
    {
      "id": "d204...",
      "event": "session_capsule",
      "summary": "Parser updated; one integration test remains.",
      "status": "active"
    }
  ]
}

The next session can call:

sync_workspace(query="Continue the OAuth callback fix")

and receive a compact continuation capsule containing the goal, constraints, progress, failures, next step, and current Git state. Stored text is returned as untrusted data; the current user request always remains authoritative.

The normal CLI

djobs --help is intentionally focused on the memory product:

Command Use it for
djobs setup [host] Configure MCP and passive lifecycle capture for one supported host
djobs doctor Check local storage and integrations, with a concrete next action
djobs memory list See what the current repository remembers
djobs memory search "query" Find a prior goal, failure, decision, or result
djobs memory status ID stale Retire outdated memory without erasing its audit trail
djobs memory forget ID Delete one memory item
djobs memory clear --yes Clear passive memory for this repository family
djobs gain Inspect recovery savings and verified-task efficiency
djobs pause / djobs unpause Temporarily disable or resume automatic behavior
djobs receipt Show an evidence-backed work summary

The original durable job queue engine is retained for compatibility, but it no longer dominates the first-run experience. Its operational commands are available through djobs legacy --help. Direct historical invocations still work for scripts and hooks, with a compatibility notice.

What djobs remembers

A normal coding session can record bounded local observations such as:

Memory type Example
User intent “Keep Python 3.10 support.”
Tool result “Updated src/parser.py; focused tests passed.”
Tool failure “State normalization removed plus signs.”
Repository change Tracked, staged, and bounded untracked Git changes
Session capsule Goal, constraints, progress, failures, and next step

Passive memory never silently claims a task. Explicit ownership is a separate feature for coordinated work that genuinely needs leases and handoff evidence.

Five MCP tools, with clear roles

Tool Call it when
sync_workspace Starting or continuing repository work. This is the default recovery entry point.
memory Inspecting, searching, retiring, forgetting, or clearing passive memory.
checkpoint Deliberately claiming one bounded unit so another agent does not duplicate it.
handoff Releasing or completing a claimed unit with bounded evidence.
resume_delta Maintaining an older integration that already stores correlation IDs and revisions.

Choosing a recovery detail level

Start with sync_workspace(..., context_tier="resume"):

Tier Use it for Returned detail
resume Normal continuation Goal, constraints, progress, failures, next step, tasks, and Git state
evidence Checking why a conclusion was selected Resume capsule plus compact supporting observations
audit Lifecycle changes or diagnosis Full memory IDs, timestamps, scores, and audit fields

Persist the returned context_hash and pass it back as known_context_hash on an equivalent later recovery. If passive memory did not change, djobs suppresses repeated observations while still returning current task state.

Install and host support

VS Code / GitHub Copilot

Install the djobs VS Code extension. It registers the compact MCP server and exposes setup, diagnostics, pause, and resume without a permanent sidebar, hosted account, polling service, or cloud database.

CLI-managed hosts

djobs setup copilot
djobs setup codex
djobs setup claude
djobs setup gemini
djobs setup kimi
# or configure all detected hosts:
djobs setup all

Repair and removal use the same vocabulary:

djobs repair codex
djobs remove claude

Generic MCP host

{
  "servers": {
    "djobs": {
      "command": "uvx",
      "args": ["djobs", "mcp"]
    }
  }
}

Storage, privacy, and deletion

  • State defaults to ~/.djobs/global.db and stays on the local machine.
  • No hosted account, vector database, remote queue, or repository upload is required.
  • Sibling Git worktrees share passive repository memory; explicit leases remain checkout-scoped.
  • Common API keys, bearer tokens, passwords, authorization values, and URL credentials are redacted on a best-effort basis before storage.
  • Add [djobs:no-memory] to skip one prompt.
  • Set DJOBS_CAPTURE_USER_INTENT=0 to disable automatic prompt-intent capture.
  • Mark memory resolved, superseded, stale, or contradicted when it should stop influencing normal recovery.
  • Use forget for one item or clear --yes for passive memory in the repository family. Explicit checkpoint tasks are preserved by memory clear.
  • Hook, search, and storage failures are fail-open and must not block the coding request.

See docs/USER_GUIDE.md for troubleshooting, field meanings, and cleanup examples.

Explicit ownership, only when needed

checkpoint("Implement parser", path="src/parser.py")
  -> this checkout owns one expiring lease

handoff(task_id, "Parser updated; edge tests remain", completed=false)
  -> releases the task with bounded evidence

Do not create a checkpoint for every prompt. Passive observations are enough for ordinary continuation.

Benchmarks

python scripts/benchmark_project_memory.py
python scripts/benchmark_resume_quality.py
Recovery strategy Estimated context Minimum calls
Re-read every bundled synthetic source file ~7,805 tokens 18 file reads
Query-aware sync_workspace resume tier ~224 tokens 1 MCP call

The bundled fixture reports a 97.1% recovery-payload proxy reduction. It is a reproducible synthetic comparison, not provider billing, latency, or model-quality measurement. The quality benchmark also checks cross-worktree recall, checkout ownership isolation, stale-memory exclusion, and unchanged-context replay suppression.

djobs gain complements the synthetic benchmark with local workflow proxies:

djobs gain
djobs gain --history
djobs gain --format json

It reports first-pass verified rate, repair attempts, average attempts per verified task, cycle-time proxy, and estimated context tokens per verified task.

Requirements

Component Requirement
Python runtime Python 3.10+; Python 3.10–3.14 tested in CI
VS Code extension VS Code 1.101 or newer
Storage Local SQLite by default
Operating systems Windows, macOS, Linux

Node.js is only required to develop or package the extension.

Development

git clone https://github.com/jhuang-tw/djobs.git
cd djobs
python -m venv .venv
# activate the environment
python -m pip install -e ".[dev,pg]"
pre-commit install

python scripts/preflight.py --profile quick --fix --base-ref origin/main
python scripts/preflight.py --profile full --check --base-ref origin/main

The top-level product is local agent memory. Queue, worker, scheduler, and dashboard modules are a compatibility subsystem; new examples and user documentation should not present them as the default experience. See CONTRIBUTING.md, AGENTS.md, examples/README.md, and docs/RELEASE.md before changing public behavior.

PyPI  ·  VS Code Marketplace  ·  Documentation  ·  Issues

MIT licensed.

Project details


Download files

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

Source Distribution

djobs-0.18.2.tar.gz (142.7 kB view details)

Uploaded Source

Built Distribution

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

djobs-0.18.2-py3-none-any.whl (147.0 kB view details)

Uploaded Python 3

File details

Details for the file djobs-0.18.2.tar.gz.

File metadata

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

File hashes

Hashes for djobs-0.18.2.tar.gz
Algorithm Hash digest
SHA256 242be3e62fe46f68cfdf9c80dadf04f42f5b5686a52d070a1260ace5ba482cf5
MD5 75b42851e2abf8878bb9b4e426b9d9f1
BLAKE2b-256 c33232999b3091f80200dc9c286827d6253f469c673ed4cf1ebf4242a0ab25e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for djobs-0.18.2.tar.gz:

Publisher: publish.yml on jhuang-tw/djobs

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

File details

Details for the file djobs-0.18.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for djobs-0.18.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6140ff22875f51582275ccbc012d8a5059d59f12065dbed273bf7c5f32cdead2
MD5 ab885024f13f4085e5c633a13472783a
BLAKE2b-256 861cc0318ddd50c455bf6b7e827eff6a77ab6a9c66142ae74dbbafdcf93eed47

See more details on using hashes here.

Provenance

The following attestation bundles were made for djobs-0.18.2-py3-none-any.whl:

Publisher: publish.yml on jhuang-tw/djobs

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page