### Start Documentation Development Server Source: https://github.com/langflow-ai/langflow/blob/main/AGENTS.md Install dependencies and start a local development server for the project's documentation. The server runs on port 3000, or 3001 if 3000 is occupied. ```bash cd docs yarn install yarn start ``` -------------------------------- ### Build and Serve Documentation Source: https://github.com/langflow-ai/langflow/blob/main/DEVELOPMENT.md Steps to install dependencies and start the Docusaurus documentation server for local preview. ```bash cd docs npm install npm run start ``` -------------------------------- ### Start local development server Source: https://github.com/langflow-ai/langflow/blob/main/docs/README.md Starts a local development server with live reloading. ```bash $ npm run start ``` -------------------------------- ### Run Simple Agent Example Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Command to run the simple agent flow with verbose output. Ensure Langflow dependencies are installed and the OpenAI API key is configured. ```bash uv run lfx run simple_agent.py "How are you?" --verbose ``` -------------------------------- ### Install dependencies Source: https://github.com/langflow-ai/langflow/blob/main/docs/README.md Run this command to install the necessary project dependencies. ```bash $ npm install ``` -------------------------------- ### LFX Server Startup Output Example Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Example output from `lfx serve` indicating a successful flow deployment. It provides the server address, API key, and the specific endpoint for running the flow with its `flow_id`. ```text ╭───────────────────────────── LFX Server ─────────────────────────────╮ │ 🎯 Single Flow Served Successfully! │ │ │ │ Source: /Users/mendonkissling/Downloads/simple-agent-flow.json │ │ Server: http://127.0.0.1:8000 │ │ API Key: sk-... │ │ │ │ Send POST requests to: │ http://127.0.0.1:8000/flows/c1dab29d-3364-58ef-8fef-99311d32ee42/run │ │ │ │ With headers: │ x-api-key: sk-... │ │ │ │ Or query parameter: │ ?x-api-key=sk-... │ │ │ │ Request body: │ {'input_value': 'Your input message'} │ ``` -------------------------------- ### Service Registration Example Source: https://github.com/langflow-ai/langflow/blob/main/docs/agents/ARCHITECTURE.md Illustrates how services should be registered using a factory pattern. ```python services/base.Service ``` ```python services/factory.py ``` -------------------------------- ### Install LFX from PyPI Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Install the LFX package using 'uv pip'. This command installs the stable version of LFX. ```bash uv pip install lfx ``` -------------------------------- ### Navigate to Docker Example Directory Source: https://github.com/langflow-ai/langflow/blob/main/docker_example/README.md Change your current directory to the docker_example folder within the cloned LangFlow repository. ```sh cd langflow/docker_example ``` -------------------------------- ### Component Loading Example Source: https://github.com/langflow-ai/langflow/blob/main/docs/agents/ARCHITECTURE.md Shows the correct approach for handling vendor-specific components by using a component registry, avoiding direct imports into langflow-base. ```python from langflow.components.openai import ... ``` -------------------------------- ### Install LFX Nightly from PyPI Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Install the latest nightly version of LFX using 'uv pip'. Use this for the most recent features or bug fixes. ```bash uv pip install lfx-nightly ``` -------------------------------- ### Install Langflow testing dependencies Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/src/lfx/templates/README.md Install the necessary testing extras to enable integration testing capabilities. ```bash pip install "langflow-sdk[testing]" ``` -------------------------------- ### Run Frontend in Development Mode Source: https://github.com/langflow-ai/langflow/blob/main/AGENTS.md Starts the Vite development server for the frontend on port 3000 with hot-reloading. ```bash make frontend ``` -------------------------------- ### Initialize Langflow Development Environment Source: https://github.com/langflow-ai/langflow/blob/main/AGENTS.md Installs all project dependencies and pre-commit hooks required for development. ```bash make init ``` -------------------------------- ### Create and Activate Virtual Environment for LFX Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Create a virtual environment using 'uv' and activate it. This is recommended for installing LFX from PyPI. ```bash uv venv lfx-venv source lfx-venv/bin/activate ``` -------------------------------- ### Install Langflow Locally Source: https://github.com/langflow-ai/langflow/blob/main/README.md Installs the latest Langflow package using uv. Requires Python 3.10-3.13. ```shell uv pip install langflow -U ``` -------------------------------- ### Run Backend with Dynamic Component Loading Source: https://github.com/langflow-ai/langflow/blob/main/AGENTS.md Starts the backend with dynamic component loading enabled, useful for component development. Specify modules to load. ```bash LFX_DEV=1 make backend ``` ```bash LFX_DEV=mistral,openai make backend ``` -------------------------------- ### Initialize Langflow Development Environment Source: https://github.com/langflow-ai/langflow/blob/main/DEVELOPMENT.md Sets up the development environment by installing backend and frontend dependencies and pre-commit hooks. This command orchestrates several make sub-commands to ensure all necessary components are installed and configured. ```bash make init ``` -------------------------------- ### Dependency Rule Example: Good Practice Source: https://github.com/langflow-ai/langflow/blob/main/docs/agents/ARCHITECTURE.md Illustrates the preferred method of handling dependencies by defining an interface in lfx and injecting the implementation from langflow. ```python lfx.interfaces.SessionProvider ``` -------------------------------- ### API Versioning Example Source: https://github.com/langflow-ai/langflow/blob/main/docs/agents/ARCHITECTURE.md Shows the structure for API versioning, with v1 for stable endpoints and v2 for active redesigns. ```python api/v1/ ``` ```python api/v2/ ``` ```python api/router.py ``` -------------------------------- ### Start Langflow Frontend Service Source: https://github.com/langflow-ai/langflow/blob/main/DEVELOPMENT.md Command to start the Node.js frontend development server, typically accessible on port 3000. ```bash make frontend ``` -------------------------------- ### Run Docker Compose Source: https://github.com/langflow-ai/langflow/blob/main/docker_example/README.md Start LangFlow and its associated PostgreSQL database using Docker Compose. ```sh docker compose up ``` -------------------------------- ### Run Backend in Development Mode Source: https://github.com/langflow-ai/langflow/blob/main/AGENTS.md Starts the FastAPI backend server on port 7860 with hot-reloading enabled. ```bash make backend ``` -------------------------------- ### Install Flow Dependencies Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Installs the necessary Python packages for a Langflow flow, such as those used by the simple agent template. This command should be run after identifying missing dependencies. ```bash uv pip install "langchain~=0.3.23" "langchain-core<1.0.0" "langchain-community" "langchain-openai" "langchain-text-splitters" beautifulsoup4 lxml requests ``` -------------------------------- ### Install Langflow Pre-commit Hooks Source: https://github.com/langflow-ai/langflow/blob/main/DEVELOPMENT.md Installs pre-commit hooks to help maintain code quality and formatting. After installation, Git commit commands need to be run within the Python environment using 'uv run'. ```bash uv sync uv run pre-commit install ``` -------------------------------- ### Serve Flow with LFX using uvx Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Run LFX to serve a flow using 'uvx'. This command downloads and executes LFX in a temporary environment without installation. ```bash uvx lfx serve simple-agent-flow.json ``` -------------------------------- ### Serve Flow with .env File Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Starts the Langflow API server using `lfx serve`, loading configuration and API keys from a specified `.env` file. This is the recommended method for managing sensitive credentials. ```bash uv run lfx serve simple-agent-flow.json --env-file .env ``` ```bash uv run lfx serve simple-agent-flow.json --env-file /path/to/.env ``` -------------------------------- ### Manage Test Environment Setup Source: https://github.com/langflow-ai/langflow/blob/main/src/backend/tests/locust/README.md Python scripts to initialize the testing environment by selecting flows, generating credentials, and uploading starter projects. ```python # Interactive flow selection python langflow_setup_test.py --interactive # Use specific flow python langflow_setup_test.py --flow "Memory Chatbot" # List available flows python langflow_setup_test.py --list-flows ``` -------------------------------- ### Run Langflow Locally Source: https://github.com/langflow-ai/langflow/blob/main/README.md Starts the Langflow application. Accessible at http://127.0.0.1:7860. ```shell uv run langflow run ``` -------------------------------- ### Run Langflow with Docker Source: https://github.com/langflow-ai/langflow/blob/main/README.md Starts a Langflow container with default settings. Accessible at http://localhost:7860. ```shell docker run -p 7860:7860 langflowai/langflow:latest ``` -------------------------------- ### View UV Resolver Resolution for Torch Source: https://github.com/langflow-ai/langflow/blob/main/docs/TORCH_MACOS_AMD64_PYTHON313_INVESTIGATION.md Example output from the uv lockfile showing how the resolver attempts to select torch versions for different platforms. ```text torch 2.2.2 → Python < 3.13, macOS x86_64 (has wheels: cp310, cp311, cp312) torch 2.2.2+cpu → Python >= 3.13, macOS x86_64 (NO WHEELS listed!) torch 2.10.0 → macOS arm64 (all Python versions) torch 2.10.0+cpu → Linux/Windows (all Python versions) ``` -------------------------------- ### Define Plugin Services in pyproject.toml Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/PLUGGABLE_SERVICES.md For plugin developers, specify your services in the pyproject.toml file under the [project.entry-points."lfx.services"] section for automatic discovery upon installation. ```toml [project.entry-points."lfx.services"] database_service = "my_plugin.services:MyDatabaseService" storage_service = "my_plugin.services:MyStorageService" ``` -------------------------------- ### Example: Adding a New Required Field with Python Source: https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/alembic/DB-MIGRATION-GUIDE.MD Provides a three-phase migration example for adding a new required field ('email_verified') to a 'user' table. It covers the EXPAND phase (adding the column), MIGRATE phase (backfilling data), and CONTRACT phase (making the column non-nullable). ```python # Migration 1: EXPAND (Day 1) def upgrade_expand(): op.add_column('user', sa.Column('email_verified', sa.Boolean(), nullable=True, server_default='false')) # Migration 2: MIGRATE (Day 30, after all services updated) def upgrade_migrate(): # Backfill any NULL values op.execute("UPDATE user SET email_verified = false WHERE email_verified IS NULL") # Migration 3: CONTRACT (Day 60, after verification) def upgrade_contract(): op.alter_column('user', 'email_verified', nullable=False) ``` -------------------------------- ### Component Test Base Class Example Source: https://github.com/langflow-ai/langflow/blob/main/docs/agents/TESTING.md Demonstrates how to create a test for a custom component using `ComponentTestBaseWithClient`. This includes defining the component class, default keyword arguments, and a mapping of component file names across different Langflow versions. ```python from tests.base import ComponentTestBaseWithClient, VersionComponentMapping, DID_NOT_EXIST from langflow.components.my_namespace import MyComponent class TestMyComponent(ComponentTestBaseWithClient): @pytest.fixture def component_class(self): return MyComponent @pytest.fixture def default_kwargs(self): return {"foo": "bar"} @pytest.fixture def file_names_mapping(self): return [ VersionComponentMapping(version="1.1.1", module="my_module", file_name="my_component.py"), VersionComponentMapping(version="1.0.19", module="my_module", file_name=DID_NOT_EXIST), ] ``` -------------------------------- ### Serve Flow with Exported Variables Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Starts the Langflow API server using `lfx serve` when environment variables have been previously exported. The server automatically picks up these variables. ```bash uv run lfx serve simple-agent-flow.json ``` -------------------------------- ### Start Langflow Backend Service Source: https://github.com/langflow-ai/langflow/blob/main/DEVELOPMENT.md Commands to initiate the FastAPI backend service. Includes options for standard startup and dynamic component loading for development workflows. ```bash make backend ``` ```bash LFX_DEV=1 make backend ``` ```bash LFX_DEV=mistral,openai,anthropic make backend ``` -------------------------------- ### Run Flow to Identify Dependencies Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Executes a flow using `lfx run` to identify and report any missing dependencies required for its components. These dependencies must be installed before serving the flow. ```bash uv run lfx run simple-agent-flow.json "test input" ``` -------------------------------- ### Install Load Testing Dependencies Source: https://github.com/langflow-ai/langflow/blob/main/src/backend/tests/locust/README.md Prerequisites for running the load testing suite, requiring locust and httpx packages. ```bash # Using uv (recommended) uv add locust httpx # Or using pip pip install locust httpx ``` -------------------------------- ### Example: Replacing a Column with Python Source: https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/alembic/DB-MIGRATION-GUIDE.MD Demonstrates a two-phase migration for replacing a column ('status_text' with 'status_code'). Phase 1 adds the new column and copies data from the old one. Phase 2 removes the old column after a transition period. ```python # Migration 1: Add new column def upgrade_phase1(): op.add_column('order', sa.Column('status_code', sa.Integer(), nullable=True)) # Copy data from old column op.execute(""" UPDATE order SET status_code = CASE status_text WHEN 'pending' THEN 1 WHEN 'processing' THEN 2 WHEN 'complete' THEN 3 ELSE 0 END """) # Migration 2: Remove old column (after transition period) def upgrade_phase2(): op.drop_column('order', 'status_text') ``` -------------------------------- ### Configure Component Categories with Allowlist Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Example of setting the LANGFLOW_COMPONENT_CATEGORY_ALLOWLIST environment variable to restrict loaded component categories. This is applied when starting Langflow services. ```bash export LANGFLOW_COMPONENT_CATEGORY_ALLOWLIST="openai,anthropic,google,processing,input_output" uv run lfx serve my_flow.json ``` -------------------------------- ### Test deployment locally Source: https://github.com/langflow-ai/langflow/blob/main/docs/README.md Build and serve the site locally to verify versioning changes. ```bash npm run build npm run serve ``` -------------------------------- ### GET /api/v1/monitor/messages/shared Source: https://github.com/langflow-ai/langflow/blob/main/src/frontend/src/components/authorization/playgroundAuthGate/docs/shareable-playground-session-persistence.md Retrieves messages for a shared flow, with optional filtering and ordering. ```APIDOC ## GET /api/v1/monitor/messages/shared ### Description Get messages for a shared flow, scoped to the authenticated user. ### Method GET ### Endpoint /api/v1/monitor/messages/shared ### Parameters #### Query Parameters - **source_flow_id** (UUID) - Required - The original public flow ID - **session_id** (string) - Optional - Filter by session - **order_by** (string) - Optional - Allowed: timestamp, sender, sender_name, session_id, text (default: timestamp) ### Response #### Success Response (200) - **Array** (object) - List of message objects #### Response Example [ { "id": "uuid", "flow_id": "virtual-uuid", "session_id": "Session Apr 06, 17:59:38", "text": "Hello!", "sender": "User", "sender_name": "User", "timestamp": "2026-04-06 17:59:38 UTC", "properties": { "build_duration": 1800, "usage": { "total_tokens": 49, "input_tokens": 33, "output_tokens": 16 }, "state": "complete" } } ] ``` -------------------------------- ### Recommended adapter file structure Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/PLUGGABLE_SERVICES.md Standard directory layout for namespacing adapter implementations within the LFX service structure. ```text lfx/services/ adapters/ deployment/ __init__.py base.py service.py exceptions.py schema.py ``` -------------------------------- ### GET /api/v1/monitor/messages/shared/sessions Source: https://github.com/langflow-ai/langflow/blob/main/src/frontend/src/components/authorization/playgroundAuthGate/docs/shareable-playground-session-persistence.md Retrieves a list of session IDs for a specific shared flow. ```APIDOC ## GET /api/v1/monitor/messages/shared/sessions ### Description List session IDs for a shared flow, scoped to the authenticated user. ### Method GET ### Endpoint /api/v1/monitor/messages/shared/sessions ### Parameters #### Query Parameters - **source_flow_id** (UUID) - Required - The original public flow ID from the URL ### Response #### Success Response (200) - **Array** (string) - List of session IDs #### Response Example ["session-1", "Session Apr 06, 17:59:38"] ``` -------------------------------- ### Format All Code Source: https://github.com/langflow-ai/langflow/blob/main/AGENTS.md Runs both backend and frontend code formatting. ```bash make format ``` -------------------------------- ### LFX API Response Schema Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Example of a successful JSON response from the LFX server. ```json { "result": "Hello world! 👋\n\nHow can I help you today? If you have any questions or need assistance, just let me know!", "success": true, "logs": "\n\n\u001b[1m> Entering new None chain...\u001b[0m\n\u001b[32;1m\u001b[1;3mHello world! 👋\n\nHow can I help you today?...\u001b[0m\n\n\u001b[1m> Finished chain.\u001b[0m\n", "type": "message", "component": "Chat Output" } ``` -------------------------------- ### Flow Testing with Build Utilities Source: https://github.com/langflow-ai/langflow/blob/main/docs/agents/TESTING.md Demonstrates using helper functions from `tests/unit/build_utils.py` to create, build, and retrieve events for a flow. ```python from tests.unit.build_utils import create_flow, build_flow, get_build_events flow_id = await create_flow(client, json_flow, logged_in_headers) build_response = await build_flow(client, flow_id, logged_in_headers) events_response = await get_build_events(client, job_id, logged_in_headers) ``` -------------------------------- ### GET /api/v1/agentic/check-config Source: https://github.com/langflow-ai/langflow/blob/main/docs/features/langflow-assistant.md Checks if the assistant is properly configured and returns available providers and models. ```APIDOC ## GET /api/v1/agentic/check-config ### Description Check if assistant is properly configured and return available providers. ### Method GET ### Endpoint /api/v1/agentic/check-config ### Response #### Success Response (200) - **configured** (boolean) - Whether the assistant is configured - **configured_providers** (array) - List of configured provider names - **providers** (array) - Detailed list of providers and their models - **default_provider** (string) - The default provider name - **default_model** (string) - The default model name ``` -------------------------------- ### Component File Path Structure Source: https://github.com/langflow-ai/langflow/blob/main/docs/agents/CONTRACTS.md Shows the expected file path structure for components. Renames are breaking; use `legacy = True` and `replacement` for migration. ```python src/lfx/src/lfx/components//.py ``` -------------------------------- ### Configuring adapters in TOML files Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/PLUGGABLE_SERVICES.md Maps adapter keys to implementation paths in configuration files. ```toml [deployment.adapters] local = "my_package.deployment:LocalAdapter" remote = "my_package.deployment:RemoteAdapter" ``` ```toml [tool.lfx.deployment.adapters] local = "my_package.deployment:LocalAdapter" remote = "my_package.deployment:RemoteAdapter" ``` -------------------------------- ### GET /api/v1/agentic/check-config Response (Success) Source: https://github.com/langflow-ai/langflow/blob/main/docs/features/langflow-assistant.md Returns the configuration status of the assistant, including available providers and their models. ```json { "configured": true, "configured_providers": ["openai", "anthropic"], "providers": [ { "name": "openai", "configured": true, "default_model": "gpt-4o", "models": [ {"name": "gpt-4o", "display_name": "GPT-4o"}, {"name": "gpt-4-turbo", "display_name": "GPT-4 Turbo"} ] } ], "default_provider": "openai", "default_model": "gpt-4o" } ``` -------------------------------- ### Langflow Development Commands Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Common commands for developing Langflow, including installing dependencies, running tests, and formatting code. ```bash # Install development dependencies make dev ``` ```bash # Run tests make test ``` ```bash # Format code make format ``` -------------------------------- ### Configure GPU-Accelerated Panel Transitions Source: https://github.com/langflow-ai/langflow/blob/main/docs/features/langflow-assistant.md Apply these transition properties to the assistant panel container to enable GPU acceleration and prevent layout thrashing. ```typescript containerClasses ``` -------------------------------- ### Cross-cutting Change Protocol: Pydantic Model Source: https://github.com/langflow-ai/langflow/blob/main/docs/agents/ARCHITECTURE.md Example of updating a pydantic model for a cross-cutting change, located in the API schemas. ```python langflow/api/v{1,2}/schemas.py ``` -------------------------------- ### Dependency Rule Example: Bad Import Source: https://github.com/langflow-ai/langflow/blob/main/docs/agents/ARCHITECTURE.md Demonstrates an incorrect import from langflow.services into lfx, violating the one-way dependency rule. ```python from langflow.services.deps import session_scope ``` -------------------------------- ### Bad Circular Service Dependency Example Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/PLUGGABLE_SERVICES.md This Python code demonstrates a bad practice of circular dependencies between services, which should be avoided. ```python class ServiceA(Service): def __init__(self, service_b: ServiceB): ... class ServiceB(Service): def __init__(self, service_a: ServiceA): ... ``` -------------------------------- ### Configure Services via lfx.toml Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/PLUGGABLE_SERVICES.md Use this TOML file in your project root to define services for the LFX framework when using the CLI. ```toml [services] database_service = "langflow.services.database.service:DatabaseService" storage_service = "langflow.services.storage.local:LocalStorageService" cache_service = "langflow.services.cache.service:ThreadingInMemoryCache" ``` -------------------------------- ### Clone Langflow Repository Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Clone the Langflow repository to access the LFX source code. This is one method for installing and running LFX. ```bash git clone https://github.com/langflow-ai/langflow ``` -------------------------------- ### Deploy website Source: https://github.com/langflow-ai/langflow/blob/main/docs/README.md Commands to deploy the website to GitHub pages using SSH or standard authentication. ```bash $ USE_SSH=true npm run deploy ``` ```bash $ GIT_USER= npm run deploy ``` -------------------------------- ### Configure Component Categories with Blocklist Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Example of setting the LANGFLOW_COMPONENT_CATEGORY_BLOCKLIST environment variable to exclude specific component categories. This is applied when running Langflow. ```bash export LANGFLOW_COMPONENT_CATEGORY_BLOCKLIST="prototypes,langchain_utilities" uv run lfx run my_flow.json "Hello" ``` -------------------------------- ### Run Backend Unit Tests Source: https://github.com/langflow-ai/langflow/blob/main/DEVELOPMENT.md Command to execute backend unit tests. This is a crucial step before committing to ensure code quality and functionality. ```bash make unit_tests ``` -------------------------------- ### Set Langflow API Key for LFX Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Set the LANGFLOW_API_KEY environment variable. This is required when running LFX without a local installation using 'uvx'. ```bash export LANGFLOW_API_KEY="sk..." ``` -------------------------------- ### Run integration tests against staging Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/src/lfx/templates/README.md Execute tests locally by providing the staging URL and API key via environment variables. ```bash LANGFLOW_URL=https://staging.langflow.example.com \ LANGFLOW_API_KEY= \ pytest tests/ -m integration ``` -------------------------------- ### Build static content Source: https://github.com/langflow-ai/langflow/blob/main/docs/README.md Generates static content into the build directory. ```bash $ npm run build ``` -------------------------------- ### Export Environment Variables Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/README.md Sets environment variables directly in the terminal session before starting the server. These variables are used by `lfx serve` to configure the API. ```bash export LANGFLOW_API_KEY="sk..." export OPENAI_API_KEY="sk-..." ``` -------------------------------- ### Accessing a deployment adapter Source: https://github.com/langflow-ai/langflow/blob/main/src/lfx/PLUGGABLE_SERVICES.md Retrieves a deployment adapter by its key. Returns None if the key is not found. ```python from lfx.services.deps import get_deployment_adapter adapter = get_deployment_adapter("local") # returns None if key is unknown ```