Skip to main content

Metaproc

Generic process framework for structured multi-step agent workflows.

Metaproc executes dependency-aware process specs through local code handlers or agent CLI adapters. It provides planning, fan-out, resume, validation, status, trace, resource, credential-pool, and optional GCP Batch primitives while leaving domain schemas, prompts, handlers, and policies to downstream packages.

Features

  • Markdown process specs with YAML frontmatter, typed inputs, dependencies, steps, outputs, fan-out, and composite processes
  • Local Python and shell handlers plus Claude Code, Codex, Gemini, and pi CLI adapters
  • Resumable DAG execution with fingerprints, completion validation, overrides, and structured .state and .logs artifacts
  • RunPool concurrency, retry, resource-pressure, credential-pool, and ledger-backed resource observability controls
  • Optional GCP Batch dispatch and Secret Manager integration
  • A packaged Metabrowser plugin for process specs, plans, traces, logs, and resource reports
  • Self-documenting: bundled manuals via metaproc help and a generated portable Agent Skill installed by metaproc skill

Installation

Metaproc requires Python 3.12 or newer and uses uv. Run an exact release without a persistent installation:

uvx metaproc@0.2.1 --help

For a persistent tool installation:

uv tool install metaproc
metaproc --help

Install the optional local browser integration with uv tool install 'metaproc[browser]'. Cloud dependencies are similarly isolated in the gcp and gcp-batch extras.

Metaproc currently supports Linux and macOS. Its process-control and resource-monitoring features require a POSIX operating system.

See installation for source-checkout, upgrade, and Agent Skill instructions.

Quickstart

Run the deterministic source-checkout example without an agent CLI, network call, or cloud credential:

make install
uv --config-file uv.toml run --frozen metaproc run-process \
  examples/offline-smoke/offline-smoke.process.md \
  --var RUNS_DIR="$(pwd)/.runs" \
  --var RUN_ID=quickstart

The process writes three outputs and its structured run state beneath .runs/quickstart/. Re-running it demonstrates completion caching; pass --force to execute every step again.

Client process specs may require additional variables before execution. The most common one is RUNS_DIR: an absolute path used to template output locations via {{run.parent_dir}}. Workflow launchers resolve RUNS_DIR from settings they own and pass the absolute value into run-process / run-step; Metaproc stays workflow-agnostic and does not synthesize it. The offline example passes the value explicitly. Template variables are case-sensitive; see conventions for the casing rules and the small set of framework built-ins.

Documentation

Metaproc documents itself: the manuals below ship inside the package, and everything else lives in docs/.

Start Here

Document Purpose
installation Install paths: uvx, uv tool, source checkout, Agent Skill
metaproc help concepts The conceptual model: vocabulary, planes, step modes, optimization loops (source)
metaproc help operator Runtime reference: starting, monitoring, resuming, and stopping runs (source)
metaproc help developer Extending metaproc and the “metaproc is the right wrapper” policy (source)

Agents get the same routing automatically: metaproc skill metaproc --install writes a portable Agent Skill into .agents/skills/metaproc/ and .claude/skills/metaproc/ that delegates to these manuals.

Reference

Document Purpose
conventions Framework-level naming, structure, and file-format rules (see §File Format Policy)
artifact-catalog Every runtime artifact Metaproc writes or reads: filename, format, schema, lifecycle, writers, and readers
pricing Per-model token and cache pricing for every provider the framework touches; drives cost-per-record math
CHANGELOG Release history and upgrade notes

Runbooks

Operational procedures live in docs/runbooks/:

Runbook Purpose
environment-bootstrap End-to-end setup for running workflows: locks, offline smoke, adapters, GCP preflight
credential-setup Adapter credential configuration for Claude Code, Codex, Gemini, pi, and GCP
cloud-dispatch Preparing, submitting, monitoring, and recovering GCP Batch workloads
adapter-compatibility Provider-routing nuances: API paths, variants, tool-use attribution
adding-a-new-llm-provider Provider onboarding: registry, catalog, pricing, secrets, smoke tests
softschema-validation Validating softschema-tagged artifacts
browser-streaming-smoke Manual Metabrowser UI verification checklist
claude-code-cli-remote-vm Superseded per-developer VM path for the Claude Code adapter

Architecture

Architecture docs live in docs/arch/; the maintained index with status and ownership is development.md § Architecture Docs. arch-metaproc-core is the primary implementation reference; metaproc-design-rev3-proposals holds design proposals not yet implemented. The Metabrowser integration is split between the external MetaBrowser architecture and the Metaproc-owned plugin.

Contributing and Policies

