Skip to main content

Reinforcement-learning driven alignment engine for OpenClaw workflows

Project description

OpenClaw Alignment System

Reinforcement-learning driven workflow alignment engine (Actor-Critic)

English | 简体中文

Features

  • Actor-Critic RL core pipeline
  • Four-dimensional reward system (objective/behavior/explicit/pattern)
  • Optional Phase3 modules (distributed training, tuning, monitoring, performance)
  • Contract drift guards (state/action dimensions + docs consistency)
  • Cross-platform support: Windows / macOS / Linux

Support Matrix

  • Python: 3.10, 3.11, 3.12, 3.13
  • OS: Windows, macOS, Linux

Installation

1) PyPI (Recommended)

pip install openclaw-alignment

Optional Phase3 extras:

pip install "openclaw-alignment[phase3]"

2) Install from source

git clone https://github.com/412984588/openclaw-alignment.git
cd openclaw-alignment
python3 scripts/install.py

Development install:

python3 scripts/install.py --dev --editable

Quick Verification

python3 -m pytest tests/ -v
python3 scripts/check_docs_consistency.py
openclaw-alignment --help

Architecture

Core (Phase 1-2)

  • lib/reward.py: reward calculation engine
  • lib/environment.py: interaction environment
    • State: State data class (17 dimensions)
    • Action: Action data class (11 dimensions)
  • lib/agent.py: Actor-Critic agent
  • lib/learner.py: online learner
  • lib/trainer.py: training loop
  • lib/contracts.py: single source of truth for dimensions

Optional (Phase 3)

  • lib/distributed_trainer.py
  • lib/hyperparameter_tuner.py
  • lib/monitoring.py
  • lib/performance_optimizer.py

Documentation

  • Architecture: docs/architecture.md
  • Reward model: docs/reward-model.md
  • Configuration: docs/configuration.md
  • Optional dependencies: docs/phase3-optional-deps.md
  • Contributing: CONTRIBUTING.md
  • Security: SECURITY.md
  • Support: SUPPORT.md

Test Coverage

  • Total Tests: 80
  • Pass Rate: 100%
  • Core RL + integration: 54 tests ✅
  • Phase 2: 1 test ✅
  • Phase 3: 21 tests ✅
  • Docs/contract drift guards: 4 tests ✅

Release and Versioning

  • Versioning: SemVer (stable branch: release/1.0.x)
  • Release runbook: RELEASING.md / RELEASING.zh-CN.md
  • Changelog: CHANGELOG.md

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

openclaw_alignment-1.0.0.tar.gz (79.4 kB view details)

Uploaded Source

Built Distribution

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

openclaw_alignment-1.0.0-py3-none-any.whl (59.4 kB view details)

Uploaded Python 3

File details

Details for the file openclaw_alignment-1.0.0.tar.gz.

File metadata

  • Download URL: openclaw_alignment-1.0.0.tar.gz
  • Upload date:
  • Size: 79.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for openclaw_alignment-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9833470a2dc36be0a35bfd0ef62da142c34412c88ccd06478ab609abda9706bf
MD5 914c6c7f1965ec321856feac9000cf08
BLAKE2b-256 3bcb68474cdd3ca30c98e85b03526a578d90783ac6273d4f9ee5b801ce26e336

See more details on using hashes here.

File details

Details for the file openclaw_alignment-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openclaw_alignment-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16f744d76a71d46a101e19d555eb07366bafad9d5ee57846e7c340dd160e2a60
MD5 8ca9b3bb2671b681ab274396e01bd83b
BLAKE2b-256 5e09d16211023a991ae6d5d373d3e767c97bc2edd7c25ed7627f7e19b814a59a

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