Skip to main content

CUGA

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

Model Provider Limitations

The CUGA component only supports OpenAI and watsonx models. To use other model providers, use the core Agent component instead.

The CUGA (ConfigUrable Generalist Agent) component is an advanced AI agent that executes complex tasks using tools, optional browser automation, and structured output generation.

The CUGA component can be used in flows in place of an Agent component. Like the core Agent component, the CUGA component can use tools connected to its Tools port, and can be used as a tool itself. It also includes some additional features:

  • Browser automation for web scraping with Playwright. To enable web scraping, set the component's browser_enabled parameter to true, and specify a single URL in the web_apps parameter, in the format https://example.com.
  • Load custom instructions for the agent to execute. To use this feature, use the component's Instructions input to attach markdown files containing agent instructions.

For more information, see the CUGA project repository.

Use the CUGA component in a flow

For demonstration purposes, the following example modifies a template flow to use the CUGA component.

A basic agent chat flow with Chat Input, CUGA, and Chat Output components, as well as various tool and file input.

  1. Create a flow based on the Simple Agent template, and then replace the Agent component with the CUGA component.

  2. Connect an MCP Tools component and a Calculator component to the CUGA component's Tools port, and then connect the MCP Tools component to any MCP server. This example connects to a server containing sales data for a business organization.

  3. Add a Read File component, and then connect it to the CUGA component's Instructions port. Alternatively, click Edit text to open the Edit text content pane, and enter your instructions directly into the CUGA component.

  4. Create a Markdown file on your computer called instructions.md, and then insert the following content. It's important to clearly format the document with ## Plan and ## Answer for the agent to understand your instructions.


    _13
    ## Plan
    _13
    _13
    - Break down complex queries into subtasks
    _13
    - Prioritize information gathering before execution
    _13
    - Consider dependencies between actions
    _13
    - Validate intermediate results before proceeding
    _13
    _13
    ## Answer
    _13
    _13
    - Provide concise summaries with key findings
    _13
    - Include relevant data points and metrics
    _13
    - Cite sources when using MCP tool results
    _13
    - Use clear structure and formatting for readability

  5. In the Read File component, click Add File, and then attach your instructions.md file.

  6. Open the Playground, and then ask the agent a question that could use your connected MCP server. This example asked about the sales data provided by the MCP Server, such as Which accounts are available?. The agent describes the tool calls it makes and then returns an answer according to the instructions. For example, the list of available accounts is very large, but the CUGA component returns a concise summary as requested in the policy.


    _14
    Based on the available data, here are the accounts:
    _14
    _14
    Summit Solutions (NY) - Revenue: $1,200,000
    _14
    Pacific Ventures (CA) - Revenue: $9,500,000
    _14
    Lone Star Corp (TX) - Revenue: $4,500,000
    _14
    Mountain Peak Systems (CO) - Revenue: $2,100,000
    _14
    Digital Dynamics (CA) - Revenue: $5,500,000
    _14
    Cascade Computing (WA) - Revenue: $4,300,000
    _14
    Data Flow Systems (CA) - Revenue: $8,900,000
    _14
    Rocky Mountain Enterprises (CO) - Revenue: $3,200,000
    _14
    Blue Sky Partners (TX) - Revenue: $500,000
    _14
    Liberty Manufacturing (PA) - Revenue: $3,400,000
    _14
    _14
    This is a partial list; there are more accounts available. The total revenue across all accounts is $210,200,000.

CUGA parameters

Some parameters are hidden by default in the visual editor. You can modify all parameters through the Controls in the component's header menu.

NameTypeDescription
agent_llmDropdownModel provider for the agent.
instructionsMultiline StringCustom instructions that define the agent's planning and answers. Can be provided directly or through Markdown files. Formatting is important in order for the agent to understand the instructions. See Use the CUGA component in a flow.
n_messagesIntegerNumber of chat history messages to retrieve. Useful for maintaining context in ongoing conversations identified by session_id. Default: 100.
format_instructionsMultiline StringTemplate for structured output.
output_schemaTableWhen output_schema is provided, structured responses are validated against a dynamically built schema. Invalid items are returned alongside validation errors. Fields: name, description, type (str, int, float, bool, dict), multiple (as list).
add_current_date_toolBooleanIf true, adds a tool that returns the current date. Default: true.
lite_modeBooleanSet to true to enable CugaLite mode for faster execution when using a smaller number of tools. Default: true.
lite_mode_tool_thresholdIntegerThe threshold to automatically enable CugaLite. If the CUGA component has fewer tools connected than this threshold, CugaLite is activated. Default: 25.
decomposition_strategyDropdownStrategy for task decomposition. flexible allows multiple subtasks per app. exact enforces one subtask per app. Default: flexible.
browser_enabledBooleanEnable a built-in browser for web scraping and search. Allows the agent to use general web search in its responses. Disable (false) to restrict the agent to the context provided in the flow. Default: false.
web_appsMultiline StringWhen browser_enabled is true, specify a single URL such as https://example.com that the agent can open with the built-in browser. The CUGA component can access both public and private internet resources. There is no built-in mechanism in the CUGA component to restrict access to only public internet resources.
Search