Skip to content

Conversation

@saurabhjain1592
Copy link
Member

Summary

Adds Workflow Control Plane support to the Python SDK, enabling governance gates at workflow step transitions for external orchestrators.

Features

  • Workflow control methods: create_workflow, get_workflow, step_gate, etc.
  • LangGraph adapter (AxonFlowLangGraphAdapter) for simplified integration
  • WorkflowBlockedError and WorkflowApprovalRequiredError exceptions
  • Full async support

New Files

  • axonflow/workflow.py - Pydantic models for workflow types
  • axonflow/adapters/langgraph.py - LangGraph adapter
  • axonflow/adapters/__init__.py - Adapter exports

Usage

from axonflow import AxonFlow
from axonflow.workflow import CreateWorkflowRequest, StepGateRequest, StepType

async with AxonFlow(endpoint="http://localhost:8080") as client:
    # Create workflow
    workflow = await client.create_workflow(
        CreateWorkflowRequest(workflow_name="my-pipeline")
    )
    
    # Check gate
    gate = await client.step_gate(
        workflow.workflow_id, "step-1",
        StepGateRequest(step_name="Generate", step_type=StepType.LLM_CALL)
    )
    
    if gate.is_allowed():
        # Execute step
        await client.mark_step_completed(workflow.workflow_id, "step-1")

Test plan

  • Unit tests pass
  • Test coverage >80%
  • Import works correctly
  • LangGraph adapter works

Related to getaxonflow/axonflow-enterprise#834

Adds workflow control plane methods and LangGraph adapter for governance
gates at workflow step transitions.

## Features
- Workflow control methods: create_workflow, get_workflow, step_gate, etc.
- LangGraph adapter (AxonFlowLangGraphAdapter) for simplified integration
- WorkflowBlockedError and WorkflowApprovalRequiredError exceptions

## New Files
- axonflow/workflow.py - Pydantic models for workflow types
- axonflow/adapters/langgraph.py - LangGraph adapter
- axonflow/adapters/__init__.py - Adapter exports

Related to getaxonflow/axonflow-enterprise#834
@saurabhjain1592 saurabhjain1592 merged commit 20c4ecd into main Jan 17, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants