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.6.0.tar.gz (33.1 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.6.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mtor-0.6.0.tar.gz
  • Upload date:
  • Size: 33.1 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.6.0.tar.gz
Algorithm Hash digest
SHA256 319717ed804d9cf70a3a9eae1166313a14f2519d5ef1df4f08804474da9ac448
MD5 eb6ae5797dcdf4cbbe7443d9554f069a
BLAKE2b-256 98a737833b099e3fa7a95c7db7940b030655a24e9b48b63b4d0ab6932f982af3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mtor-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 18.8 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.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65475ede48ee028d330280ab4f85634c9cf65a883deb49e57edc94b68ee5b7cf
MD5 b79c3d823cea7000349612706a27a7a6
BLAKE2b-256 2e075c97127bac27b67d0847232cca1f395f455aa96e4998597b798ada3cc3e4

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