- langgraph_agent_toolkit.service.handler.lifespan(app)[source][source]
Create a lifespan context manager for the FastAPI app.
- Parameters:
app (FastAPI)
- Return type:
AsyncGenerator[None, None]
- langgraph_agent_toolkit.service.handler.custom_generate_unique_id(route)[source][source]
Use the route’s function name as its OpenAPI operationId.
Yields idiomatic operationIds for client codegen (e.g.
invokeinstead of FastAPI’s defaultinvoke_invoke_post). Routes that share a function (the/{agent_id}/...variant and its default alias) set an explicitoperation_idon the/{agent_id}/...decorator to stay unique.- Parameters:
route (APIRoute)
- Return type: