Azure Functions LangGraph¶
Deploy LangGraph agents as Azure Functions HTTP endpoints with zero boilerplate.
Alpha Notice — This package is in early development (
0.1.0a0). APIs may change without notice between releases.
What it does¶
- Zero-boilerplate deployment — register a compiled graph, get HTTP endpoints automatically
- Invoke endpoint —
POST /api/graphs/{name}/invokefor synchronous execution - Stream endpoint —
POST /api/graphs/{name}/streamfor buffered SSE responses - Health endpoint —
GET /api/healthlisting registered graphs with checkpointer status - Protocol-based — works with any object that has
invoke()andstream()methods - Checkpointer pass-through — thread-based conversation state via LangGraph's native config
Quick example¶
from langgraph.graph import END, START, StateGraph
from typing_extensions import TypedDict
from azure_functions_langgraph import LangGraphApp
class AgentState(TypedDict):
messages: list[dict[str, str]]
def chat(state: AgentState) -> dict:
user_msg = state["messages"][-1]["content"]
return {"messages": state["messages"] + [{"role": "assistant", "content": f"Echo: {user_msg}"}]}
builder = StateGraph(AgentState)
builder.add_node("chat", chat)
builder.add_edge(START, "chat")
builder.add_edge("chat", END)
graph = builder.compile()
app = LangGraphApp()
app.register(graph=graph, name="echo_agent")
func_app = app.function_app
This gives you:
POST /api/graphs/echo_agent/invoke— invoke the agentPOST /api/graphs/echo_agent/stream— stream agent responses (buffered SSE)GET /api/health— health check
Next steps¶
- Installation — install the package
- Quickstart — build your first agent endpoint
- Usage Guide — detailed endpoint reference
- API Reference — full API documentation
Ecosystem¶
Part of the Azure Functions Python DX Toolkit:
| Package | Role |
|---|---|
| azure-functions-validation | Request and response validation |
| azure-functions-openapi | OpenAPI spec and Swagger UI |
| azure-functions-logging | Structured logging and observability |
| azure-functions-langgraph | LangGraph agent deployment |
| azure-functions-durable-graph | Manifest-first graph runtime with Durable Functions |