First, decide what you mean by Nanomachines. The usual rules for Nanomachines involve:
* Artifices. These are machines, not life. They do not evolve in unpredictable ways and are inherently digital. Seeding a planet with appropriate microbes does not meet your story goals, nor using machines to modifying local biota to make the beautiful rafting trees (as in Titan).
* Programmed. Dropping the machines has a definite goal. For example, Engines of Creation builds a city and hatchery for a foreign race.
* Replicating. You only seed a few of the machines. Finding local resources, they create more machines. This whole colony is the factory. This model of self-replication is attributed to <PERSON>.
Now make a few decisions:
* Goo. Goo is made with the simple rules, with Gray Goo being 'reproduce at all costs'. Aside from the Gray Goo scenario, there are useful models. Asteroid mining programs could be a simple as "create two copies of yourself; fill up cargo with a gram of gold; go to the mining beacon; die", leaving some other tool to gather up the gold mountain covering the mining beacon.
The alternate is the deeply programmed model. Dense storage in a DNA style molecule would allow complex behaviors with the obligatory gigabytes of cruft for compatibility with old versions of the operating system.
* Emergent Behavior. 734
Each machine does its thing and the end goal arises from the combined self organized system. For example, surveying nanobots would each try to get a little ways away from any other nanobot before expending itself to make a reading. The mineral map would be the aggregate of each of the datapoints reported by a robot.
The alternate is networked behavior where the nanobots communicate over wireless links, direct contact, or hub and spoke systems.
* Single Shot. A single shot of nanobots tries to accomplish a single mission and then die. For example, source gas in Transmetropolitan is good a for a single interview and then goes inactive. The job might take years, for example, sequestering carbon, but only one simple goal is achieved.
The alternate is a bootstrapping approach, where the nanobots follow a growth and alteration program. For example, they might survey, choose a site, build a solar plant, use the power to make simplier nanobots, create a base, fill it with supplies, and then wait until humans arrive.
Once you have these decisions now you have some questions:
* Energy Source: Unless you use Deus Ex Machima and supply the nanobots with some shared antimater, you need energy. Most energy is liberated on macroscales, even FOOF provides only a bit of energy in the scales of nanomachines. One pretty much needs to assume either an efficient high-density battery or great energy transmission. Still, most nanobot missions will start with creating a power plant.
* Armor: The world is a hostile place, full of cosmic rays, radioactive alpha and beta particles, reactive oxygen, and stuff. Nanobots need to repair or defend against the environment in some way. Vacuumn work spheres might work. Fast assembly might work.
* Complexity: The complexity of a successful intervention with nanobots is staggering. Start with the idea of understanding a landscape solely from single point measurements, go on to how to extract minerals and working materials, and continue onto running a major industrial complex under computer control. Whole industries creating small tweaks and software for nanobots is not unreasonable.
Even if your story is hand-waving over the physics, stating that the handy container of nanobots is the result of decades of innovation and work would be worthwhile. 64