langgraph_agent_toolkit.service.factory module
- langgraph_agent_toolkit.service.factory.create_app()[source][source]
Load the application when needed, after worker imports complete.
- Return type:
FastAPI
- class langgraph_agent_toolkit.service.factory.ServiceRunner(custom_settings=None)[source][source]
Bases:
objectRun the API service with different runners.
Supports Uvicorn, Gunicorn, Mangum for AWS Lambda, and Azure Functions.
Initialize the ServiceRunner.
- Parameters:
custom_settings (Dict[str, Any] | None) – Optional settings that override default settings.
- __init__(custom_settings=None)[source][source]
Initialize the ServiceRunner.
- Parameters:
custom_settings (Dict[str, Any] | None) – Optional settings that override default settings.
- run_gunicorn(**kwargs)[source][source]
Run the API service with gunicorn.
- Parameters:
**kwargs – Arguments for gunicorn.
- run_azure_functions(**kwargs)[source][source]
Return an Azure HTTP handler. Call aclose() before the event loop stops.
- async aclose()[source][source]
Stop the Azure ASGI lifespan and release its resources.
- Return type:
None
- run(runner_type=RunnerType.UVICORN, **kwargs)[source][source]
Run the API service with the selected runner type.
- Parameters:
runner_type (RunnerType) – Runner type.
**kwargs – Arguments for the runner.