StackAI

The StackAI Node allows you to perform a variety of tasks within your workflow by leveraging built-in Stack AI tools. Each action is designed for a specific use case, and you can configure the node to perform the action you need by selecting the appropriate action ID and providing the required inputs.


Available Actions

1. Analysis Tool

  • Purpose: Analyze data, create charts, and translate natural language queries into Python code.

  • How to use: Provide a self-contained query describing the analysis you want to perform. The tool will generate and execute Python code in a stateless environment (no memory of previous runs).

  • Inputs:

    • Query (string, required): The natural language description of the analysis or chart you want.

  • Outputs:

    • Success (boolean): Whether the code ran successfully.

    • Code (string): The Python code that was executed.

    • Result (string): The result of the code execution.

    • Chart URL (string, optional): A public URL to any chart generated.


2. Browser Navigation

  • Purpose: Automate web interactions: navigate, view page elements, click, input text, scroll, take screenshots and extract information.

  • How to use: Provide it to an LLM or provdide a browsernav command and the tool executes it in a desktop sandbox. To maintain the same browser session across actions, optionally provide the desktop_sandbox_id and stream_url from a previous Browser Navigation action.

    • The tool runs commands in an E2B Desktop sandbox with a browser.

    • Note: When this tool is used by an LLM, all the inputs below are automatically managed and do not need to be entered manually.

  • Inputs:

    • Command (string, required): The browsernav command to run. Available commands/capability:

      • browsernav navigate (navigate to a URL),

      • browsernav view (list interactive elements with indices),

      • browsernav execute "javascript" (run JavaScript),

      • browsernav click-element (click by index),

      • browsernav input-text "text" (input text),

      • browsernav scroll-down/up (scroll),

      • browsernav screenshot [--path file.png] (capture screenshot).

    • Desktop Sandbox ID (string, optional): Reuse an existing desktop sandbox ID from a previous Browser Navigation action to keep the same browser session.

    • Stream URL (string, optional): Reuse a stream URL from a previous Browser Navigation action.

  • Outputs:

    • Standard Output (string): The command’s standard output.

    • Standard Error (string): Any error messages from the command.

    • Exit Code (integer): The command’s exit code.

    • Success (boolean): A boolean indicating whether the command succeeded (exit code 0).

    • Desktop Sandbox ID (string): The ID of the desktop sandbox used. Reuse this in subsequent Browser Navigation actions to maintain the same browser session.

    • Stream URL (string): The (noVNC stream) URL to view the desktop sandbox in a browser and see agent actions. Reuse this together with the desktop sandbox ID in subsequent actions.

    • New Files (array): A list of files created during command execution.

    • Status (string): The task status: "running" (in progress), "completed" (finished successfully), or "failed" (encountered an error).


2. Send Email

  • Purpose: Send an email to a specified recipient.

  • How to use: Provide the subject, content (HTML supported), and recipient's email address.

  • Inputs:

    • Subject (string, required): The subject line of the email.

    • Content (string, required): The main body of the email (HTML supported).

    • To (string, required): The recipient's email address.

  • Outputs:

    • Status (string): Success or error.

    • Message (string): A human-readable message about the result.

    • Details (string): A summary of the sent email (from, to, subject, content).


3. StackAI Project

  • Purpose: Execute another Stack AI project as a subflow.

  • How to use: Select a Stack AI project and provide input data (as a list). Optionally, enable loop mode to run the project for each item in the list.

  • Inputs:

    • Project (select, required): The Stack AI project to execute.

    • Loop Mode (boolean, optional): If enabled, runs the project for each item in the input list.

    • Input Data (array of strings, required): The data to pass to the project.

  • Outputs:

    • Results (array of objects): The results from the project execution.


4. Send HTTP Request

  • Purpose: Make a custom API call to any HTTP endpoint.

  • How to use: Specify the URL, HTTP method, and optionally headers, query parameters, and request body.

  • Inputs:

    • URL (string, required): The endpoint to call.

    • HTTP Method (select, required): GET, POST, PUT, DELETE, PATCH, HEAD, or OPTIONS.

    • Headers (object, optional): HTTP headers as key-value pairs.

    • Queries (object, optional): Query parameters as key-value pairs.

    • Request Body (object, optional): Data to send as JSON.

  • Outputs:

    • Status Code (integer): The HTTP status code.

    • Headers (object): The response headers.

    • Body (object/string/array): The response body.


5. Create Slides

  • Purpose: Generate HTML slides from a prompt.

  • How to use: Provide a prompt describing the slides you want to create.

  • Inputs:

    • Query (string, required): The prompt for the slides.

  • Outputs:

    • Success (boolean): Whether the slides were created.

    • Slides (array): The generated slides (each with a title and content).

    • Title (string): The title of the slide deck.


6. Image to Image

  • Purpose: Transform an image using a vision model, guided by a prompt.

  • How to use: Provide the URL of the source image, a prompt describing the transformation, and select a model.

  • Inputs:

    • Source Image URL (string, required): The image to transform.

    • Transformation Prompt (string, required): Description of the desired transformation.

    • Vision Model (select, required): The model to use (e.g., Flux Kontext Max).

  • Outputs:

    • Transformed Image URL (string): The URL of the transformed image.


7. List Actions

  • Purpose: List all available actions for every provider.

  • How to use: No input required.

  • Outputs:

    • Actions by Provider (object): A mapping of provider IDs to lists of available action IDs.


8. Get Actions Info

  • Purpose: Get detailed information about a specific action (input/output schema, etc.).

  • How to use: Provide the provider ID and action ID.

  • Inputs:

    • Provider ID (string, required): The provider (e.g., stackai, gmail, slack).

    • Action ID (string, required): The action (e.g., send_email, list_actions).

  • Outputs:

    • Action Info (object): Complete information about the action, including input and output schemas.


9. Generate Workflow

  • Purpose: Validate and generate a workflow structure from a list of nodes and edges.

  • How to use: Provide arrays of nodes and edges as dictionaries.

  • Inputs:

    • Nodes (array, required): List of workflow nodes.

    • Edges (array, required): List of workflow edges.

  • Outputs:

    • Nodes (array): The validated list of workflow nodes.

    • Edges (array): The validated list of workflow edges.

Last updated

Was this helpful?