mlx-agent
Discover, run and manage local AI models on Apple Silicon.

Generate images, video, music, speech and 3D assets with local models. Manage model discovery, conversion and serving, then keep task inputs and results together through the CLI or MCP.
Get started
The core requires Python 3.11 or later and uses the standard library. Model execution needs a separately installed runtime; optional backends have their own dependencies.
git clone --depth 1 --branch main https://github.com/cavi-ai/mlx-agent.git
cd mlx-agent
python3 scripts/mlx-agent inspect-host --json
python3 scripts/mlx-agent discover --limit 3 --json
Review the candidates and follow Your first local model. To prepare compatible local weights and a runtime, see Intake and optional backends. Discovery does not download weights.
Generate a 3D mesh
Turn a PNG, JPEG or WebP image into a GLB with native MLX TripoSG, TRELLIS.2 or Pixal3D. Use compatible converted local weights and the installed mlx-3d backend. Optional backend installation uses Python 3.12. Choose a new .glb path in an existing output directory:
python3 scripts/mlx-agent convert mesh --path /absolute/local/mesh-model --image /absolute/input/object.png --out /absolute/output/object.glb --json
For example, ask a connected agent:
Turn this image into a GLB using my chosen local model. Show me the settings before starting, then show me the result.
For jobs that outlive the client, use durable tasks. They retain task inputs, status and output. See local inference for model-specific operations.
Connect your tools
Use the CLI directly, or register the current checkout's stdio server with an MCP client:
{
"mcpServers": {
"mlx-agent": {"command": "python3", "args": ["/absolute/path/to/mlx-agent/scripts/mlx-agent-mcp"]}
}
}
See Installation and provider lifecycle for host-specific setup, updates and removal.
More with local models
- Generate and understand media: run image, video, speech, music and 3D tasks, or use durable tasks to retain inputs and results.
- Classify and embed: use local models for structured classification and text embeddings through durable tasks.
- Find and evaluate models: Scout finds candidates; Adopt records role checks; Bench measures an already-served model.
- Connect and operate: Wire previews and applies client configuration; Intake, Convert, Serve and optional backends manage model and runtime lifecycle.
- Explore and train: use Research, Blueprint, Laboratory, or LoRA and fuse.
See Evidence and sizing for model checks and the security model for confirmation, network and recovery boundaries.
Provider support
First-class adapters are included for each provider below. The universal installer supports both user and project scopes.
| Provider |
Package |
Invoke |
| Claude Code |
Native plugin |
/mlx-scout``/mlx-adopt``/mlx-wire``/mlx-bench``/mlx-doctor``/mlx-watch``/mlx-fleet``/mlx-task |
| Codex CLI |
Native plugin |
$mlx-agent:mlx-scout``$mlx-agent:mlx-adopt``$mlx-agent:mlx-wire``$mlx-agent:mlx-bench``$mlx-agent:mlx-doctor``$mlx-agent:mlx-watch``$mlx-agent:mlx-fleet``$mlx-agent:mlx-task |
| Agy |
Native plugin |
mlx-scout skill``mlx-adopt skill``mlx-wire skill``mlx-bench skill``mlx-doctor skill``mlx-watch skill``mlx-fleet skill``mlx-task skill |
| OpenCode |
Native plugin |
/mlx-scout``/mlx-adopt``/mlx-wire``/mlx-bench``/mlx-doctor``/mlx-watch``/mlx-fleet``/mlx-task |
| OpenClaw |
Native skills |
/mlx-scout``/mlx-adopt``/mlx-wire``/mlx-bench``/mlx-doctor``/mlx-watch``/mlx-fleet``/mlx-task |
| Hermes Agent |
Native skills |
/mlx-scout``/mlx-adopt``/mlx-wire``/mlx-bench``/mlx-doctor``/mlx-watch``/mlx-fleet``/mlx-task |
| Gemini CLI |
Native extension |
mlx-scout skill``mlx-adopt skill``mlx-wire skill``mlx-bench skill``mlx-doctor skill``mlx-watch skill``mlx-fleet skill``mlx-task skill |
| AgentSkills-compatible hosts |
Portable skills |
mlx-scout skill``mlx-adopt skill``mlx-wire skill``mlx-bench skill``mlx-doctor skill``mlx-watch skill``mlx-fleet skill``mlx-task skill |
Documentation and contributing
Start with the documentation index, CLI reference, runtimes, or troubleshooting. See Contributing for local checks and Development for adapters and documentation builds.
Versioned documentation comes from docs/mlx-agent/source; the consumer contract describes release artifacts. Distributed under the MIT License.
Local models run on MLX and mlx-lm from Apple's ml-explore team.