Create and Reuse Functions in AI Agent Studio

AI Agent Studio now supports reusable JavaScript function templates, allowing you to define common logic once and reuse it across multiple agentic workflows.

You can create function templates from the Functions subtab under the Resources tab in AI Agent Studio. Each template can include one or more JavaScript functions, along with generated test cases to validate their behavior before publishing. Published function templates are available from the Functions subtab for use in Code nodes within workflows.

Reusable functions enable organizations to centralize shared JavaScript logic and promote code reuse across workflows. Reusable functions provide the following benefits:

  • Eliminate duplicate code across multiple Code nodes.
  • Improve consistency by using the same tested logic across workflows.
  • Simplify maintenance by updating shared functions in a single location.
  • Accelerate development with reusable, optimized function implementations and built-in test cases.
  • Improve workflow reliability by validating functions before they're published and reused.

Steps to enable and configure

You must have access to use AI Agent Studio.

Access requirements

Access Requirements for AI Agent Studio