Skip to main content
Version: 1.13.x (Next)

Code Agents

These components require a separate manual OpenDsStar installation, described in Prerequisites. Installing lfx-bundles[codeagents], lfx-bundles[all], or lfx[bundles] does not install OpenDsStar.

tip

This provider is an extra of the lfx-bundles metapackage. It is opt-in for both Langflow and standalone LFX installs:

uv pip install "lfx-bundles[<bundle>]"

Replace <bundle> with this page's provider name, for example qdrant. For a torch-free full Langflow install, run uv pip install "langflow[bundles]". For standalone LFX with every provider in lfx-bundles, including PyTorch-based providers, run uv pip install "lfx[bundles]". See Additional bundles for the exact extra name.

Bundles contain custom components that support specific third-party integrations with Langflow.

Langflow integrates with OpenDsStar through a bundle of code-writing agent components that can iteratively plan, write, and execute Python code to solve complex tasks.

info

Code Agents components are in beta and can change in future releases.

Prerequisites

  • OpenDsStar package: Code Agents components require a manual installation of OpenDsStar. The last managed combination supported Python 3.11–3.13, excluding Intel macOS.

    Install the dependency with:

    uv pip install 'OpenDsStar==1.0.26' 'langchain-litellm==0.5.1'

    For more information, see Install custom dependencies.

OpenDsStar was removed from Langflow's managed dependencies because it pulls in DiskCache with an unpatched CVE-2025-69872. Manual installation reintroduces this dependency and requires your own security assessment. The lfx[opendsstar] and langflow-base[opendsstar] extras are no longer available. Existing component and saved-flow identifiers are preserved, but execution requires the manual installation in the same environment as Langflow. An exact uv sync can remove manually installed packages; reinstall them afterward or manage the opt-in in your own environment requirements.

Use Code Agents components in a flow

For an example of using this component, see the Structured Data Agent starter template.

Code Agents components

The following sections describe the purpose and configuration options for each component in the Code Agents bundle.

CodeAct Agent (Smolagents)

The CodeAct Agent (Smolagents) component is a code-writing agent that uses the smolagents CodeAgent to solve tasks by iteratively generating and executing Python code.

At each step the agent writes code, executes it in a sandboxed interpreter, and uses the output to determine the next action until it reaches a final answer.

The component outputs a Message containing the final answer.

CodeAct Agent (Smolagents) parameters

NameTypeDescription
input_valueStringInput parameter. The message or query to send to the agent.
llmLanguageModelInput parameter. The language model to use for code generation. Required.
toolsToolInput parameter. Optional tools the agent can call in addition to executing code.
max_iterationsIntegerInput parameter. Maximum number of agent iterations. Default: 5. Range: 1–50.
system_promptStringInput parameter. A system message to customize agent behavior.
code_timeoutIntegerInput parameter. Maximum time in seconds for each code execution step. Default: 30. Range: 5–300.
show_code_stepsStringInput parameter. How to display coding steps in the Playground: All Steps, Final Code Only, or None. Default: All Steps.
handle_parsing_errorsBooleanInput parameter. Whether the agent should attempt to recover from input parsing errors. Default: true.
verboseBooleanInput parameter. Enable verbose logging. Default: true.
chat_historyDataInput parameter. Chat history for multi-turn conversations.
agent_descriptionStringInput parameter. Description of the agent shown when used in Tool Mode.

OpenDsStar Agent

The OpenDsStar Agent component is a structured data analysis agent that uses OpenDsStar and LangGraph to answer complex questions over structured data files.

The agent executes a multi-step LangGraph workflow: planning → code generation → code execution → verification → routing → finalization. Each step is streamed to the Playground as it runs. Charts and images returned by the agent are rendered inline.

The component outputs a Message containing the final answer.

OpenDsStar Agent parameters

NameTypeDescription
input_valueStringInput parameter. The message or query to send to the agent.
llmLanguageModelInput parameter. The language model to use for the agent. Required.
toolsToolInput parameter. Optional tools the agent can use, such as File Content Retriever or vector store search.
max_iterationsIntegerInput parameter. Maximum number of agent steps. Default: 10. Range: 1–100.
code_execution_modeStringInput parameter. Code execution mode. stepwise executes each step separately; full executes all steps together. Default: stepwise.
system_promptStringInput parameter. A system message to customize agent behavior.
handle_parsing_errorsBooleanInput parameter. Whether the agent should attempt to recover from input parsing errors. Default: true.
code_timeoutIntegerInput parameter. Maximum execution time in seconds for each code step. Default: 60. Range: 10–300.
verboseBooleanInput parameter. Enable verbose logging. Default: true.
chat_historyDataInput parameter. Chat history for multi-turn conversations.
agent_descriptionStringInput parameter. Description of the agent shown when used in Tool Mode.

See also

Was this page helpful?

Support
Search