feat(actor): compile hierarchical actor configs to LangGraph #411

Merged
freemo merged 1 commits from feature/m3-actor-compiler into master 2026-02-24 18:32:04 +00:00
Owner

Summary

Adds the ActorCompiler module that translates hierarchical GRAPH-type actor YAML configurations into executable LangGraph StateGraph node/edge structures with LSP bindings applied per node. This enables PlanExecutor to run compiled actor graphs through the tool runtime using action-configured roles.

Changes

  • src/cleveragents/actor/compiler.py: Core ActorCompiler with compile_actor() entry point. Translates ActorConfigSchema definitions into NodeConfig/Edge structures with LSP binding metadata. Includes subgraph resolution with cross-actor cycle detection, entry/exit validation, and CompilationMetadata output for diagnostics and CLI inspection.
  • src/cleveragents/actor/__init__.py: Exported new compiler types.
  • Documentation: Added docs/reference/actor_compiler.md covering the compilation pipeline, node binding, and error modes.
  • Tests: 13 Behave scenarios (features/actor_compiler.feature with features/steps/actor_compiler_steps.py) covering compile success/failure, subgraph resolution, and node wiring validation. 4 Robot Framework smoke tests (robot/actor_compiler.robot) for compiling and running multi-node actor graphs. ASV performance benchmarks (benchmarks/actor_compiler_bench.py) for compile overhead.
  • vulture_whitelist.py: Whitelisted new public API symbols.

Closes #158

## Summary Adds the `ActorCompiler` module that translates hierarchical GRAPH-type actor YAML configurations into executable LangGraph `StateGraph` node/edge structures with LSP bindings applied per node. This enables `PlanExecutor` to run compiled actor graphs through the tool runtime using action-configured roles. ### Changes - **`src/cleveragents/actor/compiler.py`**: Core `ActorCompiler` with `compile_actor()` entry point. Translates `ActorConfigSchema` definitions into `NodeConfig`/`Edge` structures with LSP binding metadata. Includes subgraph resolution with cross-actor cycle detection, entry/exit validation, and `CompilationMetadata` output for diagnostics and CLI inspection. - **`src/cleveragents/actor/__init__.py`**: Exported new compiler types. - **Documentation**: Added `docs/reference/actor_compiler.md` covering the compilation pipeline, node binding, and error modes. - **Tests**: 13 Behave scenarios (`features/actor_compiler.feature` with `features/steps/actor_compiler_steps.py`) covering compile success/failure, subgraph resolution, and node wiring validation. 4 Robot Framework smoke tests (`robot/actor_compiler.robot`) for compiling and running multi-node actor graphs. ASV performance benchmarks (`benchmarks/actor_compiler_bench.py`) for compile overhead. - **`vulture_whitelist.py`**: Whitelisted new public API symbols. Closes #158
freemo added this to the v3.1.0 milestone 2026-02-24 10:29:17 +00:00
freemo added the
Type
Feature
label 2026-02-24 10:29:44 +00:00
freemo force-pushed feature/m3-actor-compiler from ed35d25946 to 59cccd94f4 2026-02-24 14:01:58 +00:00 Compare
freemo force-pushed feature/m3-actor-compiler from 59cccd94f4 to 882251b858 2026-02-24 14:04:37 +00:00 Compare
freemo force-pushed feature/m3-actor-compiler from 882251b858 to 76b087e9ca 2026-02-24 14:05:52 +00:00 Compare
freemo added a new dependency 2026-02-24 14:22:14 +00:00
freemo scheduled this pull request to auto merge when all checks succeed 2026-02-24 14:24:16 +00:00
freemo self-assigned this 2026-02-24 14:27:22 +00:00
freemo force-pushed feature/m3-actor-compiler from 76b087e9ca to c47e6445d0 2026-02-24 17:57:20 +00:00 Compare
freemo merged commit c47e6445d0 into master 2026-02-24 18:32:04 +00:00
freemo deleted branch feature/m3-actor-compiler 2026-02-24 18:32:05 +00:00
freemo added the
State
Completed
label 2026-03-04 00:58:28 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Reference: cleveragents/cleveragents-core#411