Skip to content

Compile supported workflows into external agent frameworks (LangGraph, smolagents) #98

@cmccomb

Description

@cmccomb

Summary: Add an opt-in compiler/export layer that turns supported Workflow and CompiledExecution graphs into equivalent artifacts for external agent frameworks such as LangGraph and smolagents.

Why:

  • Author study workflows once in design_research_agents.workflow, then run the same logic in other agent ecosystems.
  • Make interoperability and cross-framework benchmarking easier without hand-rewriting nodes, edges, and state handoff rules.
  • Reuse framework-specific tooling and runtime surfaces while keeping this repo's workflow-first API as the source of truth.

Tasks:

  • Define a small public compiler/adapter surface for exporting supported workflow graphs.
  • Start with a clearly documented supported subset of deterministic workflow semantics and reject unsupported features with clear validation errors.
  • Implement a LangGraph compiler that maps workflow steps and dependencies into a StateGraph or equivalent runnable.
  • Implement a smolagents compiler/adapter for the subset that can be represented there, even if that requires a wrapper around framework-native agents/tools.
  • Preserve enough metadata to keep ExecutionResult provenance, step IDs, and tracing correlation intelligible after compilation.
  • Add parity tests and examples showing the same internal workflow compiled into both frameworks.

Acceptance Criteria:

  • A user can export a supported workflow into LangGraph and smolagents from a documented public entry point.
  • Unsupported step types or control-flow semantics fail fast with explicit validation messages.
  • Examples and docs show the supported subset, dependency extras, and known behavior differences.
  • Tests cover equivalence for at least one linear workflow and one branched workflow within the supported subset.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions