Skip to main content

Agent-first coding task dispatcher for Temporal workflows

Project description

mtor

Agent-first coding task dispatcher for Temporal workflows. Dispatches AI coding tasks to workers, reviews results automatically, and merges approved changes.

Install

uvx mtor
# or
pip install mtor

Quick start

# Dispatch a coding task
mtor "Add logging to server.py"

# Check status
mtor status ribosome-zhipu-abc123

# List recent runs
mtor list --since 24

# Health check
mtor doctor

Configuration

All config via environment variables:

Variable Default Description
TEMPORAL_HOST ganglion:7233 Temporal server address

Other settings (task queue, output paths) are configured in mtor/__init__.py.

Features

Auto-routing

Tasks are automatically routed to the best provider based on keywords:

  • Exploration queries → droid
  • Bug fixes → goose
  • Build tasks → zhipu (default)

Override with --provider:

mtor "Fix the login bug" --provider goose

Risk classification

Tasks are classified as low / medium / high risk. High-risk tasks (deletions, config changes) are flagged in the dispatch response.

Spec file support

Pass a markdown file as the prompt — mtor reads it and strips YAML frontmatter:

mtor path/to/spec.md

Spec decomposition

Multi-task specs (with ## Task 1, ## Task 2 sections) are automatically split into individual workflows sharing the same preamble.

Dedup

Same prompt → same workflow ID. Temporal prevents duplicate dispatches natively.

Experiment mode

mtor -x "Try a new approach to caching"

Experiment tasks don't auto-merge — they stay on branches for manual review.

Deferred approvals

Gate high-risk tasks behind manual approval:

mtor approve ribosome-zhipu-abc123
mtor deny ribosome-zhipu-abc123

Commands

Command Description
mtor "prompt" Dispatch a task
mtor list List recent workflows
mtor status <id> Get workflow details
mtor logs <id> Fetch last 30 lines of output
mtor cancel <id> Cancel a workflow
mtor approve <id> Approve a deferred task
mtor deny <id> Deny a deferred task
mtor doctor Health check
mtor deploy Sync + restart worker
mtor history Recent run history from JSONL log
mtor checkpoints List saved checkpoints from failed runs
mtor schema Emit JSON schema of all commands

Every response is a JSON envelope with ok, command, result/error, and next_actions — designed for programmatic consumption by agents and tools.

Exit Codes

Code Meaning
0 Success
1 Generic error
2 Usage error (missing required arguments)
3 Temporal unreachable
4 Workflow not found

Requirements

  • Python ≥ 3.11
  • A running Temporal server
  • A worker process executing coding tasks (e.g., ribosome + translocase)

License

MIT

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

mtor-0.7.0.tar.gz (33.4 kB view details)

Uploaded Source

Built Distribution

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

mtor-0.7.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file mtor-0.7.0.tar.gz.

File metadata

  • Download URL: mtor-0.7.0.tar.gz
  • Upload date:
  • Size: 33.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mtor-0.7.0.tar.gz
Algorithm Hash digest
SHA256 37883e1dad841dde17a916b689d06c5078d2a52be2ccf434c74e88ba3276b9b6
MD5 35507f66c7f5510693c95fe1fb2d86c8
BLAKE2b-256 ff3e255fe8e950437e089b9dcf6208d60e4984287548acf2c4aaf887ace20ea3

See more details on using hashes here.

File details

Details for the file mtor-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: mtor-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mtor-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 324bde2262f8aa6afbf9e41589d3d41dee763a00d381d44e8823f047f19325c2
MD5 5ca75a56456a06904707a90bb9821c4f
BLAKE2b-256 9f46b6b37f742cea627a4dd096da3eaaa502eec08af0a30bebdd54740491897f

See more details on using hashes here.

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