Hamza Rashid a9d913ae3f feat(lfx): add adapter registries (#11990)
* checkout subservice implementation

* improve tests (added one, removed dead code) and handling of conflicting namespace registries

* introduce subservice types to scope and validate subservice registries by

* remove strict issubclass checks

* rename the feature to "adapter registry"

* refactor to /adapter directory

* major refactor to use shared config helpers

* refactor: align adapter registry with service manager patterns

- Use asyncio.iscoroutine for teardown (matches ServiceManager)
- Two-tier entry point error handling (warning vs debug)
- Add config load logging after adapter discovery
- Remove _get_nested_section wrapper, call shared helper directly
- Remove deployment/registry.py thin wrapper
- Export DeploymentServiceProtocol from services/__init__
- Extract test stubs into shared adapter_test_helpers module
- Revert incorrect ValueError->TypeError in schema validators

* refactor: remove adapter registry staging dict, derive config by convention

Align adapter registry with the service manager's @register_service
pattern: decorators now write directly to the AdapterRegistry singleton
instead of buffering in a module-level staging dict.

- register_adapter calls get_adapter_registry() + register_class()
  directly, removing _decorator_adapter_registry and _decorator_lock
- get_adapter_registry derives entry_point_group and
  config_section_path from AdapterType by convention, making them
  optional parameters
- Remove _discover_from_decorators() since decorators are already
  registered before discover() runs
- Fix discover_plugins docstring that incorrectly claimed decorators
  had highest priority (config files do)
- Simplify _reset_registries, deps.py, test helpers, and docs

* move AdapterType enum to dedicated schema file in /adapters

* move config dir resolution to shared helper

* move import logic to a shared helper

* [autofix.ci] apply automated fixes

* Fix encapsulation, error handling, thread safety, and test gaps in adapter registry

  - Encapsulate AdapterRegistry internal state behind private attrs and
    read-only properties (adapter_type, entry_point_group, config_section_path,
    is_discovered, has_cached_instances)
  - Re-raise unexpected exceptions in register_adapter decorator instead of
    silently swallowing them
  - Promote entry-point discovery catch-all from debug to warning with traceback
  - Wrap register_class in RLock for thread safety
  - Add try/except with context logging around factory calls in get_instance
  - Improve teardown_instances: preserve keys for error messages, add exc_info
  - Evict stale cached instances when register_class changes the class for a key
  - Narrow load_toml_config exception to ValueError (parent of TOMLDecodeError)
  - Split load_object_from_import_path error handling: expected import failures
    vs unexpected errors with traceback
  - Guard redundant discover() calls in get_deployment_adapter via is_discovered
  - Add tests for teardown exception isolation, sync teardown, and no-teardown
    adapters

* [autofix.ci] apply automated fixes

* tighten up documentation

* add locking mechanisms around more functions

* [autofix.ci] apply automated fixes

* test config discovery

* Add lock around discovery

* improve teardown concurrency, add more concurrency tests, and improve protocol parity

* use kwarg lambda

* release lock before iterating with awaits

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
2026-03-05 19:23:37 +00:00
2026-02-27 16:38:55 -03:00
2025-03-20 00:05:55 +00:00
2025-11-24 02:02:01 +00:00
2025-12-19 16:48:08 +00:00

Langflow logo

Release Notes PyPI - License PyPI - Downloads Twitter YouTube Channel Discord Server Ask DeepWiki

Langflow is a powerful platform for building and deploying AI-powered agents and workflows. It provides developers with both a visual authoring experience and built-in API and MCP servers that turn every workflow into a tool that can be integrated into applications built on any framework or stack. Langflow comes with batteries included and supports all major LLMs, vector databases and a growing library of AI tools.

Highlight features

  • Visual builder interface to quickly get started and iterate.
  • Source code access lets you customize any component using Python.
  • Interactive playground to immediately test and refine your flows with step-by-step control.
  • Multi-agent orchestration with conversation management and retrieval.
  • Deploy as an API or export as JSON for Python apps.
  • Deploy as an MCP server and turn your flows into tools for MCP clients.
  • Observability with LangSmith, LangFuse and other integrations.
  • Enterprise-ready security and scalability.

🖥️ Langflow Desktop

Langflow Desktop is the easiest way to get started with Langflow. All dependencies are included, so you don't need to manage Python environments or install packages manually. Available for Windows and macOS.

📥 Download Langflow Desktop

Quickstart

Requires Python 3.103.13 and uv (recommended package manager).

Install

From a fresh directory, run:

uv pip install langflow -U

The latest Langflow package is installed. For more information, see Install and run the Langflow OSS Python package.

Run

To start Langflow, run:

uv run langflow run

Langflow starts at http://127.0.0.1:7860.

That's it! You're ready to build with Langflow! 🎉

📦 Other install options

Run from source

If you've cloned this repository and want to contribute, run this command from the repository root:

make run_cli

For more information, see DEVELOPMENT.md.

Docker

Start a Langflow container with default settings:

docker run -p 7860:7860 langflowai/langflow:latest

Langflow is available at http://localhost:7860/. For configuration options, see the Docker deployment guide.

Caution

  • Users must update to Langflow >= 1.7.1 to protect against CVE-2025-68477 and CVE-2025-68478.
  • Langflow version 1.7.0 has a critical bug where persisted state (flows, projects, and global variables) cannot be found when upgrading. Version 1.7.0 was yanked and replaced with version 1.7.1, which includes a fix for this bug. DO NOT upgrade to version 1.7.0. Instead, upgrade directly to version 1.7.1.
  • Langflow versions 1.6.0 through 1.6.3 have a critical bug where .env files are not read, potentially causing security vulnerabilities. DO NOT upgrade to these versions if you use .env files for configuration. Instead, upgrade to 1.6.4, which includes a fix for this bug.
  • Windows users of Langflow Desktop should not use the in-app update feature to upgrade to Langflow version 1.6.0. For upgrade instructions, see Windows Desktop update issue.
  • Users must update to Langflow >= 1.3 to protect against CVE-2025-3248
  • Users must update to Langflow >= 1.5.1 to protect against CVE-2025-57760

For security information, see our Security Policy and Security Advisories.

🚀 Deployment

Langflow is completely open source and you can deploy it to all major deployment clouds. To learn how to deploy Langflow, see our Langflow deployment guides.

Stay up-to-date

Star Langflow on GitHub to be instantly notified of new releases.

Star Langflow

👋 Contribute

We welcome contributions from developers of all levels. If you'd like to contribute, please check our contributing guidelines and help make Langflow more accessible.


Star History Chart

❤️ Contributors

langflow contributors

Description
Langflow is a powerful tool for building and deploying AI-powered agents and workflows.
Readme MIT 2.3 GiB
Languages
Python 64.5%
TypeScript 23.4%
JavaScript 11.4%
CSS 0.3%
Makefile 0.2%
Other 0.1%