Skip to main content

Ralph Workflow is an unattended multi-agent AI development workflows with extensive customization options based on the original Ralph concept.

Project description

Ralph Workflow (Python)

Ralph Workflow is a Python 3.12+ CLI for unattended multi-agent development loops. The installable package lives in this directory and exposes two entry points:

  • ralph — the main CLI
  • ralph-mcp — the standalone MCP server runtime

Install

PyPI

pip install ralph-workflow
ralph --help

pipx

python -m pip install pipx
python -m pipx ensurepath
pipx install ralph-workflow
ralph --help

Development install

make dev
ralph --version

Refresh the runnable executable from this checkout

make install
ralph --version

make install updates the current Python environment and, when pipx is available, force-refreshes the pipx-managed ralph executable so it points at the current checkout instead of a stale deleted worktree.

Quick start

cd /path/to/your/project
ralph --init feature-spec
# edit PROMPT.md
ralph

Verification

make verify

That runs:

  • ruff check ralph/ tests/
  • mypy ralph/
  • pytest tests/ -v --cov=ralph --cov-report=term-missing --cov-report=html

For the dead-code policy tooling, run the separate Vulture audit:

make dead-code

It is intentionally separate from make verify while the current dead-code backlog still exists; today the command proves the scanner wiring by failing on the code that still needs cleanup.

Package map

  • ralph/cli/ — Typer CLI entry points and command plumbing
  • ralph/config/ — layered config loading and Pydantic models
  • ralph/pipeline/ — state, events, reducer, orchestrator, effects
  • ralph/phases/ — phase handlers and dispatch
  • ralph/agents/ — agent registry, chains, and invocation
  • ralph/mcp/ — MCP bridge, artifact handling, standalone server runtime
  • ralph/git/ — GitPython-backed repository helpers and rebase support
  • ralph/workspace/ — production and in-memory filesystem abstractions

Pydoc-first API reference

The public package docstrings are intended to stand on their own. Useful entry points:

python -m pydoc ralph
python -m pydoc ralph.cli
python -m pydoc ralph.pipeline
python -m pydoc ralph.mcp
python -m pydoc ralph.git
python -m pydoc ralph.workspace

Use package/module docstrings for API understanding and this README for workflow-level guidance.

Phase-output hardening

Ralph now treats several agent-driven phases as producing explicit evidence, not just a zero exit code.

  • development must leave behind a fresh .agent/artifacts/development_result.json.
  • review must leave behind a fresh .agent/artifacts/issues.json.
  • fix must leave behind a fresh .agent/artifacts/fix_result.json.
  • The runner removes those per-phase artifacts before each invocation so a later interrupted run cannot silently reuse stale output from an earlier pass.

This hardening is intentionally strict. It adds complexity, but it closes a real unattended-mode failure class where a provider could exit successfully, emit no meaningful work, and still let the pipeline advance because an old artifact was still present on disk.

Claude/CCS MCP safety note

Claude-compatible transports such as claude and ccs run through a stricter MCP path. Ralph still uses --mcp-config plus --strict-mcp-config, but it only emits --tools "" / --allowedTools ... when live MCP tool discovery succeeds with a non-empty allowlist. That avoids a brittle edge case in non-interactive Claude/CCS runs where empty-tool configurations and MCP bootstrapping can produce misleadingly successful no-op executions.

Parallel mode

When your planning phase produces two or more work units, Ralph fans development out across multiple git worktrees simultaneously. Configure it in your pipeline policy:

[pipeline.parallel_execution]
max_parallel_workers = 4
max_work_units = 50

See docs/agents/parallelization.md for the full guide.

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

ralph_workflow-0.8.0b1.tar.gz (297.2 kB view details)

Uploaded Source

Built Distribution

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

ralph_workflow-0.8.0b1-py3-none-any.whl (423.9 kB view details)

Uploaded Python 3

File details

Details for the file ralph_workflow-0.8.0b1.tar.gz.

File metadata

  • Download URL: ralph_workflow-0.8.0b1.tar.gz
  • Upload date:
  • Size: 297.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for ralph_workflow-0.8.0b1.tar.gz
Algorithm Hash digest
SHA256 a7d28acfb933508b807dd01498c4b13ff1a3f9974475e7a1c3ed7151b643831d
MD5 ff27ef4ddd07bd6692b01976697925de
BLAKE2b-256 f99e4ccbb190ae9e457bd803d16b936f38d7437610d0e446e291eca3f524b75c

See more details on using hashes here.

File details

Details for the file ralph_workflow-0.8.0b1-py3-none-any.whl.

File metadata

File hashes

Hashes for ralph_workflow-0.8.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 bc2f41cee63403b718f437530582637c2cd09a062f9de72244fa5bcb723bfc8a
MD5 6125efccb45b5263ccdf1df38e39720f
BLAKE2b-256 5f8ff509817c6f2751da9ca778a1459cf92233116fd6c047e671647b141654ea

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