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
process-framework-concepts The general execution model beneath any process framework: planning, tasks, edge granularity, join policies, and admission, with design tests and the Metaproc mapping
execution-model-design The durable contracts under task-level scheduling — semantics versioning, dependency clauses, expansion closure, attempt fencing, admission claims — and what is deliberately left out
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
agent-toolchain-bootstrap Which toolchain pins agent sessions install for themselves, where that is wired, and how it is guarded
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
memory-accounting-reference Which memory counters mean what on macOS and Linux, with kernel citations; the background behind how RunPool sizes concurrency
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.

Working with a Coding Agent

This repository includes AGENTS.md, with the build, test, dependency, layout, and release conventions a coding agent needs for routine work. CLAUDE.md imports the same instructions for Claude Code.

For an ordinary change, tell your agent: “Read AGENTS.md, implement this change, and run the required checks.” For toolchain or template maintenance, ask it to use the simple-modern-uv skill, which distinguishes selective feature adoption from a full Copier update.

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.

Metadata

Release files for metaproc 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metaproc 0.3.0
File Size Uploaded
metaproc-0.3.0.tar.gz 2.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for metaproc 0.3.0
File Interpreter ABI Platform
metaproc-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.8 MB

Release files / metaproc-0.3.0.tar.gz

Download URL metaproc-0.3.0.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
a58cbab7903b7f53be57b846ac8ed46ddf7fb36333db38ec59cd42f2e3cdcd20
BLAKE2b-256 checksum
How to use checksums
3b3b777e8fc9357fbefe3060d0ced20e0947862b09eb10ee9a3f75b7d2cde970
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.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":true}

Release files / metaproc-0.3.0-py3-none-any.whl

Download URL metaproc-0.3.0-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
793e0850ed596c40142f3da8f1f5478cd458eb6aa39eaa3ca37e24b549778a55
BLAKE2b-256 checksum
How to use checksums
42d20e7121175dab511a8c4c2cd2839f036405efc40a81684e37427152787b1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.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":true}

Release history Release notifications | RSS feed

0.4.1

2 release files

0.4.0

2 release files

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.2.0

2 release 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