Azure Functions Durable Graph¶
Manifest-first graph runtime for Azure Functions with Durable Functions orchestration.
azure-functions-durable-graph compiles graph-shaped workflows into Azure Functions
applications that run on Durable Functions without violating orchestrator determinism.
All user logic (LLM calls, tool invocations, routing decisions) executes in activities,
keeping the orchestrator replay-safe.
5-second rule
Define your graph with ManifestBuilder, register it with DurableGraphApp,
and get a full HTTP API for starting runs, polling status, and injecting events.
Quick Copy-Paste Example¶
from pydantic import BaseModel
from azure_functions_durable_graph import DurableGraphApp, ManifestBuilder
class MyState(BaseModel):
message: str
processed: bool = False
def process(state: MyState) -> dict:
return {"processed": True}
def finalize(state: MyState) -> dict:
return {"message": f"Done: {state.message}"}
builder = ManifestBuilder(graph_name="my_graph", state_model=MyState)
builder.set_entrypoint("process")
builder.add_node("process", process, next_node="finalize")
builder.add_node("finalize", finalize, terminal=True)
runtime = DurableGraphApp()
runtime.register_registration(builder.build())
app = runtime.function_app
What you get¶
POST /api/graphs/my_graph/runsstarts a Durable Functions orchestration.GET /api/runs/{instance_id}polls run status and final state.GET /api/healthlists registered graphs.GET /api/openapi.jsonreturns an OpenAPI document.
Determinism guarantee
The orchestrator only reads the manifest, calls activities, and waits for events. It never calls LLMs, tools, or performs network I/O.
Why teams use this package¶
- No plumbing: graph-to-Durable-Functions wiring is handled automatically.
- Replay-safe: orchestrator determinism is enforced by architecture, not discipline.
- Typed state: Pydantic v2 models for graph state with merge semantics.
- Human-in-the-loop: external event support for approval workflows.
- Versioned graphs: manifest-derived hash for safe deployments.
Feature Snapshot¶
Runtime capabilities¶
- Sequential node execution with automatic state merging.
- Conditional routing via
RouteDecision. - External event injection and resume (
wait_for_event). - Graph cancellation via HTTP endpoint.
- Minimal OpenAPI document generation.
Developer experience¶
ManifestBuilderfluent API for declaring graphs.GraphManifestwith version and manifest-derived hash.DurableGraphAppwires everything into Azure Functions automatically.
Where to go next¶
- Start with Quickstart.
- Learn the manifest builder in Configuration.
- See full patterns in Usage.
- Browse the support agent example in Examples.
- Explore public APIs in API Reference.
Compatibility¶
- Python 3.10+
- Azure Functions Python v2 programming model
- Azure Durable Functions
- Pydantic v2
For dependency setup details, see Installation.
Need help?¶
- Common fixes: Troubleshooting
- Frequent questions: FAQ
- Contribution workflow: Guidelines