Document Purpose
development Dev guide for hacking on metaproc itself: layout, conventions, testing, arch-doc index
AGENTS.md Instructions for coding agents working in this repository
SUPPLY-CHAIN-SECURITY Dependency policy: cool-off, lockfiles, audited exceptions
SECURITY Vulnerability reporting and security boundaries
publishing Release process with PyPI trusted publishing
performance-notes Performance principles, tooling, and worked examples
project records Active and completed implementation plans plus extraction provenance
TODO Current release and deferred quality work

Commands

The CLI is organized into a few families; metaproc --help lists every command, metaproc <command> --help documents each one, and metaproc help operator maps monitoring questions to commands.

Family Representative commands Purpose
Run run-process, run-step, plan, deps, validate, override, kill Plan and walk process DAGs, execute or acknowledge single steps, unblock or stop runs
Monitor status, wait, tail, pulse, stats, trace, resource-report, write-usage Run completion, health, logs, timing, cost, and resource reporting
Artifacts softschema, structure-report, check-headers, compact-logs, gzip-text Schema inspection and validation, frontmatter checks, log compaction
Credentials auth-check, auth push/list/probe/status/enable/disable/rotate/prune Operator preflight and labeled credential-pool lifecycle
Pools pool status/events/concurrency-timeline/rollup/retry-missing RunPool snapshots, event logs, concurrency history, rollups
Cloud gcp status/scale/logs/cancel/runs/resources/archive/remote/cleanup GCP Batch dispatch monitoring and lifecycle (optional extras)
Self-docs help, skill, env --template Bundled manuals, Agent Skill generation, environment template

Process Specs

Process specs define multi-step DAGs that run-process walks automatically. The repository ships provider-agnostic and per-adapter self-test processes:

Process Location Purpose
self-test/smoke-core process/self-test/smoke-core.process.md Provider-agnostic smoke: standalone lint, type, documentation, policy, and test gates
self-test/smoke-adapter-claude process/self-test/smoke-adapter-claude.process.md Claude adapter: binary, credential, and live prompt
self-test/smoke-adapter-codex process/self-test/smoke-adapter-codex.process.md Codex adapter: binary, credential, and live prompt
self-test/smoke-adapter-gemini process/self-test/smoke-adapter-gemini.process.md Gemini adapter: binary, credential, and live prompt
self-test/smoke-adapter-pi process/self-test/smoke-adapter-pi.process.md pi adapter: binary, credential, and live prompt (Vertex MaaS)

See testing architecture for when to use each tier and how to set up per-adapter credentials. Downstream packages own their domain process specs, schemas, handlers, fixtures, and runbooks.

Development

The repository follows the simple-modern-uv structure and uses uv, Ruff, BasedPyright, pytest, Biome, TypeScript, Flowmark, and Lefthook:

make install
make format
make verify

make verify checks both locks, formatting, Python and browser lint, types, tests, dependency audits, public hygiene, source and wheel contents, and an isolated installed wheel. See development, agent instructions, and supply-chain security.

Compatibility

During the 0.x series, the command-line interface, process-spec format, documented plugin entry points, and Pydantic models explicitly linked from the architecture docs are the supported integration surfaces. Other Python imports are implementation details and may change between minor releases.

Cloud images do not pick up local source edits automatically; publish or upload a wheel and set both METAPROC_WHEEL_GCS and METAPROC_WHEEL_SHA256, or rebuild the downstream image. See cloud-dispatch.

License

Metaproc is AGPL-3.0-or-later; see LICENSE. If you modify Metaproc and let users interact with that modified version over a network, AGPL section 13 requires offering those users the corresponding source code for the running version.

The vendored ELK browser component is a separately licensed work; its license and distribution notice are listed in NOTICE.md.

Download files

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

Source Distribution

metaproc-0.2.1.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

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

metaproc-0.2.1-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file metaproc-0.2.1.tar.gz.

File metadata

  • Download URL: metaproc-0.2.1.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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":true}

File hashes

Hashes for metaproc-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a95be7eff4f89a79995bd3b6088f27f9de137c87783be5e81321191bf2e19ffa
MD5 ddc5ba4867e28fb4fe693819f66fd2ef
BLAKE2b-256 438210497bf30283db0f9b03943b70ff55b64140a694826c5bcb9a87946a8e1d

See more details on using hashes here.

File details

Details for the file metaproc-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: metaproc-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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":true}

File hashes

Hashes for metaproc-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4871c9dd733117c6dc7d2d942840411205783439208e980a9e48495a776e9906
MD5 8c87c0c64bda1bf458291148294542a0
BLAKE2b-256 e93cb96501faa57b3896a86e7dfde8de62b8034929ac5761039a7db735f22775

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 Sentry Error logging StatusPage Status page