Skip to main content

English  ·  简体中文

MOLT 🦀

The coding agent that grows its own tools.

Most agents solve your task and forget everything they learned. MOLT doesn't forget. After every job it reflects on what it did, and when it spots a reusable pattern, it writes itself a new tool, tests it, and keeps it in a skill library. Next time the pattern shows up, the tool is already there.

Watch the toolbox compound:

$ molt run "tidy the config files" --learn --mock

── molt run — task ─────────────────────────────────────────────
  task: tidy the config files
  model: mock

── final answer ────────────────────────────────────────────────
  All done — I inspected the workspace and the job is complete.

── learn ───────────────────────────────────────────────────────
  ✔ grew a new tool: `parse_csv_line` → .molt/skills/parse_csv_line

$ molt skills list
  parse_csv_line    [project]  Parse a CSV line of key=value pairs into a dict.

$ molt run "parse some key=value config" --mock      # the tool is already there

That's the whole idea: your AI doesn't just code — it molts. It sheds the old, grows a new tool, and keeps it.


Why MOLT

  • It compounds. Every task can make the next one cheaper and more reliable. Your agent gets better at your codebase, not just smarter in general.
  • It's honest self-modification. A skill only enters the library after passing its own test. The agent can grow itself new tools, but they have to prove they work first.
  • It's shareable. molt export bundles your toolbox; molt install pulls someone else's. Your agent's hard-won skills become a library you can fork, star, and share.
  • It's yours. MIT, zero tracking, runs on any OpenAI-compatible model — DeepSeek by default.

Quickstart

# From PyPI (the package is published as `molt-agent`):
pip install molt-agent

# …or straight from source:
git clone https://github.com/houyongsheng/deepseek-harness-molt
cd deepseek-harness-molt
pip install -e .

export DEEPSEEK_API_KEY=sk-...

Run a task and let it learn:

molt run "add retry logic to the http client" --learn

No API key? Run the exact same loop with a built-in fake model:

molt run "tidy the config files" --learn --mock
molt evolve "polish the project" -n 5 --mock     # watch the toolbox grow

Commands

Command What it does
molt run "task" [--learn] Run one task. --learn keeps any reusable tool it finds.
molt run --stream --sandbox Stream the answer as it's generated; run skill code in a subprocess.
molt evolve "goal" -n N Loop subtask + learn N times; watch the toolbox accumulate.
molt learn Re-run reflection over the last transcript.
molt skills list / show <n> / remove <n> / dedup Inspect and de-duplicate the library.
molt eval <name> [--cases FILE] Benchmark a skill's accuracy against labeled cases.
molt export [--out DIR] Bundle your skills for sharing.
molt install <path-or-git-url> Pull someone else's skills into your toolbox.
molt publish [--remote URL] Publish the toolbox to a git registry (community hub).

How it works

   task ─▶ agent loop ─▶ answer
               │
               └──▶ reflect: "did I hit a reusable pattern?"
                        │ yes
                        ▼
                   author a skill (python + schema + test)
                        │
                   test it ── fail ─▶ discard
                        │ pass
                        ▼
                   commit to .molt/skills/
                        │
                        ▼
              next run loads it as a tool
  • Run — an agent loop with shell, read_file, write_file, plus every skill you've grown.
  • Reflect — a second LLM pass asks: was anything here reusable? If yes, it returns a skill as JSON.
  • Test — the skill's own test runs in a fresh subprocess; no test, no commit.
  • Reuse — skills become callable tools, project skills shadowing your home library.

Skills live at .molt/skills/<name>/ (project) and ~/.molt/skills/ (home). Each is plain files: skill.json (name/description/inputs), skill.py (def run(**kwargs)), test.py.

Measure & publish

A skill only earns its place if it works. molt eval scores a skill against labeled cases (a cases.json next to the skill, or any file you pass with --cases):

molt eval parse_kv_records
# accuracy: 5/5 (100%)

When you're happy, share it — or publish the whole toolbox to a git registry:

molt export --out ./my-toolbox          # plain copy + manifest
molt publish --remote git@github.com:you/toolbox.git   # pushes, prints the install line
# others: molt install git@github.com:you/toolbox.git

That's the seed of an ecosystem: your agent's skills are a library, and libraries get forked, starred, and shared.

Trust & safety

  • Tested before committed. Untested or failing skills never enter the library.
  • Skills run in-process by default. Use --sandbox to run skill code in a subprocess (process isolation). Either way, treat others' skills like any code you pip install — evaluate before trusting.
  • Plain files, no lock-in. Your toolbox is just directories; delete it, share it, move it.

Roadmap

  • Skill dedup/mergemolt skills dedup removes shadowed copies, flags identical code
  • Skill evalsmolt eval benchmarks accuracy against cases.json
  • Registry publishmolt publish pushes the toolbox to a git registry
  • Streaming + richer tools + sandbox--stream, list_dir/search, --sandbox
  • Auto-run a skill's evals before every commit
  • A discoverable registry hub (molt search) — find skills others published

Codex & Claude ecosystem

MOLT's grown tools are plain Python — so they travel. Two directions:

MOLT → Claude Code / Codex. Export your toolbox in a format they already understand:

molt export --format claude --out .claude   # → .claude/skills/<name>/SKILL.md
molt export --format codex  --out .         # → AGENTS.md reusable-procedure block

Drop .claude/ into a project and Claude Code picks up each skill; append the AGENTS.md block and Codex can implement the same procedure. Ready-made templates live in examples/integrations/.

Claude Code / Codex → MOLT. Delegate the "grow a tool" job back to MOLT with a one-file skill: examples/integrations/claude/molt-skill.md tells Claude Code to run molt run "<task>" --learn whenever it spots a repeatable pattern — then the tool it grew is available to everyone.

Inspiration

MOLT's core bet — an agent that writes, tests, and keeps its own tools — is the idea at the heart of DeepSeek Harness, whose self-referential toolset lets the model inspect and mount plugins inside its own running runtime. MOLT is the lightweight, standalone take on that idea: one pip-installable package, any OpenAI-compatible model, no framework to learn. Want the full plugin-everything harness? Go there. Want the idea in a few hundred lines you can read in an afternoon? Stay here.

License

MIT — go build something that grows itself.

Download files

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

Source Distribution

molt_agent-0.2.0.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

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

molt_agent-0.2.0-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file molt_agent-0.2.0.tar.gz.

File metadata

  • Download URL: molt_agent-0.2.0.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.8

File hashes

Hashes for molt_agent-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b2bf5fe4451d749272a0ee102bb328f231ba29827ce804a9fc3e47f83af9eb04
MD5 c302ed4958b7a4725762d472759d0fa1
BLAKE2b-256 4b83efc3e4c9c5c4566e2f84dca1402585f7b71952d3fe7e7647302583f24a1f

See more details on using hashes here.

File details

Details for the file molt_agent-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: molt_agent-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.8

File hashes

Hashes for molt_agent-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dbe94075d2e49de67503058d86d9136ebbe75a5fb64645a714f846094b7384df
MD5 89bd0e182e8f61b8777cdfd000c3f638
BLAKE2b-256 9b739e5a7057b4552f949749eafb802cfe9b806e1f83cb1444f2dd3ed3479779

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.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