Skip to main content

dfm — Developer Foundation Model

CI PyPI License: MIT Platform: macOS on Apple Silicon Python 3.12+

A coding agent that runs entirely on your Mac. DFM edits, builds, tests, repairs and verifies code using on-device models: Apple FM for routing and short text, and a local MLX model for code. Repository knowledge comes from RepoCanon, RepoKG and, optionally, Reflex.

DFM sends no code or prompts to hosted models. Other network access (GitHub, package registries) is off or requires approval, per policy.

Status: pre-alpha. Commands and configuration may change between releases.

Requirements

  • macOS on Apple Silicon, Python 3.12 to 3.15, Git, and uv or pipx to install the command.
  • Memory for the local model: the recommended 27B model (4-bit) needs about 18.5 GB at its default context, so 32 GB or more is recommended. dfm setup picks a model that fits.
  • Optional: Apple Intelligence, for Apple FM.

Install

DFM is published on PyPI as dfm-agent; the command and the import package are dfm.

uv tool install --python 3.14 dfm-agent   # or: pipx install --python python3.14 dfm-agent
dfm doctor                                 # check this machine: models, tools, policy
dfm setup                                  # choose a local model that fits in memory
cd your-project && dfm                     # interactive session in that repository

This installs mlx-lm, which runs the local coding model. It does not install on Python 3.15 yet (its dependency sentencepiece has no 3.15 build), hence --python 3.14; on 3.15 DFM installs without it, answers questions from repository facts, and cannot edit code. DFM does not download model weights; dfm setup picks from models already in your Hugging Face cache (the guide shows how to fetch one). Upgrade with uv tool upgrade dfm-agent.

To work on DFM itself, clone the repository and use uv sync and uv run dfm … (CONTRIBUTING.md).

dfm in a repository starts an interactive session: type what you want done, watch each step run, and /undo the last request if you don't want it. Single commands such as dfm implement "fix the failing test" do one task and exit.

How it works

  • The model proposes one action at a time (read, search, patch, run, test). DFM executes it, reruns the tests after every edit, and reports only what a command verified.
  • Every command is classified with shell semantics and checked against policy before it runs; anything the classifier cannot vouch for (python -c, an unfamiliar tool, a PATH= prefix, shell quoting it cannot see through) asks you first. Repository code runs in a per-command macOS sandbox that cannot read your keys, shell history or DFM's own state. Destructive, production and mainnet actions require a typed confirmation. DFM does not commit, push or rewrite history.
  • Repository files, issues and CI logs reach the model as untrusted data, with secrets redacted. A repository's own .dfm/config.toml can tighten DFM's policy, never loosen it.
  • Memory checks, thermal pacing, reasoning budgets and a persistent prompt cache keep the model usable alongside other apps. Ctrl-C stops the model within a token and keeps it loaded.

Modes: ask, plan, implement, review, security-review, ci, fix-pr, implement-issue, benchmark. Full list: command reference.

Documentation

Guide · Architecture · Commands · Configuration · Policy · Threat model · Troubleshooting · Design decisions

Contributing and security

See CONTRIBUTING.md and AGENTS.md. Report vulnerabilities privately as described in SECURITY.md. Changes: CHANGELOG.md.

License and notices

DFM is released under the MIT License and is provided "as is", without warranty of any kind. DFM runs commands and changes files on your machine. Its safeguards reduce risk but do not eliminate it. Review its changes before you commit them.

Models are third-party software under their own licenses, and you are responsible for complying with the license of any model you download. RepoCanon, RepoKG and Reflex are separate projects under their own licenses.

Apple, Apple Intelligence, Apple Silicon and macOS are trademarks of Apple Inc. DFM is an independent project and is not affiliated with or endorsed by Apple.

Metadata

Release files for dfm-agent 0.0.6

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

Source distribution (sdist)

Source distribution for dfm-agent 0.0.6
File Size Uploaded Provenance Actions
dfm_agent-0.0.6.tar.gz 295.7 kB With provenance Details for dfm_agent-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dfm-agent 0.0.6
File Interpreter ABI Platform Actions
dfm_agent-0.0.6-py3-none-any.whl Python 3 none any Details for dfm_agent-0.0.6-py3-none-any.whl

Total release size: 665.1 kB

Release files / dfm_agent-0.0.6.tar.gz

Download URL dfm_agent-0.0.6.tar.gz
Size 295.7 kB
Tags Source
SHA-256 checksum
How to use checksums
13021dec1328aa91f2be900f1e9c8a64166344f0c22fa9ecdb21e71bd9aed9f1
BLAKE2b-256 checksum
How to use checksums
1e30a560974393466cc62b4aca3779e8b366b197bb76febf95742e5541e901c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / dfm_agent-0.0.6-py3-none-any.whl

Download URL dfm_agent-0.0.6-py3-none-any.whl
Size 369.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c61d43bf69a0bf16571d9b1fbd390dde1cb746451af033a86db024ad416476e
BLAKE2b-256 checksum
How to use checksums
9e40cf5eb698ebb904c6e64e6775e0a3e454a619d124ac9adb3333ece036e9fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for dfm-agent 0.0.6

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dfm_agent-0.0.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

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