# Overview

StackAI is an enterprise platform for building, deploying, and governing AI agents.

Use this section to get the product story, learn the platform layout, and pick the right documentation path.

### What StackAI helps you do

* Build AI workflows with a visual builder.
* Connect knowledge bases, tools, and business systems.
* Deploy agents to chat, forms, APIs, and internal teams.
* Operate safely with governance, access controls, and observability.

### In this section

<table data-view="cards"><thead><tr><th>Page</th><th data-card-target data-type="content-ref">Link</th></tr></thead><tbody><tr><td><strong>What Makes StackAI Unique</strong><br>See how StackAI combines no-code building, enterprise integrations, and governance.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/fSMlastn3oHOiIOosm4N">/spaces/FSlso1Kjob5CLDrh0dVn/pages/fSMlastn3oHOiIOosm4N</a></td></tr><tr><td><strong>Platform Overview</strong><br>Get a tour of the dashboard, workflow builder, deployment options, analytics, and evaluation tools.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/nabLXm4oPkH3E1UStoph">/spaces/FSlso1Kjob5CLDrh0dVn/pages/nabLXm4oPkH3E1UStoph</a></td></tr><tr><td><strong>Stack AI Documentation Map</strong><br>Choose the right learning path based on your experience level and goals.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/NcFwq4Re0F0NlmjngLNa">/spaces/FSlso1Kjob5CLDrh0dVn/pages/NcFwq4Re0F0NlmjngLNa</a></td></tr></tbody></table>

### Start with the page that matches your goal

* Want the high-level product overview? Go to [What Makes StackAI Unique](/welcome-to-stackai/overview/what-makes-stackai-unique).
* Want a tour of the product interface? Go to [Platform Overview](/welcome-to-stackai/overview/platform-overview).
* Want the fastest route through the docs? Go to [Stack AI Documentation Map](/welcome-to-stackai/overview/stack-ai-documentation-map).


# What Makes StackAI Unique

Quickly deploy agents for your enterprise company with a no-code platform anyone can use.

![](/files/YprTZUjoVhg3cNK0v6Qb)

StackAI is an enterprise platform for building and deploying AI agents, with a strong focus on governance and security.

IT and Operations teams utilize StackAI to deploy internal applications that enhance and automate business processes, ranging from the simplest use cases, such as chatbots that retrieve information from databases like Microsoft SharePoint, to the most sophisticated automations, including performing in-depth research to generate investment memos.

StackAI's powerful orchestration engine and extensive integrations simplify and accelerate the automation of business processes. We provide the observability and controls necessary to deploy AI Agents across your organization. That is why banks, defense companies, and governments trust us to accelerate their transition to an AI-first organization and streamline their productivity.

### End-to-End Experience <a href="#heading-h.dqtv0n5w969f" id="heading-h.dqtv0n5w969f"></a>

StackAI offers an end-to-end experience, allowing users to build both the logic of the AI agent using a drag-and-drop workflow builder and the interface of the AI agent by selecting pre-built user interfaces. Once the AI Agent is configured, it can be deployed and monitored with a few clicks.

### AI Pipeline & Integrations <a href="#heading-h.6me683rqosye" id="heading-h.6me683rqosye"></a>

All components to build an AI application are available in StackAI with different levels of abstraction to help both non-technical and technical teams. The entire data pipeline needed for deploying AI applications can be configured in just a few steps.

From document indexing to retrieval, users can build Retrieval Augmented Generation (RAG) systems by simply dragging a “Knowledge Base” node into their workflow, with default settings optimized for 90% of the use cases. This significantly streamlines the development of AI applications for both non-technical and technical users (i.e., IT teams new to AI development).

Function calling, implemented through the concept of “Tools,” is equally intuitive. Users only need to select the desired tools at the LLM level; no code or complex setup required.

StackAI also offers a wide range of integrations with both established systems (such as SharePoint, SAP, Workday, Salesforce, etc) as well as modern SaaS companies (like Exa AI, Snowflake, and Miro), making data ingestion seamless and efficient.

### Implementation Support <a href="#heading-h.z9wb8l49yev1" id="heading-h.z9wb8l49yev1"></a>

StackAI provides the platform and forward-deployment engineers to help customers build complex use cases and deploy those with confidence. Given the pace of innovation in AI, we offer the necessary guidance both with AI strategy as well as with tactical development advice, from testing new AI models to experimenting with different agentic architectures.

StackAI supports all enterprise customers with weekly co-building sessions led by forward-deployed engineers, GenAI-focused hackathons (also known as Stackathons), and Quarterly Business Review (QBR) sessions to align on progress and roadmap priorities.

### AI Governance <a href="#heading-h.7u43aagjdaf2" id="heading-h.7u43aagjdaf2"></a>

StackAI is SOC 2 Type II, HIPAA, GDPR, and CCPA-CPRA compliant, with ISO 27001 certification. For organizations with strict data residency or sovereignty requirements, StackAI offers On-Premise deployment options, critical for industries like defense and finance. This capability sets us apart from most providers, since they force customers to use their cloud solution.

Granular Role-Based Access Control (RBAC) enables admins to precisely govern who can modify and interact with LLMs, edit Knowledge Bases, or publish Workflows. Every component, from interfaces to citations, can be secured, authenticated (e.g. via SSO), and production-locked to ensure transparent accountability and control.

Admins can enforce approval flows, protect production environments from accidental edits, and ensure only reviewed agents are launched, with version control of all changes. Furthermore, Admins receive notifications of the status of their agents in production in real-time.


# Platform Overview

### Projects Dashboard

Let's start by creating a new project in Stack AI dashboard. Click on the "New Project" button in the top right corner of the dashboard.

<figure><img src="/files/C5A1bHNr9SLqMYnxtv8a" alt=""><figcaption></figcaption></figure>

#### Templates

Create a Quick Start project to open a blank project, or browse through a list of pre-built templates. You can choose the "Chat with Knowledge Base" template to build an application where your users can ask questions on a knowledge base you've uploaded.&#x20;

<figure><img src="/files/ESkRKaQspPIcPZcQ82qF" alt=""><figcaption></figcaption></figure>

You can search for a specific application you would like to integrate with a Large Language Model, like "Gmail," or you can look through the list of use cases on the left side of the screen.

### Workflow View

Once you create a project, you will see an interface with 3 main components:

**Workflow View**

* **Canvas:** the main component of the Stack AI tool, a 2D canvas where you can drag and drop nodes and connect them to build your workflow.
* **Sidebar:** a large variety of functionality blocks, also called nodes, can be found on the left hand side. These nodes represent components in the flow where data is received, processed, and returned from different services. Chat with Workflow on the bottom of the sidebar for advice on how to build or to learn about what an existing project does.
* **Control bar:** a set of commands at the top right hand side with buttons to **'Save'** (save the current version), **'Run'** (execute the workflow as it is in the canvas), **'Share'** (share the current version with another Stack AI user), and **'Publish'** (make your workflow available externally).

The Workflow View is where you can build your project, by dragging and connecting the necessary nodes to create your agent. Once you are ready to deploy your agent to users, hit **'Publish'** in the top right corner. If its your first time publishing your project, you will be prompted to enter the Export View to choose an interface for your agent.

### Other Important Views

**Export View**

<figure><img src="/files/dkyoUGlg3LuTD3rDQtVe" alt=""><figcaption></figcaption></figure>

By clicking the **'Export'** button in the top left side bar, you will see a view with different interface options.

We offer pre-built interfaces for your AI chatbots that can be easily customized to match your brand's look and feel.

You can choose from a **ChatGPT-style interface**, a **website chatbot**, a **voice interface**, or deploy your chatbot via **Slack, WhatsApp, or SMS**. We offer the option to use Stack AI as a backend process, **leveraging our APIs** to send inputs, receive results, and **build your own custom UI**.

You will find different customization options in the Export tab **(name, logo, colors, etc.)**. Configure a **custom domain** if required and protect your chatbot with **SSO or password**.

An URL is generated for you to share with your colleagues.

**IMPORTANT:** whenever you make changes to your project in the **Builder View**, always remember to click the **Publish** button. This will update the assistant's user interface.

#### Analytics View

<figure><img src="/files/dsh1kzNyXEX6CLl3MfC8" alt=""><figcaption></figcaption></figure>

Clicking on the **'Analytics'** button in the top left sidebar will display a summary of your workflow usage.

This page features four graphs that provide an overview of workflow utilization, along with a complete list of execution logs. The logs include valuable information such as the execution status, runtime, tokens consumed, and the workflow's inputs and outputs. Additionally, you can filter the analytics by date using the selector in the top left corner.

#### Manager View

<figure><img src="/files/znnhtcdtjr3OfrD653gx" alt=""><figcaption></figcaption></figure>

Clicking the **'Manager'** button in the top left sidebar will take you to a view with all user conversations with your workflow. To download all conversations, click the **"Download"** button. To clear the conversation history, click **"Delete"**.

**Evaluator View**

Click 'Evaluator' to enter the Evaluator View. This view allows you to test your agent on a batch of inputs uploaded in a CSV file. You can have the output be graded by another LLM, who will judge whether your agent outputs desirable results. You can also have the LLM compare the output of your agent to a gold standard answer, or make suggestions. Just edit the prompt on the right side of the screen.

<figure><img src="/files/0ZTaHO7acTMLEnQurzuB" alt=""><figcaption></figcaption></figure>


# Stack AI Documentation Map

Use this page to navigate the Stack AI documentation and find the right guide fast.

### Pick your level

* **Beginner:** build and deploy a basic workflow.
* **Intermediate:** improve quality, integrate actions, and add error handling.
* **Advanced:** operate in production with governance and controls.

### Stack AI Curriculum

Start here: [Stack AI Curriculum](/getting-started/learning/stackai-curriculum).

<table data-view="cards"><thead><tr><th>Path</th><th>Learning path</th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Beginner</strong><br>Build and deploy a basic workflow. Add a small knowledge base.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/FrEXVA0cyiQMMTFTvull">Builder Path - Beginner</a></td><td><a href="/files/uwZpQXt7aAJwnSfPU25m">/files/uwZpQXt7aAJwnSfPU25m</a></td></tr><tr><td><strong>Intermediate</strong><br>Improve quality, integrate actions, and implement error handling.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/7WCRr4xUM55Rbqze74kq">Builder Path - Intermediate</a></td><td><a href="/files/Qj81Tt6j94ru9URhv9aq">/files/Qj81Tt6j94ru9URhv9aq</a></td></tr><tr><td><strong>Advanced</strong><br>Governance controls, reliability, and production operations.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/td7dgksuD73cwPvlQocu">Builder Path - Advanced</a></td><td><a href="/files/or8Aa8ls53L40ygyUKMp">/files/or8Aa8ls53L40ygyUKMp</a></td></tr></tbody></table>

### Beginner

<table data-view="cards"><thead><tr><th>Focus</th><th>Docs</th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Learn the canvas</strong><br>Nodes, runs, publishing, and data flow.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/IW7bYbSsnOtcAIy96ME0">Get Started with Workflow Builder</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/5wzH56PF45e9ni8OBCDA">Inputs</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/1rzYB3SPYsCw4gQ4M4Wx">Outputs</a></li></ul></td><td><a href="/files/uwZpQXt7aAJwnSfPU25m">/files/uwZpQXt7aAJwnSfPU25m</a></td></tr><tr><td><strong>Build your first agent</strong><br>A fast end-to-end build.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/8e6P9XDM92OYr6usOXZm">Deploying Your First Agent</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/7nryHvj8tkhFdvcgCaxB">Templates</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/IyHE7n42v7FygdPABjeO">Knowledge Bases</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/yfOs804Ic7R1v63oPRAj">How to Use Knowledge Bases</a></li></ul></td><td><a href="/files/th9ozFPuP2qpYAX1jxNn">/files/th9ozFPuP2qpYAX1jxNn</a></td></tr><tr><td><strong>Deploy to users</strong><br>Ship a chat, a form, or an API.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/A4DkSfXnyfPvWzO4wHlt">Deploy with the Export View</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/EMRbpxw30iNOWEkw1DJm">Chat Assistant</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/M38ecHPAGWtqL5nK7OZ7">Form</a></li></ul></td><td><a href="/files/OHtUNBg2UvNznLx3AgXg">/files/OHtUNBg2UvNznLx3AgXg</a></td></tr></tbody></table>

### Intermediate

<table data-view="cards"><thead><tr><th>Focus</th><th>Docs</th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Prompting + LLM setup</strong><br>Structure prompts. Use tools. Tune settings.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/YjEQjSjqwYs4YdqzgwL9">LLM Node</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/bXdQDPCbUAF0P1kePQTz">Prompting</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/zHZW3c7ySYSkcDTyB5GN">Tools</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/nFGTxv0DmypyfgacWOUx">Main Settings</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/xnjRMZjmgnc0IBxj3VOL">Advanced Settings</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/YyniJ9zfpaxKz2jmc8cn">Prompt Engineering</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/IYDJEUNZKKCxmVYpq6C3">Instruction vs Prompt</a></li></ul></td><td><a href="/files/Qj81Tt6j94ru9URhv9aq">/files/Qj81Tt6j94ru9URhv9aq</a></td></tr><tr><td><strong>Integrations + automation</strong><br>Connect apps. Trigger runs. Push results downstream.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/vf4ogE30dPrbepGzbZM0">Apps</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/YMP8x0dWeHoxFEPLGgYP">Trigger Node</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/MEeWc1hYBd2C80Jtl5Xp">API</a></li></ul></td><td><a href="/files/MLctnB2gl6mrqZYyhGrK">/files/MLctnB2gl6mrqZYyhGrK</a></td></tr><tr><td><strong>Error handling</strong><br>Fallback paths and troubleshooting.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/RW9CA5BzKp03ejxJX354">Fallback &#x26; Error Handling</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/iUrAo2e5tc0hKLRGMYYw">Troubleshoot a Workflow</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/nFaIwQ2UXMVamJzZ8Q4v">Analytics</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/T4OQZz1n3K9NGzAxEtNF">Manager</a></li></ul></td><td><a href="/files/IdWIs1BwAUqgPphSCn9K">/files/IdWIs1BwAUqgPphSCn9K</a></td></tr></tbody></table>

### Advanced

<table data-view="cards"><thead><tr><th>Focus</th><th>Docs</th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Advanced workflow patterns</strong><br>Custom code, reusable subflows, and orchestration.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/NGERVUpx51hT7DFkEFse">Python Code</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/cubxULh0Kk6Lk9hi1HQM">Custom API</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/RyGHbfepRiS6MbZ5Wa6b">AI Routing</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/CsgxUAhg6OAz7rJMz9Z4">Loop Subflow</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/Ryo4ZIPgWTtRPFzrjQq9">Human in the Loop</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/MYBpoqdkfJReXUp1Mspc">Dynamic Vector Store</a></li></ul></td><td><a href="/files/ALm7W0TNBZZHk2Gc1Tgc">/files/ALm7W0TNBZZHk2Gc1Tgc</a></td></tr><tr><td><strong>Reliability + evaluation</strong><br>Debug runs. Add guardrails. Track quality over time.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/iUrAo2e5tc0hKLRGMYYw">Troubleshoot a Workflow</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/RW9CA5BzKp03ejxJX354">Fallback &#x26; Error Handling</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/nFaIwQ2UXMVamJzZ8Q4v">Analytics</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/T4OQZz1n3K9NGzAxEtNF">Manager</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/2VQ77US6oBQclOAQU0mL">Evaluator</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/z26LODr31ewxRpDpEdaQ">Adding Advanced Logging for Analytics</a></li></ul></td><td><a href="/files/IdWIs1BwAUqgPphSCn9K">/files/IdWIs1BwAUqgPphSCn9K</a></td></tr><tr><td><strong>Governance + security</strong><br>RBAC, auth, boundaries, and policy.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/bqJzKv2QjrQMo4Bte5bU">Security &#x26; Privacy</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/oMPIPAPHfSvE96N8FsA8">AI Governance</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/y57ktLDXN53NMeMdLnKe">Role-Based Access Controls (RBAC) and Groups</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/XlSrNoy8kceVfCTcakyv">Authentication and MFA</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/OPMPEzdYAtrr6QIbp6js">Workspace and Folder Access</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/ROB4BQnTaOMF29waqzeN">Connection and Knowledge Base Permissions</a></li></ul></td><td><a href="/files/or8Aa8ls53L40ygyUKMp">/files/or8Aa8ls53L40ygyUKMp</a></td></tr></tbody></table>

***

Prefer a guided, step-by-step path?

Go to [Stack AI Curriculum](/getting-started/learning/stackai-curriculum).


# Security & Governance

This section covers security architecture, access controls, and AI governance for enterprise StackAI deployments.

Use it to configure compliance policies, manage identity, and establish safe operating boundaries for your agents.

### In this section

<table data-view="cards"><thead><tr><th>Topic</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>Security &#x26; Privacy</strong><br>Data handling policies, encryption, and privacy controls for StackAI.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/bqJzKv2QjrQMo4Bte5bU">/spaces/FSlso1Kjob5CLDrh0dVn/pages/bqJzKv2QjrQMo4Bte5bU</a></td></tr><tr><td><strong>AI Governance</strong><br>Policy frameworks for safe and accountable AI agent usage.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/oMPIPAPHfSvE96N8FsA8">/spaces/FSlso1Kjob5CLDrh0dVn/pages/oMPIPAPHfSvE96N8FsA8</a></td></tr><tr><td><strong>On-Premise</strong><br>Deploy StackAI within your own infrastructure.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/c1GcJidrJFL5SLPfxhs5">/spaces/FSlso1Kjob5CLDrh0dVn/pages/c1GcJidrJFL5SLPfxhs5</a></td></tr><tr><td><strong>Security in StackAI</strong><br>Configure RBAC, workspace access, and feature-level controls.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/ayYV1q2onay6ZX3QW6pq">/spaces/FSlso1Kjob5CLDrh0dVn/pages/ayYV1q2onay6ZX3QW6pq</a></td></tr></tbody></table>

### Start with the topic that fits your role

* [**Security & Privacy**](/welcome-to-stackai/security-and-governance/security-and-privacy) — for data handling and compliance questions.
* [**AI Governance**](/welcome-to-stackai/security-and-governance/ai-governance) — for policy and accountability frameworks.
* [**Security in StackAI**](/welcome-to-stackai/security-and-governance/security-in-stackai) — for configuring access controls and RBAC.


# Security & Privacy

StackAI prioritizes data protection and compliance, making it suitable for industries with stringent regulatory requirements. Key security features include:

* **Compliance Certifications**: Adherence to SOC 2 Type II, HIPAA, and GDPR standards ensures that data handling meets global regulatory requirements.
* **Guardrails**: LLMs can deviate from their initial requirements by answering questions they were not prompted to answer. Guardrails allow our customers to ensure LLMs do not answer questions and topics they are not supposed to reply.
* **PII Protection**: Built-in mechanisms detect and mask Personally Identifiable Information (PII), safeguarding sensitive data during processing.

![](/files/0wEibrYutpYdTyZR6LRB)

[PII protection at the LLM node](/workflow-builder/core-nodes/ai-agent-node/llm-hosting-and-governance/llm-provider-governance):

* Data Retention Policies: Organizations can define data retention durations, ensuring data is stored only as long as necessary.
* No Data Training: StackAI ensures that user data is not used to train AI models as part of its enterprise agreements with providers, maintaining data confidentiality.

#### Multi-Factor Authentication

To turn on MFA, go to Settings -> Feature Access -> Authentication. Click manage and turn on MFA. This will apply to all users in your organization.

<figure><img src="/files/hocovOx19Jv2fM4pXY75" alt=""><figcaption></figcaption></figure>


# AI Governance

To manage AI deployments effectively, StackAI offers governance features like:

* Role-Based Access Control (RBAC): Define user permissions at granular levels, including access to the knowledge base and connections.
* Single Sign-On (SSO): Integrate with identity providers like Okta and Entra ID for user authentication and inheritance of groups and permissions.
* Project Publishing Controls: Restrict project publishing capabilities to authorized personnel, ensuring oversight.
* Centralized Monitoring: A unified dashboard allows administrators to monitor agent activities, usage metrics, and error logs in real-time.

Below is a comprehensive guide to StackAI’s governance model, designed for teams that need **speed without losing control**.

## The StackAI Governance Model (8 Layers) <a href="#header-1" id="header-1"></a>

**1) Role-Based Access Control (RBAC) and Groups**

<figure><img src="/files/OFcy8UUov3p3jsgDpK0n" alt=""><figcaption></figcaption></figure>

Admins can create **groups** (e.g., “Legal,” “HR,” “Capture Team”) and assign them to workspaces/projects for coarse-grained control.

**2) Workspace and Folder Access (Scope Control)**

Easily create private group folders with specific allowlists. Only assigned users or groups can see what’s inside—others see nothing.

<figure><img src="/files/CONCPopBEjSrCMhSh29m" alt=""><figcaption></figcaption></figure>

Easily view project owners and editors as well, by hovering over a project or in a list view.

<figure><img src="/files/febTw1WykIj1HOljUyCo" alt=""><figcaption></figcaption></figure>

**3) Project Controls (Edit, Lock, Versioning)**

Creators can **lock** a project (only the owner edits; admins can override).

<figure><img src="/files/jX8fvcXp1DbWGZZMZ5yp" alt=""><figcaption></figcaption></figure>

All changes made to projects can be tracked with **version control** and diffs, so you can see exactly who changed what and when, and roll back. You can easily see all previously published versions of a project; and versions can be tagged with a commit message to clarify what changes were made. Easily go back to a previous version if desired.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2FCnTCmhb7V8QySaZgKQwI%2FVersioning.mp4?alt=media&token=69174abb-6f99-4037-b08c-21568fc3ab0e>" %}

**4) Interface-Level Security (How You Publish)**

When you export an agent (advanced form, chatbot, Slackbot, etc.), you can:

* Enable one-click SSO on the interface editor
* Set a **password** for external collaborators.
* Restrict by **allowed origins/URLs** and even a **user allowlist**.

<figure><img src="/files/x0zrhUTWOANnqaIuDLc7" alt=""><figcaption></figcaption></figure>

**5) Global Governance and Admin Policy (Feature Access and Guardrails)**

Org admins can set cross-cutting policy:

* Require SSO on all interfaces.
* Restrict who can **publish**, so that non-admins don't publish projects.

<figure><img src="/files/lw0IbUGSPFKpWYNKnTLG" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/J4C1FAknrybvMOCMBwoc" alt=""><figcaption></figcaption></figure>

* Enable an **approval/feature-flag** workflow for changes, wherein users request for their project to be reviewed and published by admin.

<figure><img src="/files/k9l8TKACho5rC0IwpHx0" alt=""><figcaption></figcaption></figure>

* Allow/deny specific **tools, connectors, and more through Feature Access** (e.g., block Notion/Box across the org).

<figure><img src="/files/b9PZ5i3Xnr0dp4bVrdO0" alt=""><figcaption></figcaption></figure>

* Set **usage limits** (e.g., token caps) as a security throttle.
* Assigning user roles.

![](/files/SqMMUrCkXf1XimkLyut1)

* Disabling LLMs and adding default connections (i.e., your company’s API keys).

![](/files/GLWQ0GYjnxHjbC0zDL28)

You can also build **policy by group** (e.g., “only Legal can access the Legal agents”).

**6) Connection and Knowledge-Base Permissions**

Connections (SharePoint, Dropbox, ServiceNow, etc.) are owned by their creator, with private details and credentials encrypted and hidden from others. Owners and admins can share a connection org-wide or limit it to specific users or groups.

Knowledge bases support the same allowlisting, so only authorized teams can reference sensitive content.

<figure><img src="/files/LhMMHBwHkl7UjJd61SMp" alt=""><figcaption></figcaption></figure>

**7) Production Analytics and Auditing**

Downloadable project analytics show **who ran what, when, with which models**, token counts, latency, and per-step traces (inputs, KB hits, outputs). Builders can **mask or disable logs** when required, or limit visibility to the owner. For certain cases of **external security tooling**, StackAI can deliver **scheduled exports** and can **post to a customer webhook** (e.g., daily digests) for alerting pipelines.

Below are some of the most widely used governance features, developed in close collaboration with our customers:

<figure><img src="/files/blcOUIiSyfa62kLhWEEj" alt=""><figcaption></figcaption></figure>

Learn more about Analytics [here](/agentic-adoption-and-security/observability/analytics).

**8) Authentication and MFA**

Organizations can use **email/password** (when enabled) or **SSO** (recommended). Enabling SSO means protecting **any or all** interfaces from access by members outside of your organization; further, SSO allows you to capture the email addresses of all users of your interfaces to easily keep track of who is using your workflows. You can also require SSO for all interfaces. By default, SSO users land as **users** until granted higher roles.

<figure><img src="/files/TizY7vBzqgxYv4uHTr0A" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/DgQMTqVe5fHiyTWB1uS9" alt=""><figcaption></figcaption></figure>


# On-Premise

StackAI's on-premise deployment offers enterprise-grade control, performance, and security by running entirely within your organization's infrastructure. This allows customers to have full control over their data, and deploy local LLMs that can be orchestrated in StackAI, resulting in fully controlled AI applications.

{% embed url="<https://github.com/stackai/stackai-onprem>" %}

Our on-premise deployment includes Single Sign-On (SSO), and can be deployed in most cloud providers (including AWS, GCP, and Azure) or in your organization's servers.


# Security in StackAI

This section covers the specific security controls available within the StackAI platform — how to configure access, manage permissions, and meet enterprise compliance requirements.

Use these pages to set up your organization's security posture before rolling out agents to users.

### In this section

<table data-view="cards"><thead><tr><th>Topic</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>Role-Based Access Controls (RBAC) and Groups</strong><br>Define roles and assign permissions across your organization.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/y57ktLDXN53NMeMdLnKe">/spaces/FSlso1Kjob5CLDrh0dVn/pages/y57ktLDXN53NMeMdLnKe</a></td></tr><tr><td><strong>Workspace and Folder Access</strong><br>Control which users and groups can see or edit specific workspaces and folders.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/OPMPEzdYAtrr6QIbp6js">/spaces/FSlso1Kjob5CLDrh0dVn/pages/OPMPEzdYAtrr6QIbp6js</a></td></tr><tr><td><strong>Project Controls</strong><br>Set visibility and edit permissions at the project level.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/piacotxgusZXhmiXHJmu">/spaces/FSlso1Kjob5CLDrh0dVn/pages/piacotxgusZXhmiXHJmu</a></td></tr><tr><td><strong>Feature Access</strong><br>Enable or restrict access to specific platform features by role.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/5FmFhsnsgI0oNOHuAoge">/spaces/FSlso1Kjob5CLDrh0dVn/pages/5FmFhsnsgI0oNOHuAoge</a></td></tr><tr><td><strong>Connection and Knowledge Base Permissions</strong><br>Manage who can use, view, or modify connections and knowledge bases.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/ROB4BQnTaOMF29waqzeN">/spaces/FSlso1Kjob5CLDrh0dVn/pages/ROB4BQnTaOMF29waqzeN</a></td></tr><tr><td><strong>Authentication and MFA</strong><br>Configure login methods and enforce multi-factor authentication.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/XlSrNoy8kceVfCTcakyv">/spaces/FSlso1Kjob5CLDrh0dVn/pages/XlSrNoy8kceVfCTcakyv</a></td></tr><tr><td><strong>Agentic Development Lifecycle (ADLC)</strong><br>Manage how agents move through development, review, and production stages.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/Pwz1YPOL48uvabpT381w">/spaces/FSlso1Kjob5CLDrh0dVn/pages/Pwz1YPOL48uvabpT381w</a></td></tr><tr><td><strong>System for Cross-Domain Identity Management (SCIM)</strong><br>Automate user provisioning and deprovisioning via your identity provider.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/h6cdSsgsgqne41enPJ9D">/spaces/FSlso1Kjob5CLDrh0dVn/pages/h6cdSsgsgqne41enPJ9D</a></td></tr><tr><td><strong>Workflow Notifications</strong><br>Set up alerts and notifications for workflow events and status changes.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/sO59KTI81fcYj869P6li">/spaces/FSlso1Kjob5CLDrh0dVn/pages/sO59KTI81fcYj869P6li</a></td></tr></tbody></table>

### Where to start

* Setting up a new organization? Start with [**RBAC and Groups**](/welcome-to-stackai/security-and-governance/security-in-stackai/role-based-access-controls-rbac-and-groups), then [**Workspace and Folder Access**](/welcome-to-stackai/security-and-governance/security-in-stackai/workspace-and-folder-access).
* Enforcing login security? Go to [**Authentication and MFA**](/welcome-to-stackai/security-and-governance/security-in-stackai/authentication-and-mfa).
* Automating user management from your IdP? Go to [**SCIM**](/welcome-to-stackai/security-and-governance/security-in-stackai/system-for-cross-domain-identity-management-scim).
* Controlling which users can access which agents? See [**Project Controls**](/welcome-to-stackai/security-and-governance/security-in-stackai/project-controls) and [**Feature Access**](/welcome-to-stackai/security-and-governance/security-in-stackai/feature-access).


# Role-Based Access Controls (RBAC) and Groups

Control what users can see and do in StackAI by assigning roles.

Role-Based Access Control (RBAC) lets you control what each member can see and do in StackAI. Use RBAC to protect sensitive data, reduce accidental changes, and keep production projects stable.

RBAC affects access to:

* **Projects** (who can build vs who can run)
* **Connections** (who can view and manage integrations)
* **Organization settings** (who can manage security, users, and governance)

### Roles and permissions

StackAI has four roles. Each role controls access to projects, settings, connections, and actions.

* **Admin**: Full access to the organization, including all projects, settings, users, and connections.
* **Editor**: Create and edit projects. Access connections they created or that were shared with them.
* **User**: Run published projects. Access connections they created or that were shared with them.
* **Viewer**: Run published projects only. No access to the workflow builder or connections.

#### Common role patterns

* **Admins**: IT/security owners and a small set of trusted builders.
* **Editors**: Workflow builders who maintain projects and publish updates.
* **Users**: Operators who run published projects in production.
* **Viewers**: Stakeholders who need access to outputs, but not configuration.

***

### Assign a role when inviting a user

Select a role when you invite a new member. This role applies immediately after they join.

If you’re unsure which role to use, start with **User**. You can promote them later if they need build access.

<figure><img src="/files/iB4lpRTRfmYjGHel2qnB" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you use SSO, you can set a default role for newly provisioned users.
{% endhint %}

***

### Change a user’s role

Admins can update roles at any time. Changes apply in real time.

Role changes are useful for temporary access. For example, make someone an Editor during a build sprint. Then revert them to User after publishing.

<figure><img src="/files/YVfSQvomiMAa4CeIYqcx" alt=""><figcaption></figcaption></figure>


# Workspace and Folder Access

Use private folders to control which teams can see specific projects.

Workspace and folder access is your “scope control” layer. Use it to segment projects by team, function, or sensitivity.

Folder access works alongside:

* [Role-Based Access Control (RBAC)](/welcome-to-stackai/security-and-governance/security-in-stackai/role-based-access-controls-rbac-and-groups) (what users can do)
* [Connection and Knowledge Base Permissions](/welcome-to-stackai/security-and-governance/security-in-stackai/connection-and-knowledge-base-permissions) (who can view/use specific resources)

### What folder access controls

Folders are **public by default**. When you make a folder private, only the allowed users and groups can see:

* the folder
* the projects inside that folder

This is the simplest way to ensure teams only see the projects meant for them.

{% hint style="info" %}
Folder access controls **visibility in the StackAI workspace**. It does not replace interface security for published deployments (SSO, password, allowlists).
{% endhint %}

***

### Make a folder private

Use private folders for projects that include sensitive data, regulated workflows, or restricted connections.

{% stepper %}
{% step %}

### Open the folder settings

Go to the Projects dashboard. Find the folder you want to restrict. Open the folder’s settings menu.
{% endstep %}

{% step %}

### Enable private access

Turn on **Private Folder**. Add the users and groups that should have access.
{% endstep %}

{% step %}

### Confirm access

Verify that only the selected users and groups can see the folder and its projects.
{% endstep %}
{% endstepper %}

<figure><img src="/files/nfJdcemlCraagOIefa4e" alt=""><figcaption><p>Example: configuring a private folder and selecting who can access it.</p></figcaption></figure>

### Update folder access

You can update folder access at any time. Changes apply immediately.

To update access:

1. Open the folder’s settings.
2. Add or remove users and groups from the allowlist.

To make the folder public again, turn off **Private Folder**.

### Best practices

* Prefer **groups** over individual users.
* Create dedicated folders for sensitive teams (Legal, Finance, HR).
* Keep production workflows in a restricted folder to reduce accidental edits.

### How folder access interacts with permissions

Folder access is a visibility layer. It typically works like this:

* **Folder access** decides whether a user can see a project in the workspace.
* **RBAC** decides what that user can do after they can see it (build, edit, run).
* **Connection and Knowledge Base permissions** control who can view and manage those resources directly.

{% hint style="warning" %}
If a workflow uses sensitive connections or Knowledge Bases, do both:

1. Put the workflow in a **private folder**.
2. Restrict the **connection / Knowledge Base** to the same users or groups.
   {% endhint %}

### Settings visibility by role

The Settings menu depends on your role.

{% tabs %}
{% tab title="Admins" %}
Admins can access all organization settings. This includes governance, security, and user management.

<figure><img src="/files/SiZwrMEWfFuez7YX3eBK" alt=""><figcaption><p>Settings menu for Admins.</p></figcaption></figure>
{% endtab %}

{% tab title="Editors" %}
Editors have limited access to Settings. They can build and manage projects, but can’t manage org-wide controls.

<figure><img src="/files/exvcJGnXYYEVAyEhVezF" alt=""><figcaption><p>Settings menu for Editors (Limited).</p></figcaption></figure>
{% endtab %}

{% tab title="Users & Viewers" %}
Users and Viewers don’t have access to organization settings. They primarily work from the Projects dashboard.

<figure><img src="/files/gb8vMFd1DWuedtbaSKUQ" alt=""><figcaption><p>Projects dashboard for Users and Viewers.</p></figcaption></figure>
{% endtab %}
{% endtabs %}

### Troubleshooting

#### I don’t see the “Private Folder” option

Your role may not include access to manage folders. Check your permissions in [Role-Based Access Control (RBAC)](/welcome-to-stackai/security-and-governance/security-in-stackai/role-based-access-controls-rbac-and-groups) or ask an admin to update your access.

#### A user can’t find a project

Confirm:

* The project is in the expected folder.
* The user (or one of their groups) is included in the folder allowlist.
* The user’s role allows the action they’re trying to take (view/run/edit).


# Project Controls

Use Project Controls to track versions during workflow development, and lock workflows when in production

Project controls limit who can edit and publish changes in a project. They help you ship safely with multiple collaborators.

Project controls are designed to:

* Prevent unintentional edits
* Enable safe collaboration across teams
* Preserve a clear history of changes and change owners

### Editing Controls

<figure><img src="/files/7R4AisFo5GcZWrtcwvIy" alt=""><figcaption><p>Project controls: lock a project to prevent unintended changes.</p></figcaption></figure>

As the project creator, you can lock a project. Locking does not affect your ability to run the project. It blocks edits and publishing for non-authorized users.

{% hint style="info" %}
Locking is a “change freeze”. It is not a visibility control. Use private folders to hide projects from other teams.
{% endhint %}

#### Who can edit when a project is locked

Locked projects are editable only by authorized users. This typically includes the project owner and workspace admins. Your org’s governance settings may further restrict this.

### Version Control

Project versioning tracks changes over time. It creates an audit trail for what changed and who changed it.

Each time you publish a new version, you can:

* Add a description
* Review the changes included in that version

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2FCnTCmhb7V8QySaZgKQwI%2FVersioning.mp4?alt=media&token=69174abb-6f99-4037-b08c-21568fc3ab0e>" %}

The video above shows publishing a version and inspecting the version diff.

Select **Version history** to see:

* All published versions
* Who published each version
* The description attached to each version

You can also review a previous version and revert if needed.

{% hint style="warning" %}
Treat version descriptions like commit messages. Write what changed and why.
{% endhint %}

### Locking vs RBAC vs folder access

Use these together. They solve different problems.

* **Project lock**: prevents edits and publishing.
* **RBAC**: controls what roles can build, run, or manage.
* **Folder access**: controls who can see projects in the workspace.

### Best Practices

* Lock projects once they are in production
* Limit unlock permissions to a small set of admin users
* Enter a description for each version where meaningful changes were made
* For experimentation, work off of a duplicated project instead of experimenting on existing projects in production
* Pair project controls with [Role-Based Access Controls (RBAC)](/welcome-to-stackai/security-and-governance/security-in-stackai/role-based-access-controls-rbac-and-groups) and [Workspace and Folder Access](/welcome-to-stackai/security-and-governance/security-in-stackai/workspace-and-folder-access) for maximum governance controls

### Troubleshooting

* **"I can’t edit a project anymore"**: Check if the project is locked. If it is locked, ask a workspace admin (or the project owner) to unlock it.
* **"I don’t see Version history"**: Your role may not include access to publishing controls. Ask an admin to confirm your permissions in RBAC.


# Feature Access

As an admin, you have the ability to enforce governance standards and feature accesses

**Feature access** allows admins to manage Multi-Factor Authentication, Knowledge Bases, LLM access, and more.

Feature Access is designed to:

* Limit the use of certain LLMs
* Limit the use of certain Knowledge Bases
* Limit the use of vertain tools and integrations

### Managing Feature Access

<figure><img src="/files/QYLDLcgDXByNp2HIw3ZO" alt=""><figcaption><p>Navigate to Settings to see the Feature Access section</p></figcaption></figure>

### Apps & Tools Management

Feature Access is where admins can edit the availability of LLMs, applications, and tools on the StackAI platform to your organization. You might want to do these things to uncluttered, facilitate specific building, or to match your organization's compliance standards. You can:&#x20;

* Enable or disable specific applications
* Enable or disable specific LLMs
* Elect to establish your own connections to LLMs using your own API Keys

<figure><img src="/files/L0oYaWfImnqxdCfe0pZb" alt=""><figcaption></figcaption></figure>

When electing to use your own API keys for an LLM, you will be prompted to connect to the LLM of interest to complete setup.&#x20;

<figure><img src="/files/A9Hv7VT6RhMQAYSEGuwU" alt=""><figcaption></figcaption></figure>

### Authentication and Knowledge Base Management

Admins may enable multi-factor authentication for users in the organization and also disable specific exisitng knowledge bases.&#x20;

### Other

Admins are able to further customize their organization by managing the enablement of various additional features such as advances OCR, background workflows, AI Agents Grid, and more.&#x20;

<figure><img src="/files/TDBRXQmkQ06w4GYO6YYl" alt=""><figcaption></figcaption></figure>


# Connection and Knowledge Base Permissions

Restrict access to Connections and Knowledge Bases.

Use permissions to control who can view and use **Connections** and **Knowledge Bases**. This helps protect credentials and sensitive internal data.

Permissions here work alongside [Role-Based Access Control (RBAC)](/welcome-to-stackai/security-and-governance/security-in-stackai/role-based-access-controls-rbac-and-groups).

{% hint style="warning" %}
Users may be able to run a **published** workflow that uses a connection or Knowledge Base, even if they can’t see that resource in the Connections or Knowledge Bases list.

If a workflow uses sensitive resources, keep it in a private folder with a restricted allowlist.
{% endhint %}

{% tabs %}
{% tab title="Connections" %}

### Connection access and sharing

Connections are private by default. Visibility depends on both the user role and the connection’s sharing settings.

This helps keep integration credentials scoped to the people who need them. It also reduces accidental reuse of sensitive connections in new workflows.

#### Default visibility

* **Admins**: Can view and use all connections in the organization.
* **Editors and Users**: Can view and use connections they created or that were shared with them.
* **Viewers**: Cannot view or use connections.

#### Share a connection

1. Open the connection.
2. Update the access level (admin/edit/view), or add specific users and groups.

<figure><img src="/files/LwFDGRRIsfX1P5bMNW9I" alt=""><figcaption></figcaption></figure>

#### Best practices for sensitive connections

* Put workflows that use sensitive connections in **private folders**.
* Limit folder access to a specific group (for example, “Finance Ops”).
* Prefer sharing a connection with **groups** over many individual users.
  {% endtab %}

{% tab title="Knowledge Bases" %}

### Knowledge Base access and sharing

Knowledge Bases are private by default. Visibility depends on both the user role and the Knowledge Base’s sharing settings.

Use this to ensure sensitive content is only available to approved teams.

#### Default visibility

* **Admins**: Can view and use all Knowledge Bases in the organization.
* **Editors and Users**: Can view and use Knowledge Bases they created or that were shared with them.
* **Viewers**: Cannot view or use Knowledge Bases.

#### Share a Knowledge Base

1. Open the Knowledge Base.
2. Update the access level (admin/edit/view), or add specific users and groups.

<figure><img src="/files/JudKMeDxG8ttWpF3PjeV" alt=""><figcaption></figcaption></figure>

#### Best practices for sensitive Knowledge Bases

* Store sensitive workflows in **private folders** with restricted access.
* Split content into separate Knowledge Bases by sensitivity or team ownership.
* Prefer sharing to **groups** to keep access manageable over time.
  {% endtab %}
  {% endtabs %}

***

### End-user connections (use the end user’s credentials)

For certain apps, StackAI can run a connection using the **end user’s credentials**. This helps ensure the workflow only returns data the end user is allowed to access.

To enable this, select **Use end-user connection** while building your workflow. End users will be prompted to authorize before they can run the agent.

<figure><img src="/files/Yem6LNQfdyoqBUBjNBLV" alt=""><figcaption></figcaption></figure>


# Authentication and MFA

Use these settings to control how users authenticate.

Organizations can implement org-wide authentication methods within StackAI to ensure authentication method stays consistent across business teams and StackAI projects.&#x20;

### Workspace sign-in methods

By default, when you invite a new user to access to StackAI workspace, the user will receive an email inviting them to access their account and set up a password. You could also set up SSO in "SSO Settings" page and standardize how users join your organization.

<div data-with-frame="true"><figure><img src="/files/c7lMYzcgTiXhvteJ4zQ8" alt=""><figcaption></figcaption></figure></div>

### Default role for SSO users

By default, newly provisioned SSO users start as **User**. Admins can promote them at any time.

See [Role-Based Access Controls (RBAC) and Groups](/welcome-to-stackai/security-and-governance/security-in-stackai/role-based-access-controls-rbac-and-groups) for role definitions and common patterns.

### Require SSO for published interfaces

You can require SSO for all interfaces. This prevents access from users outside your organization.

{% stepper %}
{% step %}

#### Open Authentication settings

Go to **Settings** → **Feature Access** → **Other**.
{% endstep %}

{% step %}

#### Require SSO for all  interfaces

Enable **Require SSO for all interfaces**.
{% endstep %}

{% step %}

#### Validate access

Open a published interface in an incognito window. Confirm SSO is enforced.
{% endstep %}
{% endstepper %}

<div data-with-frame="true"><figure><img src="https://docs.stack-ai.com/stack-ai/~gitbook/image?url=https%3A%2F%2F3697023207-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FFSlso1Kjob5CLDrh0dVn%252Fuploads%252F13q1l18prUicKSOgDpeq%252Frequire_SSO_forall.png%3Falt%3Dmedia%26token%3D82e5820d-e0f1-4600-a00a-b90e5b36437e&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=ee5b84ee&#x26;sv=2" alt=""><figcaption></figcaption></figure></div>

### Multi-factor authentication (MFA)

MFA adds a second verification step for sign-in. Once enabled, MFA is **mandatory org-wide**.

MFA applies to password-based authentication. If you use SSO, MFA is typically enforced in your IdP.

#### Enable MFA

{% stepper %}
{% step %}

#### Open Authentication settings

Go to **Settings** → **Feature Access** → **Authentication**.
{% endstep %}

{% step %}

#### Turn on MFA

Select **Manage**. Turn on **MFA**.
{% endstep %}

{% step %}

#### Confirm the rollout

Have a user sign in again. They will be prompted to complete MFA setup.
{% endstep %}
{% endstepper %}

<figure><img src="https://docs.stack-ai.com/stack-ai/~gitbook/image?url=https%3A%2F%2F3697023207-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FFSlso1Kjob5CLDrh0dVn%252Fuploads%252FPQhH6uPg5KkVho7n8QMI%252Fturn_on_MFA.gif%3Falt%3Dmedia%26token%3D5ad55ddc-db88-4de8-96fa-a52a3e57e00b&#x26;width=768&#x26;dpr=3&#x26;quality=100&#x26;sign=ffe0e47d&#x26;sv=2" alt=""><figcaption></figcaption></figure>

### Troubleshooting

> #### Users can’t access a published interface after enabling “Require SSO for all interfaces”

Check these first:

* The user is signing in with a company email in your IdP.
* The user is assigned to the StackAI app in the IdP.
* The interface URL is the same one you tested (no old links).


# Agentic Development Lifecycle (ADLC)

ADLC helps your team ship workflow changes safely. It replaces “edit → publish → live” with staged deployments and reviews.

Use ADLC when multiple people ship changes. Use it when you want fewer surprises in production.

### Why ADLC helps

ADLC makes changes safer and easier to track:

* review changes before they go live
* test on separate URLs before production
* keep a history of what shipped, and when
* reduce accidental production breaks

### Key concepts

* **Stage** is an environment with its own URL. Stages keep testing away from real users.
* **Version** is a locked-in build of your workflow. Versions move through stages.
* **Pull request (PR)** is a request to promote a version to the next stage. A PR shows a diff and a frozen snapshot.

### Enable ADLC for your org

1. Go to `Settings → Feature Access`.
2. Toggle on `Deployment Stages`.
3. New projects will use ADLC stages. Note that your existing projects will not have ADLC.

<div data-with-frame="true"><figure><img src="/files/gr4UGv9VENLVIwD4Nla1" alt=""><figcaption></figcaption></figure></div>

### Deployment pipeline

By default, workflows move through four stages:

`Draft → Development → Staging → Production`

1. **Draft**: Build and iterate. Nothing is deployed.
2. **Development**: First deployed stage. Use it for internal testing.
3. **Staging**: Final checks. Use it for QA and stakeholder sign-off.
4. **Production**: Live deployment. Real users interact with it.

{% hint style="warning" %}
You can’t skip stages. Promotion must follow the pipeline order.

You can configure ADLC to omit a stage. Example: Draft → Development → Production.
{% endhint %}

### What ADLC changes in the product

When ADLC is enabled:

* **Publish** becomes **Create Pull Request**.
* A **Deployments** tab appears in the project navigation.
* Export shows per-stage URLs instead of a single “live URL”.

<div data-with-frame="true"><figure><img src="/files/cKPD0YhdVAR3IDZsoV17" alt=""><figcaption><p>ADLC projects show Deployments and stage URLs.</p></figcaption></figure></div>

### ADLC surfaces in the Deployments tab

ADLC is built around four screens. Each one answers a different question.

#### 1) Active deployments

Use this to answer: “What’s live in each stage right now?”

You get separate URLs for Development, Staging, and Production.

<div data-with-frame="true"><figure><img src="/files/OaxshZAeOqBbkHjpcF3E" alt=""><figcaption></figcaption></figure></div>

Deploying to Development only changes the Development URL. Other stages keep running.

#### 2) Deployment history

Use this to answer: “What happened to each version over time?”

<div data-with-frame="true"><figure><img src="/files/Xa7MLnZd8BZZnDKBGBRy" alt=""><figcaption></figcaption></figure></div>

You can see:

* which versions exist
* which stage each version reached
* whether a PR is pending for a version
* who approved and when

#### 3) Pull requests list

Use this to answer: “What PRs exist for this version?”

Each version can have multiple PRs. You usually create one per stage transition.

<div data-with-frame="true"><figure><img src="/files/sRoBXx1Yrvu4orh1ioKB" alt=""><figcaption></figcaption></figure></div>

The PR list shows:

* status of each PR
* who created each PR
* PR description
* reviewers and comments

#### 4) Pull request review view

Use this to answer: “What exactly will deploy if I approve?” Review mode is read-only. It loads the PR snapshot.

You can:

* view the workflow canvas
* view export and interface settings
* inspect the diff
* leave comments
* approve or reject

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2FUOzvcRjZy5ygrApiwHpL%2FArea.mp4?alt=media&token=9b71cc0d-e50d-4571-8f35-cd5986f1a54b>" %}

### How to create a pull request

{% stepper %}
{% step %}

#### Make changes in Draft

Make your changes in Draft. Save when you’re ready to promote them.
{% endstep %}

{% step %}

#### Click Create Pull Request

Use the toolbar action. This asks to promote your changes to the next stage.
{% endstep %}

{% step %}

#### Review the diff and describe the change

Open **View Changes** to inspect the diff.

Add a description. Keep it specific and testable.
{% endstep %}

{% step %}

#### Submit the PR

Submitting captures a snapshot of:

* workflow definition (nodes, edges, connections)
* export and interface settings
* form settings
  {% endstep %}
  {% endstepper %}

After submission, the PR shows as **pending** in Deployments. Your teammates can review it.

### How to review a pull request

{% stepper %}
{% step %}

#### Open Deployments

Go to the workflow project. Open the **Deployments** tab.
{% endstep %}

{% step %}

#### Find the pending PR

Open the version. Then open its PR list.
{% endstep %}

{% step %}

#### Open review mode

Click **Review**. You will see the frozen PR snapshot.
{% endstep %}

{% step %}

#### Comment and decide

Leave comments on the diff or workflow.

Then **Approve** or **Reject** the PR.
{% endstep %}
{% endstepper %}

If approved, that version deploys to the target stage.

### Best practices

* Add descriptions to each PR highlighting key changes and things to note for the reviewer.
* Validate in Staging with the people who will sign off.
* Treat Production as read-mostly. Limit who can promote to it.

### Troubleshooting and gotchas

* **“My draft changed after I opened the PR”**: That’s expected as PRs always show the frozen snapshot. Create a new PR if you need to include newer Draft edits.
* **“I don’t see the Deployments tab”**: Confirm ADLC is enabled for your org. Note that once you turn ADLC on, only new projects will show ADLC stages. Existing projects will remain the same.


# System for Cross-Domain Identity Management (SCIM)

Automate StackAI user and group provisioning from your Identity Provider.

SCIM lets your Identity Provider (IdP) manage StackAI access automatically. You can use it to automate onboarding and offboarding of users without manual intervention.

Use SCIM when users are managed centrally in Okta or Entra ID. Changes apply when people join, move teams, or leave.

### Why SCIM helps

SCIM keeps your StackAI user access in sync with your IdP.

* Provision users when they’re added in your IdP.
* Deprovision users when they leave your organization.
* Assign roles based on IdP role or group attributes.
* Sync groups from your IdP into StackAI.

### Key concepts

* **SCIM token**: Bearer token used by your IdP to authenticate provisioning calls.
* **Role mapping**: Rule that maps an IdP role value to a StackAI role.
* **Disable mode**: Behavior for SCIM-managed users when SCIM is turned off.

### Before you begin

You need two things before you can enable SCIM:

1. **SSO configured** in **Settings** → **SSO Settings**.
2. Once SSO is configured, head to **Settings → Provisioning** to configure SCIM provisioning. Note that **a default role must be selected**. All provisioned users receive this role unless a role mapping applies.

{% hint style="info" %}
You cannot enable SCIM until SSO is active for your organization.
{% endhint %}

### Supported identity providers

StackAI supports any SCIM 2.0-compliant IdP, including:

* Microsoft Entra ID (Azure AD)
* Okta
* Google Workspace
* Ping Identity
* JumpCloud
* OneLogin
* Auth0
* Others (SCIM 2.0-compliant)

### Set up SCIM

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2F6IkgVdf1ZeyIKlTS1hqA%2Fscim.mp4?alt=media&token=88625c5e-f5ee-440a-a107-156a6c37082c>" %}

{% stepper %}
{% step %}

#### Open SCIM provisioning in StackAI

Go to **Settings** → **Security** → **SCIM Provisioning**.

Select your Identity Provider, set a **Default role**, and copy the SCIM Base URL: `https://api.stack-ai.com/scim/v2`
{% endstep %}

{% step %}

#### Generate a SCIM token

Under **SCIM Tokens**, select **Create token**.

Set a name, like `Okta Production` and optionally set an expiration date.

Copy the token immediately — it is only shown once.
{% endstep %}

{% step %}

#### Configure your IdP

In your IdP’s SCIM settings, enter:

* **SCIM Base URL:** `https://api.stack-ai.com/scim/v2`
* **Authentication method:** Bearer token
* **Bearer token:** the token you generated
  {% endstep %}

{% step %}

#### Enable SCIM

Toggle on **Enable SCIM** in the overview section. If it’s disabled, check SSO, default role, and IdP selection.
{% endstep %}
{% endstepper %}

### Role mappings

All SCIM-provisioned users get the **Default role** by default. Role mappings let you assign specific StackAI roles based on roles sent by the IdP.

When your IdP sends a role attribute (like `Admin`), StackAI checks the role mapping table and assigns the matching role. If no mapping matches, the **Default Role** applies.

#### Create a role mapping

1. Go to Settings → Provisioning → Role Mappings.
2. Click **Add Mapping**.
3. Enter the **IdP Role Value** — the exact role name as sent by your IdP.
4. Select the target **StackAI Role** (refresher on StackAI Roles can be found [here](/welcome-to-stackai/security-and-governance/security-in-stackai/role-based-access-controls-rbac-and-groups))
5. Save.

{% hint style="info" %}
Role values are case-insensitive. Admin and admin resolve to the same mapping.
{% endhint %}

### What gets synced

#### Users

StackAI supports the full user lifecycle.

* **Provision**: Create new users.
* **Update**: Sync attributes like name and email.
* **Deactivate**: Setting `active: false` deactivates the user in StackAI.
* **Reactivate**: Setting `active: true` restores access.

#### Groups

When **Sync groups** is enabled, IdP groups are mirrored in StackAI. Membership changes in the IdP sync automatically.

### Disable SCIM

When you disable SCIM, choose a disable mode:

* **Soft (default)**: SCIM-managed users remain active. They keep their access but are no longer externally managed.
* **Lock**: SCIM-managed users are deactivated. They lose access until manually reactivated by an Admin.

In both modes, StackAI revokes all SCIM tokens.

{% hint style="warning" %}
Lock mode immediately removes access for all SCIM-provisioned users. Use Soft mode if you want to preserve existing access during a transition.
{% endhint %}

### Token management

* Create multiple tokens — useful for rotating credentials with zero downtime.
* Revoke a token — takes effect immediately. The IdP will receive 401 errors until a new token is configured.
* Set an expiration — optional. Tokens without an expiration remain valid until revoked.

{% hint style="info" %}
Token values are stored as secure hashes and are only shown once at creation time. If you lose a token, revoke it and create a new one.
{% endhint %}

### Configuration options

* **Default role** (required): Role applied when no role mapping matches.
* **Auto-activate users** (default on): Activates new users when provisioned.
* **Sync groups** (default on): Mirrors IdP groups into StackAI.

### Troubleshooting

* **"The Enable SCIM toggle is grayed out"**: SSO must be configured, a default role must be set, and an IdP must be selected before you can enable SCIM.
* **"A provisioned user has the wrong role"**: Check your role mappings. If the IdP role value doesn't exactly match a mapping, the user falls back to the Default Role.
* **"The IdP is returning 401 errors"**: Your SCIM token may have been revoked or expired. Generate a new token and update your IdP configuration.
* **"A user was provisioned but can't log in"**: Confirm SSO is active and that the user's email in the IdP matches their StackAI profile. Email matching is case-insensitive.


# SCIM through Okta

This guide walks you through configuring SCIM provisioning between Okta and StackAI. Once set up, user creation, profile updates, deactivations, and role mapping flow automatically from Okta into your StackAI organization.

**Before you start**

* SAML SSO between Okta and StackAI must already be configured (this guide assumes the StackAI SAML app integration already exists in Okta).
* You need admin access in both StackAI and your Okta org.

{% stepper %}
{% step %}

### Select Okta as the identity provider in StackAI

In StackAI, open the **SSO and Provisioning** page (under **Security** in the left sidebar). Under **SCIM Provisioning → Configuration**, set **Identity Provider** to **Okta**.

<figure><img src="/files/5814IiyLa9MEn8Q6a6MD" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Open the StackAI app in Okta and edit App Settings

In Okta, go to **Applications → Applications** and open the **StackAI** app (the SAML integration created when you set up SSO). On the **General** tab, click **Edit** next to **App Settings**.

<figure><img src="/files/S5cbQIFcl0Q5HeO15nWc" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Enable SCIM provisioning and save

In **Provisioning**, select **SCIM**, then save the changes.

<figure><img src="/files/DyhXaxMx4vjyRgTyPViI" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Open the new Provisioning tab

After saving, a new **Provisioning** tab appears in the StackAI app. Click it.

<figure><img src="/files/s9oCOynQ8asgh4jDE2mz" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Edit the SCIM Connection

In the **Provisioning** tab, under **Settings → Integration**, click **Edit** next to **SCIM Connection**.

<figure><img src="/files/Msat8py82KrzUa8fuIlR" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Copy the SCIM Base URL from StackAI

Back in StackAI, on the **SSO and Provisioning** page, find **Provisioning Link → SCIM Base URL** and copy the URL.

<figure><img src="/files/1OOmfLErOYz0lPMxvgEX" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Paste the SCIM Base URL into Okta and configure the connection

In Okta's SCIM Connection editor, fill in:

* **SCIM connector base URL** — paste the URL you just copied from StackAI.
* **Unique identifier field for users** — `userName`
* **Supported provisioning actions** — check **all** of:
  * Import New Users and Profile Updates
  * Push New Users
  * Push Profile Updates
  * Push Groups
  * Import Groups
* **Authentication Mode** — `HTTP Header`

<figure><img src="/files/fZsck7qtdCAKvh8jhuH7" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Create a SCIM token in StackAI

Back in StackAI, under **SCIM Provisioning → Bearer Tokens**, click **+ Create Token**. Give it a name (e.g. `Okta Token`) and optionally set an expiration date, then click **Create Token**.

<figure><img src="/files/0pDKdbJWfJ4WYauhnTzd" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Copy the bearer token

Copy the generated token. **It is only shown once** — store it securely.

<figure><img src="/files/VYwAhjBGlw2y8yyXEU3N" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Paste the token in Okta, test, and save

Back in the Okta SCIM Connection editor, paste the bearer token into the **Authorization** field (next to `Bearer`). Click **Test Connector Configuration** to confirm everything works, then click **Save**.

<figure><img src="/files/buU2rYZarFkIHUcJJqcM" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Edit "Provisioning to App" settings

Still in the **Provisioning** tab, switch to **Settings → To App** in the left rail and click **Edit**.

<figure><img src="/files/vHGqPOyuYnCYfHkxhbTb" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Enable all provisioning actions

Enable every option:

* Create Users
* Update User Attributes
* Deactivate Users
* Sync Password

Then save.

<figure><img src="/files/zG16lUAlWNlaReSMQYD6" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Add role mappings in StackAI

In StackAI, under **SCIM Provisioning → Role Mappings**, click **+ Add Mapping**. For each mapping, set:

* **IdP Role Value** — the role name exactly as you will write it in Okta (e.g. `Admin`).
* **Organization Role** — the matching StackAI role (e.g. `Admin`).

Repeat for every role you plan to assign through Okta. The IdP Role Value must match exactly what you'll enter in Okta in step 17.

<figure><img src="/files/i7JUnHSGSNzpRhTglrBY" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Add a Role attribute to the Okta profile

In Okta, go to **Directory → Profile Editor**, open the **StackAI User** profile, and click **+ Add Attribute**.

<figure><img src="/files/iaSNZSWg2uNmQZC4N74Y" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Configure the Role attribute

Fill the form with these exact values so the role pushed from Okta is mapped correctly to StackAI:

| Field              | Value                                        |
| ------------------ | -------------------------------------------- |
| Data type          | `string`                                     |
| Display name       | `Role`                                       |
| Variable name      | `stackaiRole`                                |
| External name      | `roles.^[primary==true].value`               |
| External namespace | `urn:ietf:params:scim:schemas:core:2.0:User` |
| Description        | *(leave blank)*                              |
| Enum               | *(leave unchecked)*                          |
| Attribute length   | `Between` (leave min/max blank)              |
| Attribute required | *(leave unchecked)*                          |
| Attribute type     | `Personal`                                   |

Click **Save**.

<figure><img src="/files/y6ylrbueqzKG98yC4J0n" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Assign people to StackAI from Okta

Go back to **Applications → StackAI** and open the **Assignments** tab. Click **Assign** and choose **Assign to People** (or **Assign to Groups**) to grant access to members of your org.

<figure><img src="/files/O3KW3FPsSIfQh4j4kbcN" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Set the Role field when assigning a user

When assigning a person, scroll down to the **Role** field and enter the role name **exactly** as you mapped it in StackAI in step 13 (e.g. `Admin`). This is what determines the user's role in StackAI.

<figure><img src="/files/PI0CDVU3xQ3CrUd0khCm" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Import existing StackAI members into Okta

Open the **Import** tab on the StackAI app in Okta and click **Import Now** to pull existing StackAI users into Okta. Confirm matches as needed.

<figure><img src="/files/Y8pdjm7PX552kyVqahn5" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## You're done

SCIM provisioning is now active. From this point on:

* New users assigned to StackAI in Okta are created automatically in StackAI with the role you set.
* Profile and role changes in Okta sync to StackAI.
* Unassigning a user in Okta (or deactivating them) deactivates them in StackAI.

If something doesn't sync as expected, check **View Logs** / **Monitor Imports** at the top of the StackAI app in Okta, and the **Audit Logs** page in StackAI.


# SCIM through Entra

This guide covers the **core SCIM setup**: enabling SCIM in Stack AI, creating the Entra enterprise app, configuring attribute mappings for users, assigning users, and verifying that provisioning works.

***

### Prerequisites

* Stack AI organization admin access
* Microsoft Entra tenant with privileges to create Enterprise applications and edit App Registrations
* A modern browser tab open to each side

***

### Step 1 — Enable SCIM in Stack AI

1. Sign in to Stack AI as an org admin.
2. Open **Settings → SSO and Provisioning**.
3. Ensure SSO is enabled. If not, enable SSO for the org first.
4. Scroll down to **SCIM Provisioning** and select your IdP and the default role for users SCIM will provision
5. Generate a bearer token and save it for your reference.
6. Click "Enable SCIM"

Leave this page open — you'll come back to verify provisioned users.

***

### Step 2 — Create the Enterprise application in Entra

1. Open the [Microsoft Entra admin center](https://entra.microsoft.com/).
2. **Identity → Applications → Enterprise applications** → **+ New application**.
3. Click **+ Create your own application**.
4. Name it (e.g. `Stack AI`).
5. Choose **"Integrate any other application you don't find in the gallery (Non-gallery)"** → **Create**.

Entra will build the app from its generic SCIM template — that's why provisioning logs and job names will reference `customappsso`. It's cosmetic and expected.

***

### Step 3 — Configure SCIM credentials and test the connection

1. In the Enterprise App you registered in Entra for SSO, open the **Provisioning** blade → **Get started**.
2. Set **Provisioning Mode** = **Automatic**.
3. Expand **Admin Credentials**:
   * **Tenant URL**: paste the Stack AI Base URL from Step 1 (`https://api.stack-ai.com/scim/v2`)
   * **Secret Token**: paste the SCIM token from Step 1
4. Click **Test Connection**.
   * **401**: token is wrong or expired — regenerate in Stack AI and re-paste.
   * **404**: Tenant URL is wrong — double-check the trailing `/scim/v2`.
   * **5xx**: Stack AI side issue; check Stack AI status before continuing.
5. Click **Save**.

***

### Step 4 — Configure user attribute mappings

After saving credentials, the **Mappings** section appears with two object types: **Users** and **Groups**. Start with users — groups are covered in the optional section at the end.

1. Click **Provision Microsoft Entra ID Users**.
2. **Enabled**: Yes.
3. **Target Object Actions**: leave Create / Update / Delete all checked.
4. Verify (and trim) the attribute mappings. The minimum useful set:

   <table data-search="false"><thead><tr><th>Target SCIM attribute</th><th width="266.6171875">Microsoft Entra attribute</th><th>Notes</th></tr></thead><tbody><tr><td><code>userName</code></td><td><code>userPrincipalName</code></td><td>Identity key</td></tr><tr><td><code>active</code></td><td><code>Switch([IsSoftDeleted], , "False", "True", "True", "False")</code></td><td>Disables suspended users</td></tr><tr><td><code>displayName</code></td><td><code>displayName</code></td><td></td></tr><tr><td><code>emails[type eq "work"].value</code></td><td><code>mail</code></td><td>Required for invites/SSO match</td></tr><tr><td><code>name.givenName</code></td><td><code>givenName</code></td><td></td></tr><tr><td><code>name.familyName</code></td><td><code>surname</code></td><td></td></tr><tr><td><code>externalId</code></td><td><code>objectId</code></td><td>Note: you'll need to edit the Microsoft Entra ID Attribute to be objectId</td></tr></tbody></table>

   You can delete the rest of Entra's defaults (manager, addresses, phone numbers, etc.) — Stack AI ignores them and removing them reduces sync errors. Your final attribute should look as shown below

<figure><img src="/files/XAzJu9CB0BSkPYltoGZ0" alt=""><figcaption></figcaption></figure>

5. Save the mappings.

***

### Step 5 — Assign users to the app

Provisioning **scope** defaults to **"Sync only assigned users and groups"**. Leave this — broader scopes provision your entire tenant, which you almost never want.

1. In the same Enterprise application, open the **Users and groups** blade[^1].
2. **+ Add user/group** → pick users (or, later, groups — see the optional group section).
3. Save.

***

### Step 6 — Start provisioning and verify

1. Back to the **Provisioning** blade.
2. Toggle Provisioning Status to On and click save.

<figure><img src="/files/VQe0faj0vtMZMXnf721K" alt=""><figcaption></figcaption></figure>

3. In Stack AI → **Settings → Members**, confirm the user appears with the expected name, email, and active state. **NOTE**: Entra runs a sync cycle every **\~40 minutes**. This interval is set by Microsoft and cannot be lowered. To manually trigger a sync,&#x20;

***

### What to expect operationally

* **Adding a user to the app** → next cycle they appear in Stack AI.
* **Removing a user from the app** (or soft-deleting them in Entra) → `active=false` is sent, Stack AI deactivates them. The user record is preserved.
* **Hard-deleting a user in Entra** after 30 days → SCIM `DELETE /Users/{id}` is sent and the user is removed from Stack AI.
* **Renaming a user** → Stack AI updates the existing record, identified via `externalId`. No duplicate is created.
* **Quarantine** (red banner on the Provisioning blade) → too many failures or auth errors. Fix the underlying issue, then **Restart provisioning** to clear it.

***

### Troubleshooting checklist

If provisioning isn't behaving:

1. **Provisioning logs** (Under "Montior" on the left-side panel). Filter by Status = Failure. Each row shows the request, response, and exact error.
2. **401 Unauthorized** on every call → token expired or revoked in Stack AI. Regenerate and update Entra credentials.
3. **403 Forbidden** on `/Users` → SCIM was disabled on the Stack AI side. Re-enable from the SCIM Provisioning page.
4. **400 invalidValue** on `userName` → almost always a missing `userPrincipalName` for that user. Check the user's profile in Entra.
5. **No log rows at all for a user you expected** → they're not assigned to the app, or they're in an unassigned group.
6. **Provision on demand** is the fastest debug tool. Use it after every config change to validate without waiting for the cycle.

***

## Optional: Group sync

By default, Stack AI mirrors Entra groups one-to-one — same name, same membership. There's no group → role / group → permission translation; the synced group is just a Stack AI group. Skip this section if you only need user provisioning.

### Enable group sync in Stack AI

1. Stack AI → **Settings → SCIM Provisioning**.
2. Toggle **Sync groups** to **ON**.

If this toggle is off, every Entra `/Groups` call returns **403 Forbidden** and Entra logs will be flooded with group-create failures.

### Confirm the Group mapping is enabled in Entra

1. Provisioning blade → **Mappings**.
2. Click **Provision Microsoft Entra ID Groups** → **Enabled = Yes**.
3. Verify the minimum mapping set:

   | Entra attribute | SCIM attribute |
   | --------------- | -------------- |
   | `displayName`   | `displayName`  |
   | `objectId`      | `externalId`   |
   | `members`       | `members`      |

   The Entra group's `displayName` becomes the Stack AI group name verbatim. Pick clean, human-readable group names in Entra; they show up directly in Stack AI's UI.

### Assign the group to the app

In **Users and groups**, **+ Add user/group** → pick the **group itself** (not just its members). Assigning a member's parent group does not implicitly provision the group; the group must be assigned explicitly.

> **Note**: Entra does **not** expand nested or dynamic groups for SCIM. If you have a group of groups, assign each leaf group separately.

### Verify

After the next sync (or via **Provision on demand** on the group):

* The group appears in Stack AI → **Settings → Groups**.
* Members are populated. Adding/removing a user from the Entra group propagates as a SCIM `PATCH` (add/remove members) on the next cycle.
* Renaming the Entra group updates the Stack AI group's name (it's matched by `externalId`).
* Deleting the Entra group removes the Stack AI group; member users are kept.

***

## Optional: Role mapping

By default, provisioned users have **no role**. To grant roles automatically, you create a translation table in Stack AI ("when Entra sends role X, set Stack AI role Y") and configure Entra to send a role value per user.

### How role resolution works

When StackAI receives a SCIM user payload with a `roles` array, it:

1. Picks the role marked `primary: true` (or the first if none flagged).
2. Lowercases and trims the value.
3. Looks for an exact match in your role mappings.
4. If no match → assigns the configured **default role**.
5. If there's no default role → user is provisioned with no role.

Matching is case-insensitive, but whitespace and unicode quirks count. Use simple names (`admin`, `member`, `viewer` , `user`).

### Step A — Create role mappings in Stack AI

1. Stack AI → **Settings → SCIM Provisioning** → **Role mappings** card.
2. **Set a default role** in the SCIM config (highly recommended). This is the safety net for users without a matching role.
3. **+ Add mapping** for each label you intend to send from Entra:

<figure><img src="/files/pCEHHWTBJ9q8vsdBhpNn" alt=""><figcaption></figcaption></figure>

### Step B — Define App Roles on the App Registration

App Roles live on the **App Registration**, not the Enterprise application.

<figure><img src="/files/jtrlDQGezkCNF6vsi6wJ" alt=""><figcaption></figcaption></figure>

1. Entra admin → **App registrations** → open the registration that backs your Stack AI enterprise app (same name).
2. **App roles** (under "Manage" on the left-side panel) → **+ Create app role** for each Stack AI role:
   * **Display name**: e.g. `admin` (Must match the `idp_role_value` from Step A.)
   * **Allowed member types**: Users/Groups
   * **Value**: e.g. `admin` (Must match the `idp_role_value` from Step A.)
   * **Description**: anything
   * **Enable this app role?**: Yes
   * Click **Apply**
3. Repeat for editor, viewer, and user.

### Step C — Assign users (or groups) to App Roles

1. Back to the **Enterprise application** → Select your App -> **Manage** -> **Users and groups**.

<figure><img src="/files/R7V2gOIbpdeXlYIyHLrO" alt=""><figcaption></figcaption></figure>

2. **+ Add user/group** → pick a user or group → **Select a role** → choose the app role → **Assign**.

<figure><img src="/files/SRJMnPl1nnRZXGfQdGge" alt=""><figcaption></figcaption></figure>

3. Each user can hold **one** app-role assignment per app. Re-assigning replaces the previous role.
4. If you assign a group, every member inherits the role for SCIM purposes.

### Step D — Map App Roles into the SCIM `roles` attribute

Provisioning blade → **Mappings** → **Provision Microsoft Entra ID Users**:

1. Scroll to the bottom and tick **Show advanced options**.

2. Click **Edit attribute list for customappsso**.

3. Ensure `roles` exists with **Type = String** and **Multi-Valued = True**. Add it if missing. Save.

4. Back in the user mappings list, **+ Add New Mapping**:

   * **Mapping type**: Expression
   * **Expression**: `SingleAppRoleAssignment([appRoleAssignments])`
   * **Target attribute**: `roles[primary eq "True"].value`
   * **Match objects using this attribute**: No
   * **Apply this mapping**: Always

   <figure><img src="/files/sy4m8IADJp5SpvS98uQv" alt=""><figcaption></figcaption></figure>

5. Save.

The `SingleAppRoleAssignment` function emits the user's current app-role **Value** (e.g. `"admin"`), placed into `roles[0].value` with `primary=true` — exactly what StackAI's resolver looks for.

### Step E — Verify

1. **Provision on demand** for a user with an assigned app role.
2. Inspect the outbound SCIM payload — `roles` should be present with the right value.
3. In StackAI → **Settings → Members**, the user's role should reflect the mapping.

### Troubleshooting role mapping

* **`roles` missing from payload** → Step D-3 (schema) wasn't saved, or the user has no app role assigned (Step C).
* **`roles` present but Stack AI uses the default** → label mismatch. The `Value` on the App Role and the `idp_role_value` in Stack AI must match (case-insensitive, no extra whitespace).
* **Existing users not updating** → they don't re-resolve until something on their record changes. Either trigger a Provision on demand for each, or wait for the next sync cycle and ensure their app-role assignment was set/changed (which forces an update).
* **Multiple app-role assignments** → not supported by `SingleAppRoleAssignment`. Use only one app role per user.

### Lightweight alternative

If you don't want to manage App Roles, set a single constant role for everyone:

* In **Mappings → Provision Microsoft Entra ID Users**, **+ Add New Mapping**:
  * **Mapping type**: Constant
  * **Constant value**: `member`
  * **Target attribute**: `roles[primary eq "True"].value`
* Add one matching role mapping in Stack AI: `member` → Member.

Everyone gets the same role on provisioning; admins are promoted manually inside Stack AI. Simpler, less Entra to manage, but no role differentiation from the IdP.

***

### Quick reference

<table data-search="false"><thead><tr><th>Question</th><th>Where it's configured</th></tr></thead><tbody><tr><td>Who can SSO into Stack AI?</td><td>Entra app → Users and groups (assignment), SSO blade (provider config)</td></tr><tr><td>Who gets provisioned?</td><td>Entra app → Users and groups (must be assigned <strong>and</strong> in Provisioning scope)</td></tr><tr><td>What attributes flow over?</td><td>Entra app → Provisioning → Mappings</td></tr><tr><td>Where is my SCIM token?</td><td>Stack AI → SCIM Provisioning page (regenerate if lost)</td></tr><tr><td>Why isn't my group syncing?</td><td>(1) <code>Sync groups</code> toggle in Stack AI, (2) group itself assigned to the app, (3) Group mapping enabled in Entra</td></tr><tr><td>Why is everyone getting the wrong role?</td><td>Role mapping label mismatch, or no <code>roles</code> claim in SCIM payload</td></tr><tr><td>How fast does a change propagate?</td><td>Every ~40 minutes, or instantly via <strong>Provision on demand</strong></td></tr></tbody></table>

[^1]: blade = page


# Workflow Notifications

Stack AI can alert you when a workflow starts failing repeatedly, so you can catch broken workflows before they affect your users.

### How it works

Every time a workflow run fails, Stack AI tracks the number of consecutive failures. Once that count reaches a threshold, a notification is sent. The counter resets as soon as a run succeeds.

By default, you are notified after **3 consecutive failures**. The notification is sent via **email** and as an **in-app alert** (bell icon, top nav).

The email subject is `StackAI Flow Error Notification` and includes the workflow name and the number of consecutive failures. The in-app alert reads: *"Project \[name] failed N times in a row"* and links directly to the workflow's analytics page.

### Configuring notifications

There are two places where you can configure this:

#### 1. Account Settings → Notifications

**Where:** Click your avatar → Settings → Notifications

This is the global configuration for your organization. It controls two things:

* **Channels** — whether alerts are sent via Email, In-App, or both. Toggle these on or off per notification type in the table.
* **Threshold** — the number of consecutive failures before an alert fires. Click **Manage** (admins only) next to *Workflow Error* to change it from the default of 3.

Admins see two tabs:

* **Organization** — sets the defaults that apply to all workflows and all members. Only admins can edit this.
* **Personal** — lets each user override which channels they receive notifications on, regardless of the org default.

Non-admins only see the Personal tab.

<figure><img src="/files/CvKOPbyeaownezNpB4Rt" alt=""><figcaption></figcaption></figure>

#### 2. Workflow Settings → Workflow Notifications

**Where:** Open a workflow → Settings icon (top-right) → Workflow Notifications tab

This lets you set a **per-workflow threshold** that overrides the org-level default for that specific workflow. For example, if the org default is 3 but this workflow is customer-facing, you can set it to 1 to be alerted on the first failure.

Click **Manage** next to *Workflow Error* to set the threshold for this workflow.

<figure><img src="/files/cOttEXHDsaRGNABjkxKi" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The per-workflow threshold only overrides the *when* — the channels (Email, In-App) are always controlled from Account Settings.
{% endhint %}

### Who gets notified

By default, notifications are sent to the **project creator** and all **organization admins**.

You can customize this from the **Manage** dialog in either the Account Settings or the Workflow Settings (described above). Both dialogs include a **Users to notify** field where you can select specific members of your organization. When set, notifications go to those users instead of the default recipients.


# Environment Variables

Store encrypted secrets outside your workflow and resolve stage-specific values at runtime.

Environment variables store sensitive values like API keys and tokens outside your workflow. This keeps secrets encrypted and out of node settings.

{% hint style="info" %}
Use environment variables for secrets and stage-specific configuration.
{% endhint %}

### Why use environment variables

Environment variables keep credentials out of your workflow.

They also let you use different values in development, staging, and production without editing your nodes each time.

### What you’ll do

* Create an environment and add variables.
* Link an environment to a project.
* Reference variables inside a workflow.
* Understand runtime resolution and access control.

### Create an environment and add variables

Go to **Settings** → **Environments** in your org sidebar.

An environment is a named container for variables.

You can create multiple environments for different teams, projects, or security boundaries.

<figure><img src="/files/zRsDP5uv2Dt9ux1CI7Zg" alt=""><figcaption></figcaption></figure>

Inside an environment, click **Add Variable**.

Fill in these fields:

* **Key** — the identifier used in your workflow, like `OPENAI_API_KEY`. Use underscores only.
* **Development Value** — the value used in the development stage.
* **Staging Value** — the value used in the staging stage.
* **Production Value** — the value used in the production stage.

All values are encrypted at rest.

<p align="center"><img src="/files/F5F3H8sfUqBveMRwScQN" alt="" data-size="original"></p>

Click **Save** to store the variable. The key stays visible. Values stay masked by default.

### Link an environment to your project

Variables do not apply to a project automatically.

Open your project in the Flow Editor.

Find the environment selector in the project settings panel or version toolbar. Then choose the environment you want.

<p align="center"><img src="/files/zzT7CZDc9jHOKEbcHVWo" alt=""></p>

The linked environment determines which values resolve at runtime. Only one environment can be linked to a project version at a time.

If you switch environments, the next run uses the new values.

### Reference variables inside a workflow

Use the variable picker anywhere you want to insert an environment variable.

In any text field, open the variable picker and choose the variable you want.

The picker includes:

* **System Variables** — built-in values used during a run
* **Environment Variables** — variables from the linked environment

Click a variable chip to insert it inline.

<figure><img src="/files/s4RuWRYBp7qe0nNfsxmA" alt=""><figcaption></figcaption></figure>

After insertion, the variable appears as a chip in the field. The raw value does not appear in the editor.

You can use the picker in prompts, system messages, headers, URLs, request bodies, code nodes, and conditions.

### How variables resolve at runtime

When a workflow run starts, StackAI looks up the environment linked to that project version. It then checks the current stage and decrypts the matching value for each variable.

Values resolve before any node runs. By the time an API call or LLM node executes, the selected variable has already been replaced with the real value.

Keep these rules in mind:

* The workflow must be **Published** for environment variables to resolve in live runs.
* If a referenced key does not exist in the linked environment, the run fails.
* Changing the linked environment affects the next run immediately.

{% hint style="warning" %}
Draft saves do not trigger environment variable resolution in live runs.
{% endhint %}

### Access control by role

Your org role settings control who can view or change environment variables.

Go to **Organization** → **Environments** → **Permissions** to manage access.

| Role       | Access                                                       |
| ---------- | ------------------------------------------------------------ |
| **Viewer** | See variable keys only. Values stay masked.                  |
| **Editor** | View keys, create variables, and update values.              |
| **Admin**  | Full control, including deleting variables and environments. |

Editors can update values, but they cannot delete environments.

### Best practices

* **Do not hardcode secrets.** Secrets pasted into node fields stay visible to anyone with project access.
* **Use separate values per stage.** Point development and staging to test systems. Reserve production credentials for production only.
* **Name keys consistently.** A format like `SERVICE_ENV_KEY` keeps secrets easy to scan.
* **Review access regularly.** Remove access when a teammate no longer needs it.
* **Publish before live testing.** Publish the workflow before testing against real services.
* **Separate environments by security boundary.** Do not reuse one environment across unrelated projects.


# Start Here

Choose the fastest path to learn StackAI and ship your first workflow.

StackAI helps you build AI agents, connect your systems, and deploy to users from one platform.

Start with the path that matches your goal.

{% hint style="info" %}
If you want the fastest path, learn the builder, launch one agent, then deploy an interface.
{% endhint %}

### Choose your first step

<table data-view="cards"><thead><tr><th>Start here</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>New to Generative AI?</strong><br>Learn the core concepts behind LLMs, embeddings, vector stores, and multimodal models.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/fts40rq5YQVXfoLQqyIT">/spaces/FSlso1Kjob5CLDrh0dVn/pages/fts40rq5YQVXfoLQqyIT</a></td></tr><tr><td><strong>Get Started with Workflow Builder</strong><br>Learn the canvas, nodes, tools, and how workflows run in StackAI.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/IW7bYbSsnOtcAIy96ME0">/spaces/FSlso1Kjob5CLDrh0dVn/pages/IW7bYbSsnOtcAIy96ME0</a></td></tr><tr><td><strong>Deploying Your First Agent</strong><br>Follow a practical rollout plan from kickoff through pilot and production.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/8e6P9XDM92OYr6usOXZm">/spaces/FSlso1Kjob5CLDrh0dVn/pages/8e6P9XDM92OYr6usOXZm</a></td></tr></tbody></table>

### Learn in the format you prefer

<table data-view="cards"><thead><tr><th>Format</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>Guided learning path</strong><br>Follow a structured curriculum for beginner, intermediate, or advanced builders.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/7b87ac9b5026cd833979f831a3bfc143348b160b">/spaces/FSlso1Kjob5CLDrh0dVn/pages/7b87ac9b5026cd833979f831a3bfc143348b160b</a></td></tr><tr><td><strong>Browse by topic</strong><br>Jump directly to the docs you need by skill level and task.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/NcFwq4Re0F0NlmjngLNa">/spaces/FSlso1Kjob5CLDrh0dVn/pages/NcFwq4Re0F0NlmjngLNa</a></td></tr><tr><td><strong>Training and enablement</strong><br>Use learning resources for deeper product training.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/WFdtxHXcbDqcPS72BL3f">/spaces/FSlso1Kjob5CLDrh0dVn/pages/WFdtxHXcbDqcPS72BL3f</a></td></tr></tbody></table>

### Common next steps

<table data-view="cards"><thead><tr><th>Next step</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>Start from a template</strong><br>Use a prebuilt workflow to move faster.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/7nryHvj8tkhFdvcgCaxB">/spaces/FSlso1Kjob5CLDrh0dVn/pages/7nryHvj8tkhFdvcgCaxB</a></td></tr><tr><td><strong>Add retrieval and context</strong><br>Connect documents and data with knowledge bases.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/IyHE7n42v7FygdPABjeO">/spaces/FSlso1Kjob5CLDrh0dVn/pages/IyHE7n42v7FygdPABjeO</a></td></tr><tr><td><strong>Deploy to end users</strong><br>Publish your workflow as chat, form, batch run, Slack, Teams, or API.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/tcT72WNJuTY44XsoPx6t">/spaces/FSlso1Kjob5CLDrh0dVn/pages/tcT72WNJuTY44XsoPx6t</a></td></tr></tbody></table>

### Build for production

When you move beyond your first prototype, focus on security, reliability, and visibility.

* Use [Security in StackAI](/welcome-to-stackai/security-and-governance/security-in-stackai) to manage access, authentication, and permissions.
* Use [Observability](/agentic-adoption-and-security/observability) to monitor adoption, quality, and workflow performance.
* Use [Best Practices](/getting-started/best-practices) to improve workflow design and agent quality.


# New to Generative AI?

Understand how it works.

### What is Generative AI?

Generative AI refers to a type of artificial intelligence that is capable of generating content. It involves the use of models trained to generate new data that mimic the distribution of the training data. Generative AI can create a wide array of content, including but not limited to text, images, music, and even synthetic voices.

### What is an LLM?

LLM stands for Large Language Model. These models, such as GPT-4, are a type of artificial intelligence model that uses machine learning to produce human-like text. Large Language Models are trained on vast amounts of text data and can generate sentences by predicting the likelihood of a word given the previous words used in the text. They can be fine-tuned for a variety of tasks, including translation, question-answering, and writing assistance. These models are called "large" because they have a huge number of parameters. For example, GPT-4, one of the largest models as of today, has about 1.8 trillion adjustable parameters. Their large parameter count allows these models to capture a wide range of language patterns and nuances, but also makes them computationally expensive to train and use.

### What type of applications can I build with Generative AI?

Generative AI models have a wide range of potential applications across numerous fields. Here are some examples:

1. **Content Creation:** These models can generate new pieces of text, music, or artwork. For example, AI could create music for a video game, generate a script for a movie, or produce articles or reports.
2. **Chatbots and Virtual Assistants:** Generative models can be used to create conversational agents that can carry on a dialogue with users, generating responses to user queries in a natural, human-like manner.
3. **Image Generation and Editing:** Generative Adversarial Networks (GANs) can generate realistic images, design graphics, or even modify existing images in significant ways, such as changing day to night or generating a person's image in the style of a specific artist.
4. **Product Design:** AI can be used to generate new product designs or modify existing ones, potentially speeding up the design process and introducing new possibilities that human designers might not consider.
5. **Medical Applications:** Generative AI can be used to create synthetic medical data, simulate patient conditions, or predict the development of diseases.
6. **Personalized Recommendations:** AI models can generate personalized content or product recommendations based on user data.
7. **Data Augmentation:** In situations where data is scarce, generative models can be used to create synthetic data to supplement real data for training other machine learning models.

### What is an embedding?

Embeddings are numerical representations of concepts converted to number sequences, which make it easy for computers to understand the relationships between those concepts. They are capable of capturing the context of a word in a document, its semantic and syntactic similarity, and its relation with other words.

### What is a vector store?

A vector store in the context of machine learning is a storage system or database designed to handle vector data efficiently. Vector data is commonly used in fields like natural language processing and computer vision, where high-dimensional vectors are used to represent complex data like words, sentences, or images. Vectors stores are often optimized for operations that are common in machine learning, like nearest neighbor search, which involves finding the vectors in the store that are closest to a given vector. This is particularly useful in tasks like recommendation systems, where you might want to find the items that are most similar to a given item.

### What is a multimodal model?

A multimodal model in the field of artificial intelligence is a model that can handle and integrate data from multiple different modalities, or types, of input. These types of inputs can include text, images, audio, video, and more. The main advantage of multimodal models is that they can leverage the strengths of different data types to make better predictions. For example, a model that takes both text and image data as input might be able to understand the context better than a model that only uses one or the other.

### What is the memory of an LLM?

A Large Language Model (LLM) can generate text based on what it has seen before if it has memory. The term "memory" in this context refers to how much of the previous text the model can consider when producing new text. Memory is a different concept than the training set used to train the model. The model can answer things from what it knows given the training set that was given. Additionally, considering that you are chatting with chatGPT, the model will respond to your queries considering the last responses and queries as well. This "memory" of the model is indeed crucial when dealing with long pieces of text or conversations, as it determines how much of the previous context the model can use to generate accurate and coherent responses.


# Deploying Your First Agent

Your step-by-step guide to launching AI assistants and workflows that deliver measurable business value with StackAI. This playbook provides a complete checklist for customers building and implementing their first AI agents, from technical setup and use case selection through pilot testing and production rollout.

***

### Deployment Outcomes

Following these steps, you’ll achieve:

* **3 AI agents** validated with real users in production
* **Success metrics** tied to business outcomes (time saved, accuracy, user satisfaction)
* **Secure connections** to your systems and knowledge bases
* **A practical scale plan** with governance and ROI tracking

***

### Timeline at a Glance

**Setup (Week 0)**

* Readiness, use case selection, technical setup, planning

**Month 1 (Weeks 1-4)**

* Build and test Use Case 1
* Build Use Case 2

**Month 2 (Weeks 5-8)**

* Deploy Use Case 1 to production
* Test and deploy Use Case 2 to production
* Build Use Case 3

**Month 3 (Weeks 9-12)**

* Test and deploy Use Case 3 to production
* Business review & expanded rollout planning

<figure><img src="/files/3LG1veEx4tgeeZFphUFl" alt=""><figcaption></figcaption></figure>

***

### Your Step-by-Step Journey

#### Setup (Week 0): Kickoff and Alignment

**Milestone Goal:** Complete technical readiness and align on use case definitions.

**Sessions**

* **StackAI Kickoff (60 min):** Team introductions, platform overview, technical readiness assessment, and definition of build, evaluation, and rollout plans.
* **Use Case Discovery Session (60 min):** Discover use cases in brainstorming session and filter down to high-value use cases.

**Technical Setup**

* Configure SSO, integrate systems, index knowledge bases, and establish guardrails.

***

#### Month 1 (Weeks 1-4): Build Use Cases 1 & 2

**Milestone Goal:** Establish core architecture and complete initial builds.

* **General:** Initiate weekly 60-minute build sessions (recurring through Month 3) plus offline support.
* **Use Case 1:** Begin development. Live test Use Case 1 to pilot testers; iterate quickly based on feedback.
* **Use Case 2:** Begin development of Use Case 2.

***

#### Month 2 (Weeks 5-8): Launch Use Case 1, Test Use Case 2, and Build Use Case 3

**Milestone Goal:** Successful rollout of Use Case 1 and strategic on-site alignment.

* **Use Case 1:** Demo production-ready end-to-end flow. Validate against KPIs and acceptance thresholds. Launch Use Case 1 to target users; monitor dashboards, latency/cost, and audit trails.
* **Use Case 2:** Continue development. Live test Use Case 2 to pilot testers; iterate quickly based on feedback.
* **Use Case 3:** Begin development of Use Case 3.
* **On-site Visit:** Wide-scale use case brainstorming and enablement session. Demo production-ready flows and prepare for scaling.

***

#### Month 3 (Weeks 9-12): Launch Use Cases 2 & 3

**Milestone Goal:** Use Case 2 and 3 rollout, scaling strategy definition and expanded use case planning.

* **Use Case 2:** Run UAT with evaluation sets. Launch Use Case 2 to target users.
* **Use Case 3:** Live test Use Case 3 to pilot testers. UAT and rollout for Use Case 3.
* **Scaling Planning:** Scale plan for expanded rollouts and new integrations/channels.
* **Business Review:** Analyze KPI impact, review rollout process, and identify business areas for agent expansion.

***

### Keys to Success

#### What We Need From You

* **Assign key roles:** Use Case Owner(s), Builders, Testers, IT contact
* **Define 3 use cases** with clear success outcomes and KPIs
* **Provide access** to required systems and data sources
* **Join weekly build sessions** and share timely feedback
* **Coordinate pilot users** for testing and rollout

***

#### Success Signals

* Growing company-wide agents adoption and weekly active users
* KPI improvements (accuracy, time saved, CSAT, deflection)
* Stakeholders request additional use cases and integrations
* Champions share reusable agents across teams

***

#### Common Pitfalls to Avoid

* **Starting with too many use cases** - Start small with 3, then expand
* **Missing guardrails** - Set roles, approvals, and cost limits early
* **No baseline metrics** - Measure from day one

***

### What’s Next?

#### Ready to Begin?

1. **Book your StackAI intro and kickoff**
2. **Select your first 3 use cases** and invite pilot users

***

#### Want to Get Started?

**Book your** [**demo**](https://www.stack-ai.com/demo) **today!**


# Get Started with Workflow Builder

A guide to the Workflow View

Our no-code approach is anchored in a visual workflow builder that prioritizes ease of use. This is achieved through an intuitive drag-and-drop interface, with built-in chatbot assistance, and an optimal level of abstraction that caters to both technical and non-technical teams. Search for nodes in the menu on the left, drop them onto the canvas, select parts of your workflow, and even copy/paste nodes across projects!

<figure><img src="/files/EMzET37wjEXpGnxw7p5C" alt=""><figcaption></figcaption></figure>

Technical teams can extend capabilities even further by using a custom “Code” node (e.g. Python), a custom “API” node, or by building their own tools to orchestrate LLM-driven actions (coming soon!).

Our users can integrate with a broad ecosystem of applications, enabling support for the most common use cases across departments.

| Department / Use Case         | Integrations                                                                                 |
| ----------------------------- | -------------------------------------------------------------------------------------------- |
| Data & Analytics              | Power BI, BigQuery, Databricks, Snowflake, Fred, Excel (Sharepoint), GSheets, Typeform, etc. |
| Engineering & Dev Tools       | Github, Regex, SerpAPI, Weaviate, etc.                                                       |
| AI & Machine Learning         | E2B, Pinecone, Wolfram Alpha, HyperBrowser, Reducto, VLM                                     |
| CRM & Sales                   | Salesforce, HubSpot, LinkedIn, PitchBook, Yahoo Finance                                      |
| Marketing                     | HubSpot, LinkedIn, Gmail, Outlook, YouTube                                                   |
| Project & Task Management     | Asana, Clickup, Jira, Notion, Make, Coda, Miro                                               |
| Collaboration & Communication | Slack, Loom, Gmail, Outlook, GDocs, Knowledge Base                                           |
| ERP & Business Operations     | Oracle, NetSuite, Workday, Veeva                                                             |
| Storage & File Systems        | Google Drive, Dropbox, OneDrive, SharePoint, SharePoint (NTLM), Azure Blob Storage, AWS S3   |
| Finance & Reporting           | Excel, Airtable, Power BI, Yahoo Finance                                                     |
| Forms & Surveys               | Typeform, GSheets                                                                            |
| HR & People Ops               | Workday, Outlook, LinkedIn                                                                   |
| Automation & Integration      | Hightouch, Make, Slack                                                                       |
| Web & Social Monitoring       | YouTube, Firecrawl, Exa AI                                                                   |

Our users can connect to a wide range of AI models:

| AI Model     | Integrations                                                                                                                                                                          |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| LLMs         | OpenAI, Anthropic, Google, Meta, xAI, Mistral, Perplexity, TogetherAI, Cerebras, Replicate, Groq, Azure, Bedrock, any local LLM via end-point, StackAI’s fine-tuned text-to-SQL model |
| Voice models | Deepgram, Whisper 1                                                                                                                                                                   |
| Image models | Nano Banana Pro, Nano Banana, Flux, GPT Image 1.5                                                                                                                                     |

StackAI also supports connections with MCP servers, allowing your workflows to use not only integrations developed by StackAI’s team, but also integrate with tools served by third parties using the MCP protocol.

<figure><img src="/files/3Oje3zQkEyt7TbOTY4Oz" alt=""><figcaption></figcaption></figure>

Making LLMs take autonomous actions is very easy. Users can add ‘tools’ (e.g., function calling) directly in the LLM node by selecting the one they want from a long list of possible actions. More advanced users can also add their own custom tools.

<figure><img src="/files/OOIydBpXq8CnPwTZI27d" alt=""><figcaption></figcaption></figure>

### Ask Workflow

Users can interact with the assistant directly within the workflow builder to ask questions, get suggestions for improving their project, and easily access documentation for specific features.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFSlso1Kjob5CLDrh0dVn%2Fuploads%2FK8s5TzJ7evvnEQgTlBIq%2FWF%20Builder%20-%20Ask%20question.mp4?alt=media&token=31da708f-7ff3-4394-ac2d-bf274e197d5a>" %}

All past conversations with the built-in workflow assistant can also be viewed in one place.

<figure><img src="/files/UwdXata96E8qusaopcI7" alt=""><figcaption></figcaption></figure>


# Templates

As you start building, you can reference a variety of pre-built templates we have available, or save your own workflow as a template for future reference.

### Access Existing Templates

#### New Workflow Builder Project

When you create a new **Workflow Builder** project, you can either start from scratch by selecting **New Project** or start from a predefined **template**. Templates are organized by **creator** (your organization or Stack AI), **use case**, or **integration**, making it easy to find a starting point that fits your needs.

<figure><img src="/files/dRKg80IlCfDJhR4I6o6L" alt=""><figcaption></figcaption></figure>

#### AI Agent

You can also select a template directly from within **Workflow Builder** when configuring an **AI Agent** node.

<figure><img src="/files/rQesMNKPchHLEv3mtomn" alt=""><figcaption></figcaption></figure>

### Creating New Templates

You can save a workflow you've built as a template, which will make it available to the rest of the StackAI community. Please note that linked connections and knowledge bases will be stripped from the template for security reasons.

<figure><img src="/files/ClMiffNqOlRCNHwidk6w" alt=""><figcaption></figcaption></figure>


# Learning

Choose the best way to learn StackAI, from guided paths to videos and hands-on examples.

StackAI gives you multiple ways to learn. Pick the format that matches your goal.

{% hint style="info" %}
Start with the curriculum for a guided path. Use tutorials when you want hands-on practice fast.
{% endhint %}

### Choose your learning format

<table data-view="cards"><thead><tr><th>Format</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>Guided learning paths</strong><br>Follow beginner, intermediate, and advanced builder tracks.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/7b87ac9b5026cd833979f831a3bfc143348b160b">/spaces/FSlso1Kjob5CLDrh0dVn/pages/7b87ac9b5026cd833979f831a3bfc143348b160b</a></td></tr><tr><td><strong>Video training</strong><br>Learn with walkthroughs on building, deploying, and managing agents.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/WFdtxHXcbDqcPS72BL3f">/spaces/FSlso1Kjob5CLDrh0dVn/pages/WFdtxHXcbDqcPS72BL3f</a></td></tr><tr><td><strong>Browse by topic</strong><br>Jump directly to the right docs by skill level and task.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/NcFwq4Re0F0NlmjngLNa">/spaces/FSlso1Kjob5CLDrh0dVn/pages/NcFwq4Re0F0NlmjngLNa</a></td></tr></tbody></table>

### Learn by goal

<table data-view="cards"><thead><tr><th>Goal</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>Build your first workflow</strong><br>Choose a fast path from setup through deployment.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/onrHZOZQyI5ySnyvvUt0">/spaces/FSlso1Kjob5CLDrh0dVn/pages/onrHZOZQyI5ySnyvvUt0</a></td></tr><tr><td><strong>Strengthen core AI concepts</strong><br>Learn prompting, embeddings, chunking, and multi-model workflows.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/p2eQNqQyV36ddMYQQ4ae">/spaces/FSlso1Kjob5CLDrh0dVn/pages/p2eQNqQyV36ddMYQQ4ae</a></td></tr><tr><td><strong>Practice with tutorials</strong><br>Build real examples and adapt them to your own use case.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/cgqAxr2zF5wqXFxe6xsi">/spaces/FSlso1Kjob5CLDrh0dVn/pages/cgqAxr2zF5wqXFxe6xsi</a></td></tr></tbody></table>

### Keep improving

As you move from learning to production, focus on quality, governance, and visibility.

* Use [Best Practices](/getting-started/best-practices) to improve workflow design and agent quality.
* Use [Security in StackAI](/welcome-to-stackai/security-and-governance/security-in-stackai) to manage access, permissions, and authentication.
* Use [Observability](/agentic-adoption-and-security/observability) to measure usage, quality, and performance.


# StackAI Curriculum

Curriculum and learning paths for building, integrating, and operating StackAI workflows.

## Curriculum overview

Use this curriculum to build with StackAI. Pick a path based on your current goals.

### Choose a builder path

<table data-view="cards"><thead><tr><th>Level</th><th>Path</th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Beginner</strong><br>Build a workflow, add a small knowledge base, and deploy.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/FrEXVA0cyiQMMTFTvull">Builder Path - Beginner</a></td><td><a href="/files/xXqgMAbig2C5PWdXVjAC">/files/xXqgMAbig2C5PWdXVjAC</a></td></tr><tr><td><strong>Intermediate</strong><br>Integrate actions, add routing, and implement fallback paths.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/7WCRr4xUM55Rbqze74kq">Builder Path - Intermediate</a></td><td><a href="/files/pPIM6hkD0xSDEe2vIsRo">/files/pPIM6hkD0xSDEe2vIsRo</a></td></tr><tr><td><strong>Advanced</strong><br>Configure governance controls and operate workflows in production.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/td7dgksuD73cwPvlQocu">Builder Path - Advanced</a></td><td><a href="/files/fUgCxhQhJrcWfAv1MeJa">/files/fUgCxhQhJrcWfAv1MeJa</a></td></tr></tbody></table>

### How to use this curriculum

* Follow steps in order.
* Treat each step as a build milestone.
* Use “Quick jumps” when you need a reference page.

### Prefer browsing instead of a path?

Use the [Stack AI Documentation Map](/welcome-to-stackai/overview/stack-ai-documentation-map).


# Builder Path - Beginner

A step-by-step learning path to build and deploy your first StackAI workflow.

## Beginner builder path

Build a basic workflow. Deploy it to end users. Troubleshoot common issues.

### Outcomes

By the end, you will be able to:

* Build a workflow that runs end-to-end in the builder.
* Pass data between nodes using inputs and outputs.
* Add a knowledge base and retrieve context in a workflow.
* Deploy a workflow as a Chat Assistant or Form.
* Use run traces to debug failures.

### Quick jumps

<table data-view="cards"><thead><tr><th>Topic</th><th>Start here</th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Learn the canvas</strong><br>Nodes, runs, publishing, and data flow.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/IW7bYbSsnOtcAIy96ME0">Get Started with Workflow Builder</a></td><td><a href="/files/uwZpQXt7aAJwnSfPU25m">/files/uwZpQXt7aAJwnSfPU25m</a></td></tr><tr><td><strong>Build an agent end-to-end</strong><br>Follow a full deployment checklist.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/8e6P9XDM92OYr6usOXZm">Deploying Your First Agent</a></td><td><a href="/files/th9ozFPuP2qpYAX1jxNn">/files/th9ozFPuP2qpYAX1jxNn</a></td></tr><tr><td><strong>Wire data between nodes</strong><br>Define inputs, map variables, shape outputs.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/5wzH56PF45e9ni8OBCDA">Inputs</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/1rzYB3SPYsCw4gQ4M4Wx">Outputs</a></li></ul></td><td><a href="/files/OYKa4sO5MAmiZtiBe2sp">/files/OYKa4sO5MAmiZtiBe2sp</a></td></tr><tr><td><strong>Knowledge bases (RAG)</strong><br>Add documents and retrieve relevant context.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/IyHE7n42v7FygdPABjeO">Knowledge Bases</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/yfOs804Ic7R1v63oPRAj">How to Use Knowledge Bases</a></li></ul></td><td><a href="/files/5ISkLW6a7BK7oRsiMwkI">/files/5ISkLW6a7BK7oRsiMwkI</a></td></tr><tr><td><strong>Deploy to users</strong><br>Chat, form, or API.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/A4DkSfXnyfPvWzO4wHlt">Deploy with the Export View</a></td><td><a href="/files/OHtUNBg2UvNznLx3AgXg">/files/OHtUNBg2UvNznLx3AgXg</a></td></tr><tr><td><strong>Debug your first run</strong><br>Traces, logs, and common failure modes.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/iUrAo2e5tc0hKLRGMYYw">Troubleshoot a Workflow</a></td><td><a href="/files/kILZ5vGqhr6rqSd6NJKJ">/files/kILZ5vGqhr6rqSd6NJKJ</a></td></tr></tbody></table>

### The path

{% stepper %}
{% step %}

### 1) Orientation

Review the platform and builder workflow. Focus on node wiring, runs, and publishing.

* [Platform Overview](/welcome-to-stackai/overview/platform-overview)
* [Get Started with Workflow Builder](/getting-started/start-here/get-started-with-workflow-builder)
  {% endstep %}

{% step %}

### 2) Build a tiny workflow

Build `Input → LLM → Output`. Run it with a few representative test inputs.

* [Inputs](/workflow-builder/inputs)
* [LLM Node](/workflow-builder/core-nodes/ai-agent-node)
* [Outputs](/workflow-builder/outputs)
  {% endstep %}

{% step %}

### 3) Improve response consistency

Add structure to the LLM prompt. Use explicit instructions and an expected output format.

* [Instruction vs Prompt](/getting-started/core-ai-concepts/instruction-vs-prompt)
* [Prompt Engineering](/getting-started/core-ai-concepts/prompt-engineering)
  {% endstep %}

{% step %}

### 4) Add a knowledge base (RAG)

Create a knowledge base from a small document set. Use it to retrieve relevant context during a run.

* [Knowledge Bases](/workflow-builder/core-nodes/knowledge-bases)
* [How to Use Knowledge Bases](/workflow-builder/core-nodes/knowledge-bases/how-to-use-knowledge-bases)
* [Creating a Knowledge Base](/workflow-builder/core-nodes/knowledge-bases/creating-a-knowledge-base)
  {% endstep %}

{% step %}

### 5) Deploy and troubleshoot

Deploy to an interface. Use the run trace to identify failures and incorrect outputs.

* [Deploy with the Export View](/interface-and-deployment/end-user-interfaces/deploy-with-the-export-view)
* [Chat Assistant](/interface-and-deployment/end-user-interfaces/chat-assistant)
* [Form](/interface-and-deployment/end-user-interfaces/form)
* [Troubleshoot a Workflow](/guides-and-tips/stackai-hacks/troubleshooting-a-workflow)
  {% endstep %}
  {% endstepper %}


# Builder Path - Intermediate

A learning path for builders who want better quality, integrations, automation, and reliability.

## Intermediate builder path

Improve response quality. Integrate workflow actions. Implement routing and error handling.

### Outcomes

By the end, you will be able to:

* Configure the LLM node for consistent, structured outputs.
* Call at least one integration action from a workflow.
* Route execution using logic nodes.
* Implement fallback paths for expected failure modes.
* Evaluate results and monitor production usage.

### Quick jumps

<table data-view="cards"><thead><tr><th>Topic</th><th>Start here</th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>LLM configuration</strong><br>Tool use, settings, and reliability knobs.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/YjEQjSjqwYs4YdqzgwL9">LLM Node</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/bXdQDPCbUAF0P1kePQTz">Prompting</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/zHZW3c7ySYSkcDTyB5GN">Tools</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/xnjRMZjmgnc0IBxj3VOL">Advanced Settings</a></li></ul></td><td><a href="/files/Qj81Tt6j94ru9URhv9aq">/files/Qj81Tt6j94ru9URhv9aq</a></td></tr><tr><td><strong>Integrations</strong><br>Call external services and write results back.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/vf4ogE30dPrbepGzbZM0">Apps</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/Dm31MgnDl0Mj9OxKlI7k">Action Node</a></li></ul></td><td><a href="/files/qTxLFYfvDU5qTRcawto1">/files/qTxLFYfvDU5qTRcawto1</a></td></tr><tr><td><strong>Control flow</strong><br>Branching, routing, and loops.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/MTfF9Ykq5ixKqVv1Jy9F">Logic</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/RyGHbfepRiS6MbZ5Wa6b">AI Routing</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/RdhF2CKFrSstOtWaDDjp">If/Else Node</a></li></ul></td><td><a href="/files/pPIM6hkD0xSDEe2vIsRo">/files/pPIM6hkD0xSDEe2vIsRo</a></td></tr><tr><td><strong>Error handling</strong><br>Fallback paths and troubleshooting.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/RW9CA5BzKp03ejxJX354">Fallback &#x26; Error Handling</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/iUrAo2e5tc0hKLRGMYYw">Troubleshoot a Workflow</a></li></ul></td><td><a href="/files/IdWIs1BwAUqgPphSCn9K">/files/IdWIs1BwAUqgPphSCn9K</a></td></tr></tbody></table>

### The path

{% stepper %}
{% step %}

### 1) Establish a quality baseline

Define acceptance criteria and output format. Update prompts to consistently meet those requirements.

* [Instruction vs Prompt](/getting-started/core-ai-concepts/instruction-vs-prompt)
* [Prompt Engineering](/getting-started/core-ai-concepts/prompt-engineering)
* [How to Improve LLM Performance](/workflow-builder/core-nodes/ai-agent-node/llm-hosting-and-governance/how-to-improve-llm-performance)
  {% endstep %}

{% step %}

### 2) Configure the LLM node

Configure prompts and tools for structured outputs. Tune model settings based on latency, cost, and quality.

* [LLM Node](/workflow-builder/core-nodes/ai-agent-node)
* [Prompting](/workflow-builder/core-nodes/ai-agent-node/prompting)
* [Tools](/workflow-builder/core-nodes/ai-agent-node/tools)
* [Advanced Settings](/workflow-builder/core-nodes/ai-agent-node/advanced-settings)
  {% endstep %}

{% step %}

### 3) Add one integration

Integrate one application action. Validate the action inputs and outputs end-to-end.

* [Apps](/workflow-builder/apps)
* [Action Node](/workflow-builder/outputs/action-node)
  {% endstep %}

{% step %}

### 4) Add routing and control flow

Add routing and branching. Add explicit error handling for expected failure modes.

* [AI Routing](/workflow-builder/utils-logic-and-others/logic/ai-routing)
* [If/Else Node](/workflow-builder/utils-logic-and-others/logic/if-else-node)
* [Fallback & Error Handling](/guides-and-tips/stackai-hacks/handling-errors-and-fallback)
  {% endstep %}

{% step %}

### 5) Measure and iterate

Evaluate workflow outputs. Monitor usage and errors.

* [Analytics](/agentic-adoption-and-security/observability/analytics)
* [Evaluator](/agentic-adoption-and-security/observability/evaluator)
  {% endstep %}
  {% endstepper %}


# Builder Path - Advanced

A learning path for admins and advanced builders focused on governance, reliability, and scaling.

## Advanced builder path

Configure governance controls. Operate workflows reliably in production. Standardize building blocks for teams.

### Outcomes

By the end, you will be able to:

* Configure authentication and role-based access.
* Restrict access to connections and knowledge bases.
* Control which model providers are available to your workspace.
* Implement fallbacks and human approval where needed.
* Monitor usage and evaluate workflow quality over time.

### Quick jumps

<table data-view="cards"><thead><tr><th>Topic</th><th>Start here</th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Access + identity</strong><br>RBAC, MFA, and workspace boundaries.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/y57ktLDXN53NMeMdLnKe">Role-Based Access Controls (RBAC) and Groups</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/XlSrNoy8kceVfCTcakyv">Authentication and MFA</a></li></ul></td><td><a href="/files/or8Aa8ls53L40ygyUKMp">/files/or8Aa8ls53L40ygyUKMp</a></td></tr><tr><td><strong>Production reliability</strong><br>Guardrails, fallbacks, and troubleshooting.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/RW9CA5BzKp03ejxJX354">Fallback &#x26; Error Handling</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/iUrAo2e5tc0hKLRGMYYw">Troubleshoot a Workflow</a></li></ul></td><td><a href="/files/IdWIs1BwAUqgPphSCn9K">/files/IdWIs1BwAUqgPphSCn9K</a></td></tr><tr><td><strong>Custom extensions</strong><br>Code, custom APIs, and orchestration patterns.</td><td><ul><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/NGERVUpx51hT7DFkEFse">Python Code</a></li><li><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/cubxULh0Kk6Lk9hi1HQM">Custom API</a></li></ul></td><td><a href="/files/ALm7W0TNBZZHk2Gc1Tgc">/files/ALm7W0TNBZZHk2Gc1Tgc</a></td></tr></tbody></table>

### The path

{% stepper %}
{% step %}

### 1) Configure access controls

Define who can build, run, and publish workflows. Restrict access to workspaces, folders, connections, and knowledge bases.

* [Role-Based Access Controls (RBAC) and Groups](/welcome-to-stackai/security-and-governance/security-in-stackai/role-based-access-controls-rbac-and-groups)
* [Workspace and Folder Access](/welcome-to-stackai/security-and-governance/security-in-stackai/workspace-and-folder-access)
* [Connection and Knowledge Base Permissions](/welcome-to-stackai/security-and-governance/security-in-stackai/connection-and-knowledge-base-permissions)
  {% endstep %}

{% step %}

### 2) Govern models and data

Control which providers and models are available. Define how data is handled for your deployment.

* [LLM Provider Governance](/workflow-builder/core-nodes/ai-agent-node/llm-hosting-and-governance/llm-provider-governance)
* [Security & Privacy](/welcome-to-stackai/security-and-governance/security-and-privacy)
* [AI Governance](/welcome-to-stackai/security-and-governance/ai-governance)
  {% endstep %}

{% step %}

### 3) Implement reliability controls

Handle expected failures with fallbacks. Add human review steps where required.

* [Fallback & Error Handling](/guides-and-tips/stackai-hacks/handling-errors-and-fallback)
* [Human in the Loop](/workflow-builder/core-nodes/stackai/human-in-the-loop)
* [Delay Node](broken://spaces/FSlso1Kjob5CLDrh0dVn/pages/is0huUWyDKnmer3UUB9H)
  {% endstep %}

{% step %}

### 4) Monitor and evaluate in production

Monitor usage, latency, and errors. Evaluate outputs against defined criteria.

* [Analytics](/agentic-adoption-and-security/observability/analytics)
* [Evaluator](/agentic-adoption-and-security/observability/evaluator)
* [Adding Advanced Logging for Analytics](/guides-and-tips/stackai-hacks/adding-advanced-logging-for-analytics)
  {% endstep %}

{% step %}

### 5) Standardize reusable components

Create reusable subflows and shared utilities. Use code and custom APIs for supported extensions.

* [StackAI Project Node](/workflow-builder/utils-logic-and-others/utils/stackai-project-node)
* [Loop Subflow](/workflow-builder/utils-logic-and-others/logic/loop-subflow)
* [Custom API](/workflow-builder/utils-logic-and-others/utils/custom-api)
  {% endstep %}
  {% endstepper %}


# StackAI Academy

Here you will Learn how to build, deploy, and manage secure AI agents using StackAI, the orchestration platform built for modern teams. This Academy is designed for anyone using StackAI.

In this series, you’ll explore everything from connecting data and building workflows to customizing interfaces and applying advanced logic, all without needing to reinvent the wheel.

▶️ Start learning below.&#x20;

{% embed url="<https://www.youtube.com/playlist?list=PLtaG_YVpTyT7ttAXiFFbjMeyUJn4f2-7p>" %}

Video modules include:&#x20;

1\. Platform Overview&#x20;

2\. Building Your First Workflow&#x20;

3\. Agent Builder&#x20;

4\. Deep Dive into UI&#x20;

5\. Connecting your Data to an AI Agent&#x20;

6\. Agentic Tools&#x20;

7\. Using LLMs&#x20;

8\. Logic Nodes&#x20;

9\. Developer Capabilities&#x20;

10\. Apps & Integrations&#x20;

11\. Governance&#x20;

12\. Handling Data

🔗 Try StackAI: <https://stack-ai.com>


# StackAI Building Challenges

Build real workflows with five hands-on challenges.

Each challenge mirrors a common production pattern. Start with any challenge. Build the workflow. Validate the output. Then iterate.

### How to use these challenges

* Pick a challenge that matches the skill you want to practice.
* Build the workflow end to end.
* Use the linked docs for implementation details and edge cases.

### Challenge library

<table data-view="cards"><thead><tr><th>Challenge</th><th data-card-target data-type="content-ref">Open</th></tr></thead><tbody><tr><td><strong>1. Gather Data with HITL</strong><br>Collect missing information in chat and route a completed request by email.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/MPt8BdeAmCWdYYgv3Uuw">/spaces/FSlso1Kjob5CLDrh0dVn/pages/MPt8BdeAmCWdYYgv3Uuw</a></td></tr><tr><td><strong>2. Email a News Report</strong><br>Build a scheduled report that only uses approved news sources.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/ZmT1ciNpdqL3i0fSYBhV">/spaces/FSlso1Kjob5CLDrh0dVn/pages/ZmT1ciNpdqL3i0fSYBhV</a></td></tr><tr><td><strong>3. Send HTTP Requests</strong><br>Use external APIs to create and update work items dynamically.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/7l5qKCAfNDJSu3jRlAtn">/spaces/FSlso1Kjob5CLDrh0dVn/pages/7l5qKCAfNDJSu3jRlAtn</a></td></tr><tr><td><strong>4. Fill an Excel Template</strong><br>Populate a locked template with accurate structured data.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/zEyoI9sDITnDM9eHiQGK">/spaces/FSlso1Kjob5CLDrh0dVn/pages/zEyoI9sDITnDM9eHiQGK</a></td></tr><tr><td><strong>5. Analyze an RFP</strong><br>Validate inputs, extract structured findings, and support follow-up chat.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/7hXUIZ1FjsDwXBDxASPJ">/spaces/FSlso1Kjob5CLDrh0dVn/pages/7hXUIZ1FjsDwXBDxASPJ</a></td></tr></tbody></table>

### Build next

If you want a guided path after these challenges, start with [StackAI Curriculum](/getting-started/learning/stackai-curriculum).


# 1. Gather Data with HITL

Build a procurement intake assistant that collects missing details, confirms the final request, and sends it by email.

## Challenge overview

Build a chat assistant for procurement requests.

Users describe what they need in plain language. The assistant extracts the required fields, asks follow-up questions for anything missing, confirms the final summary, and sends the completed request by email.

### Scenario

> Our operations team spends too much time handling procurement requests manually.
>
> Employees usually describe what they need in Slack using plain language, but someone then has to rewrite that request into a structured format for the procurement team.
>
> This back-and-forth is slow, and important details are often missing or inaccurate by the time the request is forwarded.
>
> We want a chat assistant that lets an employee submit a procurement request in plain language.
>
> The assistant should extract the relevant details, identify any missing critical information, and ask follow-up questions until the request is complete.
>
> Once the employee reviews and confirms the final structured summary, the assistant should send the completed request directly to the procurement contact by email.

### Required fields

Every procurement request must include:

* Vendor name
* Product name
* Quantity
* Deadline
* Special specifications

### Missing information rules

Use these rules when a field is missing:

* **Vendor name**
  * Ask the user to choose one of these pre-approved vendors:
    * Apple
    * Lenovo
    * Dell
    * HP
* **Product name**
  * Ask the user to specify the product.
* **Quantity**
  * Ask the user to specify the quantity.
* **Deadline**
  * Default to `7 days`.
  * Ask the user to confirm or change it.
* **Special specifications**
  * Default to `none`.
  * Ask the user to confirm or add details.

### Sample inputs

* `Hello! I need a laptop for the new sales hire starting Monday`
* `Can you order 3 laptops for the engineering team. I want all Macbook Neo in pink.`

### What to build

Your assistant should:

1. Accept a plain-language request in chat.
2. Extract the required procurement fields.
3. Detect missing information.
4. Ask follow-up questions until the request is complete.
5. Present a structured summary for review.
6. Let the user confirm or correct the summary.
7. Send the final request to the procurement contact by email.

### Key considerations

{% hint style="info" %}

* Use **Ask Human in Chat Interface** when required information is missing.
* Use the tool inside the LLM node when possible.
* Run this workflow in a **Chat Assistant** interface.
* Choose the right response type for each follow-up:
  * `choice` for vendor selection
  * `approval` for default confirmations
  * `text` for open-ended corrections
* Design a clear correction path after the summary step.
  {% endhint %}

### Helpful docs

* [Human in the Loop](/workflow-builder/core-nodes/stackai/human-in-the-loop)
* [Chat Assistant](/interface-and-deployment/end-user-interfaces/chat-assistant)
* [Tools](/workflow-builder/core-nodes/ai-agent-node/tools)
* [Outlook](/workflow-builder/apps/outlook-1)
* [Gmail](/workflow-builder/apps/gmail)


# 2. Email a News Report

Build a scheduled news workflow that only uses approved sources and outputs a polished report.

## Challenge overview

Build an automated news report that runs every Monday, Wednesday, and Friday.

The report must stay short, polished, and consistent. It must only use approved sources.

### Scenario

> We want an automated news report that gets sent to us every Monday, Wednesday, Friday. The report should be short and sweet, but quality is key. It must have two sections:
>
> 1. World News (Politics)
> 2. Legal News
>
> Each section must only research what’s published on our trusted websites (no other sources allowed). The report should be very polished and visually consistent with our newsletter style (see example).

### Scenario

> We want an automated news report that gets sent to us every Monday, Wednesday, Friday.
>
> The report should be short and sweet, but quality is key.
>
> It must have two sections:
>
> 1. World News (Politics)
> 2. Legal News
>
> Each section must only research what’s published on our trusted websites (no other sources allowed).
>
> The report should be very polished and visually consistent with our newsletter style (see example).

The report must include these sections:

1. World News (Politics)
2. Legal News

### Approved sources

#### World News

* Reuters
* Associated Press (AP)
* BBC News
* Financial Times
* The Economist
* The Wall Street Journal

#### Legal News

* Law360
* National Law Review
* ABA Journal
* Just Security

### Formatting reference

Use this file as the design reference for the final report.

{% file src="/files/jEupbc8E5myyCuLVzBCa" %}

#### What to match

{% hint style="info" %}

* Visual hierarchy between the title and section headers
* Consistent spacing between sections
* Clean link styling and readable bullet lists
  {% endhint %}

### What to build

Your workflow should:

1. Run on Monday, Wednesday, and Friday.
2. Check each approved website on every run.
3. Collect only relevant items for the two required sections.
4. Exclude unapproved sources.
5. Format the final output in a consistent newsletter style.
6. Send the report by email.

### Key considerations

{% hint style="info" %}

* Prevent the agent from filling gaps with unapproved sources.
* Make coverage deterministic across all ten approved sites.
* Keep typography, spacing, section headers, bullet style, and link formatting consistent.
* Use **Web Search** when search results are enough.
* Use browser-based tools when page interaction or fixed page rendering is required.
* Keep the design easy to update when the approved site list changes.
  {% endhint %}

### Extension

Add a logo and a header image to every report.

### Helpful docs

* [Web Search](/workflow-builder/apps/web-search)
* [Template Node](/workflow-builder/outputs/template-node)
* [DocRaptor](/workflow-builder/apps/docraptor)
* [Outlook](/workflow-builder/apps/outlook-1)
* [StackAI](/workflow-builder/core-nodes/stackai)


# 3. Send HTTP Requests

Create and update Trello cards from a workflow by mapping API inputs into a Send HTTP Request node.

## Challenge overview

Build a workflow that creates Trello cards from structured user input.

Then extend it to update existing cards by matching the user’s request to the closest card name.

### Scenario

> Our project team is creating Trello cards manually for every new task that comes in — typing titles, descriptions, and due dates one by one.
>
> We need an internal tool where a team member can describe a task, and the system automatically creates a properly structured Trello card in the to-do list on our board.

### Setup

1. Create a free Trello account at [trello.com](https://trello.com).
2. Create a board with at least three lists.
   * Example: `To Do`, `In Progress`, `Done`
3. Get your API key.
4. Generate a token.

### Interface

Build a **Form** interface with these inputs:

* Task
* Description
* List

The `List` input should be a dropdown that contains the list names from your board.

### Sample inputs

* Task: `Design new onboarding screens`
  * Description: `Create mockups for the 3-step onboarding flow discussed in Monday's sync`
  * List: `To Do`
* Task: `Write Q2 marketing brief`
  * Description: `Cover campaign goals, target audience, and budget breakdown for the Q2 push`
  * List: `Done`

### What to build

Your workflow should:

1. Accept the three form inputs.
2. Map the selected list to the correct Trello list ID.
3. Use **Send HTTP Request** to call Trello’s **Create a New Card** endpoint.
4. Create the card in the right list.

### Hint

{% hint style="info" %}

* You may need a second Trello endpoint to retrieve list IDs.
* You can get the board ID from the board URL.
* The mapping from user-facing list name to list ID must stay dynamic.
  {% endhint %}

### Key considerations

{% hint style="info" %}

* Use the **Send HTTP Request** node for the API call.
* Read the Trello docs closely.
* Focus on the cURL example and query parameters.
* Translate each API field into the correct request section:
  * URL
  * HTTP method
  * headers
  * query parameters
  * request body
    {% endhint %}

### Extension

Add support for updating the description of an existing card.

When updating, the user provides:

* The card name
* The list the card belongs to
* The new description

The workflow should:

1. Find the closest matching card name in the selected list.
2. Update the matching card description.
3. Support approximate matches.
   * Example: `work on workflow` should match `Build workflow`

Then recreate the same workflow using **Code Execution** or the **Terminal** tool instead of the earlier approach.

### Helpful docs

* [StackAI](/workflow-builder/core-nodes/stackai)
* [Form](/interface-and-deployment/end-user-interfaces/form)
* [StackAI Computer](/workflow-builder/apps/stackai-computer)
* [Custom API](/workflow-builder/utils-logic-and-others/utils/custom-api)
* [Template Node](/workflow-builder/outputs/template-node)


# 4. Fill an Excel Template

Populate a fixed spreadsheet template from a financial database without changing the file structure or formatting.

## Challenge overview

Build a workflow that fills a standard Excel template from a financial database.

The workflow must preserve the template exactly.

### Scenario

> We use a standardized Excel template that must be populated with financial data from our internal database.
>
> The intended workflow is that the user provides a list of ticker symbols.
>
> The system automatically retrieves all relevant investment data for each ticker from the database and inserts it into the correct fields within the template.
>
> The final output must be a fully completed Excel file that strictly follows the template’s structure.
>
> It is absolutely critical that all data is accurate and placed in the exact required cells without altering the template’s formatting or layout.

### Sample files

{% file src="/files/N77R1vWOkjUOhceldof4" %}

{% file src="/files/s7uJNMJopuoTR9iD8T8u" %}

### Example inputs

* `AAPL, MSFT`
* `AMZN`
* `AAPL, MSFT, AMZN, GOOG`
* `Apple and Google`
* `AAPL google`
* `AAPL, MSFT, AMZN, GOOG, NVDA, META, NFLX, JPM, XOM, JNJ, V, UNH, KO, AVGO`

### What to build

Your workflow should:

1. Accept flexible ticker input.
2. Normalize the request into a ticker list.
3. Pull data directly from the provided database.
4. Write the data into the correct cells in the template.
5. Return a completed Excel file.

### Validation target

Use this expected output as a check.

| Ticker | Company Name                    | Stock Price ($) | Market Cap ($B) | Strategy                                               | Sector                              | Seller                                    |  Volume |
| ------ | ------------------------------- | --------------: | --------------: | ------------------------------------------------------ | ----------------------------------- | ----------------------------------------- | ------: |
| AAPL   | Apple Inc.                      |          198.45 |           3,120 | Long — Core Growth Allocation                          | Technology — Consumer Electronics   | Morgan Stanley Institutional Desk         | 125,000 |
| MSFT   | Microsoft Corporation           |          412.78 |           3,065 | Long — Strategic Core Technology Allocation            | Information Technology              | Goldman Sachs Institutional Equities Div. |  98,500 |
| AMZN   | Amazon.com, Inc.                |          178.62 |           1,925 | Long — Global E-Commerce & Cloud Infrastructure Growth | Consumer Discretionary / Technology | JP Morgan Securities LLC                  | 142,000 |
| GOOGL  | Alphabet Inc. (Google)          |          152.37 |           1,910 | Long — Digital Infrastructure & AI Expansion           | Communication Services / Technology | Goldman Sachs Institutional Desk          | 210,000 |
| NVDA   | NVIDIA Corporation              |          742.18 |           1,825 | Long — AI Infrastructure Momentum                      | Technology — Semiconductors         | Citadel Securities LLC                    |  48,000 |
| META   | Meta Platforms, Inc.            |          512.64 |           1,290 | Long — Digital Ads & AI Productization                 | Communication Services              | Morgan Stanley Equity Desk                |  36,500 |
| NFLX   | Netflix, Inc.                   |          678.11 |             302 | Hold — Streaming Cash Flow Compounder                  | Communication Services — Media      | Goldman Sachs Institutional Desk          |  12,250 |
| JPM    | JPMorgan Chase & Co.            |          214.09 |             620 | Long — Quality Financials / Carry                      | Financials — Banks                  | Barclays Capital Inc.                     |  55,000 |
| XOM    | Exxon Mobil Corporation         |          118.73 |             505 | Income — Energy Dividend Core                          | Energy — Integrated Oil & Gas       | Wells Fargo Securities                    |  90,000 |
| JNJ    | Johnson & Johnson               |          162.47 |             392 | Defensive — Healthcare Quality                         | Health Care — Pharmaceuticals       | BofA Securities                           |  41,000 |
| V      | Visa Inc.                       |          298.32 |             610 | Long — Payments Network Growth                         | Financials — Payments               | Jefferies LLC                             |  28,750 |
| UNH    | UnitedHealth Group Incorporated |          557.88 |             520 | Long — Managed Care Leader                             | Health Care — Managed Care          | JP Morgan Securities LLC                  |  15,600 |
| KO     | The Coca-Cola Company           |           64.91 |             281 | Income — Staples Defensive                             | Consumer Staples — Beverages        | UBS Securities LLC                        | 120,000 |
| AVGO   | Broadcom Inc.                   |        1,386.55 |             640 | Long — Semis + Infrastructure Software                 | Technology — Semiconductors         | Deutsche Bank Securities                  |   6,800 |

### Key considerations

{% hint style="info" %}

* Preserve exact sheet names, cell positions, column order, and formatting.
* Prevent hallucinated values.
* Make the database the source of truth.
* Handle different input styles for tickers and company names.
  {% endhint %}

### Extension

* Support a different uploaded Excel template on each run.

### Helpful docs

* [StackAI Computer](/workflow-builder/apps/stackai-computer)
* [Fill in Excel Sheets with AI](/getting-started/tutorials-and-examples/fill-in-excel-sheets-with-ai)
* [Excel](/workflow-builder/apps/excel)
* [Files Node](/workflow-builder/inputs/files-node)
* [Template Node](/workflow-builder/outputs/template-node)


# 5. Analyze an RFP

Build a conversational RFP assistant that validates inputs, runs an initial analysis, and supports grounded follow-up questions.

## Challenge overview

Build a chatbot for analyzing one RFP at a time.

The user uploads an RFP, provides an 8-digit internal ID, and then asks follow-up questions grounded in that document.

### Scenario

> Our team receives a high volume of RFPs and needs a faster way to understand and evaluate them.
>
> We need a chatbot that allows a user to upload a single RFP document and interact with it conversationally.
>
> At the start of each conversation, the user should upload one RFP and provide an internal RFP ID number (an 8-digit number such as 12345678).
>
> The chatbot should automatically run an initial analysis of the document and extract key information, including the scope of work, project context, submission requirements and timeline, evaluation criteria, and contract terms or risk factors.
>
> The chat conversation should also be renamed to the provided RFP ID so it can be easily identified in the chat interface.
>
> After this initial analysis, the user should be able to ask follow-up questions about the RFP and receive answers grounded in the document with clear citations.

### Sample files

{% file src="/files/Z0IVkU2C3ju8BX6N8nIf" %}

{% file src="/files/ijgRvM8ug8IE5P6XMv9P" %}

{% file src="/files/ckYJj1SgtoLpdRRnFJJ7" %}

### Required inputs

{% hint style="info" %}
The workflow must validate two conditions before analysis starts:

* Exactly one RFP document has been uploaded.
* A valid 8-digit RFP ID has been provided.
  {% endhint %}

### Initial analysis requirements

Extract at least:

* Scope of work
* Project context
* Submission requirements and timeline
* Evaluation criteria
* Contract terms or risk factors

### Required interaction patterns

Your workflow should handle these cases:

1. One RFP + valid ID → run analysis
2. Not exactly one RFP + missing or invalid ID → ask for both
3. One RFP only → ask for ID → then run analysis
4. Valid ID only → ask for RFP → then run analysis

The workflow must accept inputs in any order.

### What to build

Your workflow should:

1. Accept chat input and file uploads.
2. Validate that one active RFP is present.
3. Validate that the ID is exactly eight digits.
4. Pause and request whatever is missing.
5. Run the initial RFP analysis.
6. Rename the conversation to the RFP ID.
7. Answer follow-up questions with citations.

### Key considerations

{% hint style="info" %}

* Distinguish the initial setup step from later chat turns.
* Decide how to persist both text and file inputs across the conversation.
* Handle validation failures with clear instructions.
* Keep follow-up answers grounded in the active document.
  {% endhint %}

### Extension

#### Improve the chat interface

Make the interface description explicit about the required inputs.

Use two left-aligned bullets:

* Upload exactly one RFP document
* Provide an 8-digit RFP ID

#### Support document replacement

If a new RFP is uploaded later in the same conversation:

* Re-run analysis on the newest RFP
* Keep using the existing RFP ID
* Keep the conversation title unchanged
* Treat the newest uploaded RFP as the active document

### Helpful docs

* [Files Node](/workflow-builder/inputs/files-node)
* [Chat Assistant](/interface-and-deployment/end-user-interfaces/chat-assistant)
* [Detecting the First Run](/guides-and-tips/stackai-hacks/detecting-the-first-run)
* [Knowledge Bases](/workflow-builder/core-nodes/knowledge-bases)
* [Handling Errors & Fallback](/guides-and-tips/stackai-hacks/handling-errors-and-fallback)


# Core AI Concepts

Learn the core concepts behind prompting, embeddings, chunking, and multi-model workflows.

These concepts help you build better workflows in StackAI. Start with prompting, then add retrieval and orchestration patterns.

{% hint style="info" %}
If you are new to LLM workflows, start with prompts and embeddings first.
{% endhint %}

### Start with the fundamentals

<table data-view="cards"><thead><tr><th>Concept</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>Prompt Engineering</strong><br>Write clearer instructions, structure prompts, and improve output reliability.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/YyniJ9zfpaxKz2jmc8cn">/spaces/FSlso1Kjob5CLDrh0dVn/pages/YyniJ9zfpaxKz2jmc8cn</a></td></tr><tr><td><strong>Instruction vs Prompt</strong><br>Separate stable system behavior from task-specific user input.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/IYDJEUNZKKCxmVYpq6C3">/spaces/FSlso1Kjob5CLDrh0dVn/pages/IYDJEUNZKKCxmVYpq6C3</a></td></tr><tr><td><strong>Embeddings</strong><br>Understand how text becomes vectors for semantic search and retrieval.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/rHbvl2f6ab0YxwchTFBK">/spaces/FSlso1Kjob5CLDrh0dVn/pages/rHbvl2f6ab0YxwchTFBK</a></td></tr></tbody></table>

### Go deeper into retrieval and orchestration

<table data-view="cards"><thead><tr><th>Concept</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>Chunking</strong><br>Split content into useful units for stronger retrieval quality.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/S8FXtl5a8zIJdsycEJP2">/spaces/FSlso1Kjob5CLDrh0dVn/pages/S8FXtl5a8zIJdsycEJP2</a></td></tr><tr><td><strong>Using Multiple LLMs</strong><br>Design workflows that route, compare, or chain multiple models.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/yLyBw6HoH9gCE2UUOy6v">/spaces/FSlso1Kjob5CLDrh0dVn/pages/yLyBw6HoH9gCE2UUOy6v</a></td></tr></tbody></table>

### Recommended order

1. Learn [Prompt Engineering](/getting-started/core-ai-concepts/prompt-engineering).
2. Learn [Instruction vs Prompt](/getting-started/core-ai-concepts/instruction-vs-prompt).
3. Learn [Embeddings](/getting-started/core-ai-concepts/embeddings) and [Chunking](/getting-started/core-ai-concepts/chunking).
4. Apply them in [Using Multiple LLMs](/getting-started/core-ai-concepts/using-multiple-llms).

### Next step

When you are ready to build, move into [Get Started with Workflow Builder](/getting-started/start-here/get-started-with-workflow-builder) or follow the [Stack AI Curriculum](/getting-started/learning/stackai-curriculum).


# Prompt Engineering

#### Prompt Engineering and Context Management

* **Prompt Customization:** Each LLM node can have its own prompt and system message. Tailor these to the specific sub-task each LLM is handling.
* **Context Passing:** Use node, tool, or variable references in prompts to pass context or results between LLMs.

<figure><img src="/files/73ySJ698EOWTHQVwrWXY" alt=""><figcaption></figcaption></figure>

### Prompting Best Practices

{% stepper %}
{% step %}
Clarity, Specificity, and Explicitness

* **Minimize Ambiguity:** \
  Vague requests lead to off-target responses. \
  Instead of "Summarize this document," specify "Summarize this document in 3 bullet points focusing on the main challenges discussed."
* **Use Imperative Language:** \
  Frame prompts as direct commands (e.g., "Generate," "Summarize," "Translate"). \
  Avoid conversational phrases.
* **Define Constraints:** \
  Clearly state desired length ("Use a 3 to 5 sentence paragraph"), tone ("Use a friendly and conversational tone"), or style ("in the style of a {famous poet}").
* **Positive Framing:** \
  Instruct the model on what it *should* do, rather than what it *should not* do. \
  For instance, instead of "DO NOT ASK for a username or password," \
  state: "The agent will attempt to diagnose the problem... whilst refraining from asking any questions related to PII. Instead of asking for PII, such as username or password, refer the user to the help article \[[www.samplewebsite.com/help/faq\]\\(https://www.samplewebsite.com/help/faq)](http://www.samplewebsite.com/help/faq]\\\(https://www.samplewebsite.com/help/faq\))."
  {% endstep %}

{% step %}
Structuring the Prompt for Optimal Parsing and Reliability

* **Use Delimiters:** \
  Employ characters or symbols (e.g., \`"""\`, \`###\`, \`\<tag>\`) to clearly separate sections like instructions, context, and examples. \
  This prevents information "bleeding."
* **Place Instructions at the Beginning:** \
  Start your prompt with instructions for clear parsing.
* **Request JSON Format for Machine-Readable Output:** \
  For structured data, explicitly ask for JSON. \
  Provide a complete example with desired keys and value types. \
  Consider using API's "JSON mode" if available.
* **Adopt JSON Output by Default:** \
  Always request JSON, even for single fields, to allow for easy expansion later.
* **Use Hierarchical Structures:** \
  For complex prompts, organize content with headings, subheadings, and bullet points.
  {% endstep %}

{% step %}
In-Context Learning (ICL): Guiding by Demonstration

* **Start with Zero-Shot Prompting:** \
  For simple tasks, provide only the task description without examples.
* **Use Few-Shot Prompting when Needed:** \
  If zero-shot isn't sufficient, include one or more input-output examples to demonstrate the desired output structure, style, or pattern.
* **Curate Diverse Examples:** \
  Ensure few-shot examples are representative and varied to avoid bias.
  {% endstep %}

{% step %}
Strategic Allocation (System vs. User Prompts)

* **Utilize the System Prompt:** \
  Use for high-level, foundational instructions defining the AI's core behavior, persona, and persistent constraints (e.g., role-prompting, ethical guidance, tool-use instructions).
* **Use the User Prompt:** \
  This is for dynamic, task-oriented instructions, specific questions, task-specific context, few-shot examples relevant to the current task, and response formatting instructions for that single interaction.
* **Separate Concerns:** \
  This modular approach improves clarity, maintainability, and model performance.
  {% endstep %}
  {% endstepper %}

## Prompting with Tools

When using tools in an LLM Node, make sure to include them in your prompt.

<figure><img src="/files/uABSq4xQzxJmFxCRo23j" alt=""><figcaption></figcaption></figure>

## XML Tags

For long prompts, or prompts that reference multiple inputs, group them with XML tags. Grouping signals to the LLM where certain associated blocks of information begin and end.

<figure><img src="/files/Tek6ohrXPYnDdESu0kWW" alt=""><figcaption></figcaption></figure>


# Instruction vs Prompt

Master LLMs: Know the difference between instruction, system prompt, and user prompt to guide AI behavior and get top results. It's not just what you ask - it's how you ask it.

### Instruction vs Prompt (System Prompt vs User Prompt)

In the world of Large Language Models (LLMs), understanding the difference between "Instruction" and "Prompt" (often referred to as "System Prompt" and "User Prompt") is key to getting the best results. It's not just about what you ask, but *how* you set up the AI's overall behavior and then provide specific tasks.

The System Prompt: The AI's Job Description\
Think of the **System Prompt** as the AI's "job description" or its persistent identity. It's a high-level, foundational set of instructions that defines the AI's core behavior, its persona, and any rules it should always follow throughout an entire conversation or session.

\
**What goes in a System Prompt?**

* **Role Prompting:** This sets the AI's persona, like "You are a seasoned data scientist" or "You are a helpful and informative AI assistant specializing in technology." This helps the AI interpret all subsequent requests through that specific lens.
* **Ethical Guidance and Constraints:** This is where you establish non-negotiable rules, such as avoiding certain topics ("Avoid discussing political opinions") or refusing harmful requests.
* **Defining Scope:** You can specify the areas of expertise the AI should draw from and what's out of bounds.
* **Tool-Use Instructions:** For more advanced applications, you can define what external tools the AI has access to and when it should use them.

The System Prompt is **stable** and typically remains consistent across many interactions, providing a steady framework for the AI's operation.

The User Prompt: The Task-Specific Request\
In contrast, the **User Prompt** is dynamic and task-oriented. It contains the specific question, command, or data for a *single* interaction within the conversation. It's the immediate "what" you want the AI to do right now.

\
**What goes in a User Prompt?**

* **Specific Questions and Commands:** This is where you put your direct query, like "What are some eco-friendly travel destinations in South America?" or "Translate this text to French."
* **Task-Specific Context:** Any details relevant only to the current turn of the conversation, such as "I'm planning a trip in June and prefer destinations with hikes."
* **Few-Shot Examples:** If you need to show the AI examples of input-output pairs for a specific task, these are best placed in the User Prompt.
* **Response Formatting Instructions:** While general style can be in the System Prompt, specific output formats for a single response (e.g., "Please provide the information in a list format," or "Answer in JSON format") are often more effective here.

**Why the Separation Matters**\
This deliberate separation into System and User prompts is a critical architectural choice for building robust and scalable LLM applications.

* **Clarity and Maintainability:** Separating concerns makes your prompts easier to read, debug, and update. Your core AI configuration (system prompt) is distinct from the varying user inputs.
* **Optimized Model Performance:** LLMs are often specifically trained to handle these distinct roles. Adhering to this structure is believed to provide a performance benefit, leading to more accurate and reliable outputs.
* **Future-Proofing:** As your application evolves, having a modular prompt structure allows for easier modifications and additions of new features without overhauling your entire prompting logic.

By understanding and effectively using both system and user prompts, you can better control LLMs, making your applications more predictable, reliable, and powerful for various tasks.


# Using Multiple LLMs

When using multiple LLMs in one project, there are important points to consider in order to ensure they work well together.

***

### Clear Input/Output Flow

* **Explicit Connections:** Each LLM node should have clearly defined input and output connections. Use Input nodes (`in-0`, `in-1`, etc.) to gather user data, and connect them to the relevant LLM nodes.
* **Output Handling:** Route the output of each LLM node to Output nodes or downstream processing nodes (like Template or Python nodes) for further formatting or logic.

### Sequential vs. Parallel LLMs

* **Sequential Orchestration:** If the output of one LLM is needed as input for another, connect them in sequence (e.g., `llm-0` → `llm-1`). This is useful for multi-step reasoning or refinement. Having initial LLMs give structured outputs to downstream LLMs can be helpful.
* **Parallel Orchestration:** If you want to compare or aggregate results from multiple LLMs, connect the same input to several LLM nodes in parallel, then merge their outputs downstream using the Combine Node or a third LLM that will summarize and logically merge the two outputs

### Memory and State

* **Sliding Window Memory:** Use the memory feature in LLM nodes to maintain context across turns or steps, especially in multi-turn workflows.
* **Stateful Processing:** If you need to track or update state, consider using Python nodes between LLMs to manipulate or store intermediate results.

### Error Handling and Fallbacks

* **On Failure Branches:** Configure `on_failure_branch` and retry settings for each LLM node to handle errors gracefully.
* **Fallback LLMs:** Use the fallback options to specify alternative models/providers if the primary LLM fails.

### Data Formatting and Validation

* **Template Nodes:** Use Template nodes to format or merge outputs from multiple LLMs before presenting to the user.
* **Output Validation:** If LLMs are expected to return structured data (e.g., JSON), use the `json_schema` parameter to enforce output format and validate results.

### Chaining with Other Nodes

* **Integration with Actions:** LLM outputs can be passed to Action nodes (e.g., sending emails, updating databases) for real-world effects.
* **Custom Logic:** Insert Python nodes between LLMs for custom logic, filtering, or aggregation.

### Citations and Traceability

* **Citations:** Enable citations in LLM nodes if you want to track sources or provide references in the output.
* **Auditability:** Use Output nodes and logs to trace the flow of data and decisions across multiple LLMs.

### Performance and Latency

* **Parallelization:** Where possible, run LLMs in parallel to reduce overall latency.
* **Token and Cost Management:** Set appropriate `max_tokens` and temperature settings to control cost and response quality.

***

**Summary Table:**

| Aspect                 | Best Practice                                           |
| ---------------------- | ------------------------------------------------------- |
| Input/Output Flow      | Use explicit node connections and references            |
| Orchestration Style    | Choose sequential or parallel based on use case         |
| Prompt Engineering     | Customize prompts and use context passing               |
| Memory/State           | Use memory features and Python nodes for stateful logic |
| Error Handling         | Configure retries, fallbacks, and failure branches      |
| Data Formatting        | Use Template nodes and output validation                |
| Chaining/Integration   | Connect to Action nodes and use Python for custom logic |
| Citations/Traceability | Enable citations and use Output nodes for auditability  |
| Performance            | Parallelize where possible, manage tokens and latency   |


# Chunking

Best practices for implementing document chunking for RAG

### **Chunking: Optimizing Data Retrieval in Stack AI Workflows**

Chunking is a key technique in AI-powered document processing. In **StackAI**, using the right chunking strategy can greatly enhance how effectively machine learning models understand and extract data from documents.

***

#### **What is Chunking in StackAI?**

**Chunking** = Breaking large documents into smaller, manageable parts.

* Used in StackAI’s **"Files"** and **"Documents"** nodes.
* Ensures input fits within AI model token limits.
* Can be configured via the gear icon in relevant nodes.

***

#### **Chunking Methods**

**1. Naïve Chunking (Fixed-Length)**

Splits text by character, word, or token count.

* Pros:
  * Fast and simple to implement
  * Predictable processing time
* Cons:
  * May break sentences or ideas
  * Can reduce AI comprehension

***

**2. Sentence-Based Chunking**

Splits text along natural sentence boundaries.

* Pros:
  * Preserves meaning and structure
  * Enhances AI understanding
* Cons:
  * More computationally intensive
  * Chunk sizes can vary

***

#### **Optimizing Chunk Configuration**

**Chunk Size**

* Choose based on your model's capabilities.
* Tradeoff:
  * **Larger chunks** = better context but risk hitting token limits.
  * **Smaller chunks** = faster, but may lose coherence.
* Recommended: **200–1,000 tokens**

**Chunk Overlap**

* Adds continuity between chunks.
* Suggested: **15–30% overlap**

***

#### **Best Practices for Stack AI Users**

* Use **sentence-based chunking** for documents with rich content.
* Tune **chunk size** to match your AI model's limits.
* Experiment with **overlap percentages** to preserve context.
* **Iteratively test** to ensure optimal results.

***

#### **Technical Tips**

* Configure chunking inside "Files" and "Documents" nodes.
* Continuously monitor model performance as you adjust settings.
* Align your chunking strategy with your specific ML model needs.

***

#### **Why It Matters**

Mastering chunking helps:

* Improve document comprehension for AI
* Boost data extraction accuracy
* Deliver better performance across document-based workflows in StackAI


# Embeddings

### What is an embedding?

Embeddings are numerical representations of concepts converted to number sequences, which make it easy for computers to understand the relationships between those concepts. They are capable of capturing the context of a word in a document, its semantic and syntactic similarity, and its relation with other words.

### How can I select different types of embeddings in Stack AI?

Embeddings can be selected by the user in two different section of Stack AI platform.

* The most intuitive place is in a `vector store`. As explained in section, the input will be vectorized and indexed in a vector database for later usage in an AI model (so only the relevant chunks of the input are sent to the LLM).
* `Document search` elements are also customizable with respect to their embeddings.

### Which are the models available?

Below a list of the embeddings models integrated into Stack AI's platform.

| MODEL                    | COMPANY     | DESCRIPTION                                                                                                                                                        | LINK                                                                                               |
| ------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- |
| `text-embedding-3-large` | OpenAI      | newest and most performant embedding models are now available, with lower costs, higher multilingual performance, and new parameters to control the overall size.  | [More Info](https://platform.openai.com/docs/guides/embeddings/embedding-models)                   |
| `text-embedding-3-small` | OpenAI      | Outperforms previous OpenAI's most capable model, Davinci, at most tasks, while being priced 99.8% lower                                                           | [More Info](https://platform.openai.com/docs/guides/embeddings/embedding-models)                   |
| `text-embedding-ada-002` | OpenAI      | Outperforms previous OpenAI's most capable model, Davinci, at most tasks, while being priced 99.8% lower                                                           | [More Info](https://platform.openai.com/docs/guides/embeddings/embedding-models)                   |
| `bert-base-cased`        | Google      | Embeddings based on Bidirectional Encoder Representations from Transformers (BERT)                                                                                 | [More Info](https://minigpt-4.github.io/)                                                          |
| `palm2`                  | Google      | Vertex AI PaLM API supports Gecko for Embeddings                                                                                                                   | [More Info](https://medium.com/google-cloud/generative-ai-getting-started-with-palm2-91a8354beeff) |
| `all-mpnet-base-v2`      | Open Source | Sentence-transformers model that maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. | [More Info](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)                        |


# Best Practices

Use this section to improve workflow quality after you know the basics.

{% hint style="info" %}
Best practices matter most after your first working workflow.
{% endhint %}

### What this section covers

* Build stronger agents with clearer workflow design.
* Speed up iteration with better AskAI and Auto Agents usage.
* Solve common workflow issues with proven implementation patterns.

### Start with the core guides

<table data-view="cards"><thead><tr><th>Guide</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>AI Agents Best Practices</strong><br>Learn how to use AskAI and Auto Agents effectively, structure prompts, and review generated workflows.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/DJyZAoxRoilKfufkQm2X">/spaces/FSlso1Kjob5CLDrh0dVn/pages/DJyZAoxRoilKfufkQm2X</a></td></tr><tr><td><strong>StackAI Hacks</strong><br>Use practical patterns for orchestration, troubleshooting, fallbacks, large files, and analytics.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/QosKgHVmDz5O08hEXp0Y">/spaces/FSlso1Kjob5CLDrh0dVn/pages/QosKgHVmDz5O08hEXp0Y</a></td></tr></tbody></table>

### Recommended order

1. Build a first version in [Workflow Builder](/getting-started/start-here/get-started-with-workflow-builder).
2. Apply [AI Agents Best Practices](/getting-started/best-practices/ai-agents-best-practices) to improve structure and iteration speed.
3. Use [StackAI Hacks](/guides-and-tips/stackai-hacks) when you need deeper patterns or troubleshooting help.

### Before you go deeper

If you are still learning the basics, start here first:

* Use [Start Here](/getting-started/start-here) for the fastest onboarding path.
* Use [Core AI Concepts](/getting-started/core-ai-concepts) to strengthen prompting and retrieval fundamentals.
* Use [Tutorials & Examples](/getting-started/tutorials-and-examples) to practice with real workflows.


# AI Agents Best Practices

## AskAI - Auto Agents

Have you noticed the AskAI button in the workflow builder? It’s your assistant for building StackAI workflows faster and more seamlessly.

This guide is not a comprehensive overview of everything AskAI can do. Instead, it focuses on best practices for its most powerful capability: prompt-to-workflow generation (Auto Agents).&#x20;

![](/files/PCWRnjf0fowd3WwiMSrF) ![](/files/qGvS1SIjepG0RuJklyDQ)

### AskAI request types

Before diving into Auto Agents, it helps to understand the three main types of requests AskAI handles. In practice, most prompts fall into one of these categories:

**1. General Q\&A —** Use this when you want to understand how something works. Typical questions include:

* How specific nodes or integrations work
* Workflow design best practices
* Conceptual questions about agents, prompts, or architecture

**2. Debug Mode —** When something breaks. Always include:

* Exact error message. You can directly Ask AI from the error banner that shows after an error so you don't event need to copy-paste the exact error.
* What the workflow is supposed to do
* Which node or step is failing

The more context you provide, the faster the assistant can help.

**3. Build Workflow (Auto Agents) —** Describe a workflow in natural language and generate it automatically. AskAI will build the workflow structure, add nodes and connections, ask clarifying questions if needed, and show the steps it followed.

![](/files/XzmYVdwhfhOeJZieOGNg)

You don't need to explicitly select a mode — AskAI infers it from the question you ask. However, Being explicit about your intent — whether you're asking a question, debugging an issue, or building a workflow — helps AskAI respond more accurately.&#x20;

Let’s now focus on auto agents.

### Auto Agents best practices

Auto Agents are one of the fastest ways to go from idea to working workflow. In seconds, they can generate the structure, nodes, and connections of a multi-step AI agent.

But the difference between a workflow that needs heavy rework and one that becomes a strong starting point often comes down to how you guide the assistant.

The following best practices come from real usage patterns and will help you get the most value out of Auto Agents.

#### 1) Build manually first

* Before using Auto Agents, build a few workflows manually. You'll give better instructions and catch what's off in the output.
* Once you're building: stay hands-on. Understand the changes, monitor results, don’t take any change as valid without keeping a critical eye.
* This matters most when debugging or scaling. If you haven't reviewed everything yourself, troubleshooting under pressure is slow.

#### 2) Use a 4-part prompt

<figure><img src="/files/vxv6PGkFK8xkDpkhOQA0" alt=""><figcaption></figcaption></figure>

Give the assistant your logic and the goal:

1. Inputs and triggers — What starts the workflow? A form, a file upload, a schedule, an API call?
2. Processing — How many LLM nodes? What sources does each use? Any intermediate steps (classification, routing, extraction)?
3. Outputs and actions — What does it produce? A document, an email, a database record?
4. Apps and tools — Name specific integrations across all of the above. If you don't, the assistant will pick on its own — slower, and may not choose what you use.

{% columns %}
{% column %}
Example: If you know which web scraper you prefer, specify it, otherwise the agent will be slower to find it.
{% endcolumn %}

{% column %}

<figure><img src="/files/xTuu6pAkpqM5RMxit8sx" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

AskAI is going to call [Ask Human in the Chat](https://www.stack-ai.com/insights/human-in-the-loop-ai-agents-how-to-design-approval-workflows-for-safe-and-scalable-automation) if it needs more information, but if you provide the context beforehand, you will be faster and you will keep deterministic what can be.

<figure><img src="/files/q66iLClRkele4R1xXE2o" alt=""><figcaption></figcaption></figure>

#### 3) Know what Auto Agents are good for

Auto Agents rarely generate a complete final workflow on the first attempt. They are best understood as a tool that accelerates different stages of workflow development — and the value they provide depends heavily on where you are in that process.

| Phase                                          | Description                                                                                                | Value Auto Agents Can Provide                                                                                                                                               |
| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Blank Canvas → Minimal Functional Version (V1) | Building the first working version of the workflow. Defining triggers, main processing steps, and outputs. | Highest value. Auto Agents can generate the core architecture: nodes, connections, and basic logic. With clear instructions, you often get 60–70% of a strong V1 instantly. |
| Minimal Functional → Testing Version (V2)      | Expanding the workflow with additional capabilities and preparing it for testing and iteration.            | Moderate value. Auto Agents can help add meaningful new layers to the workflow structure.                                                                                   |
| Testing → Product Version (V3+)                | Refining the workflow based on testing feedback. Improvements are usually small and targeted.              | Lower value. Changes tend to be granular, so manual edits or targeted questions to AskAI are often faster and safer.                                                        |

Auto Agents provide the most value when helping you design workflow structure.\
As the workflow matures and changes become more targeted, manual edits or direct questions to AskAI often become more efficient.

<br>


# Tutorials & Examples

This section contains step-by-step tutorials and real-world examples for building AI agents with StackAI.

Each tutorial walks through a complete use case — from blank canvas to deployed agent.

### In this section

<table data-view="cards"><thead><tr><th>Topic</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>Compliance Chatbot</strong><br>Build a chatbot that answers policy and compliance questions from documents.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/WwAQxEi7vpNHzF9arb4J">/spaces/FSlso1Kjob5CLDrh0dVn/pages/WwAQxEi7vpNHzF9arb4J</a></td></tr><tr><td><strong>IT Support Chatbot</strong><br>Create an agent that handles common IT helpdesk requests.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/w8ge7xIh91dFMKiEEqxu">/spaces/FSlso1Kjob5CLDrh0dVn/pages/w8ge7xIh91dFMKiEEqxu</a></td></tr><tr><td><strong>Partnerships Agent</strong><br>Automate outreach and research workflows for partnership development.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/WgT8SSp9SUMMEl5Q7yFZ">/spaces/FSlso1Kjob5CLDrh0dVn/pages/WgT8SSp9SUMMEl5Q7yFZ</a></td></tr><tr><td><strong>Policy Chatbot</strong><br>Deploy a chatbot that navigates and explains internal policies.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/QEXINOGDCPPXJgadnKDx">/spaces/FSlso1Kjob5CLDrh0dVn/pages/QEXINOGDCPPXJgadnKDx</a></td></tr><tr><td><strong>Salesforce</strong><br>Integrate StackAI with Salesforce to automate CRM workflows.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/r1V5nYjtHa7cr4Q43aaP">/spaces/FSlso1Kjob5CLDrh0dVn/pages/r1V5nYjtHa7cr4Q43aaP</a></td></tr><tr><td><strong>Term Extraction</strong><br>Extract key terms and entities from documents using an AI agent.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/Q4ZY2CfTaZ5CInUykS6R">/spaces/FSlso1Kjob5CLDrh0dVn/pages/Q4ZY2CfTaZ5CInUykS6R</a></td></tr><tr><td><strong>Web Research</strong><br>Build an agent that searches the web and synthesizes research reports.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/la8hdQyaH1OllwTpu7sF">/spaces/FSlso1Kjob5CLDrh0dVn/pages/la8hdQyaH1OllwTpu7sF</a></td></tr><tr><td><strong>Document Summarization</strong><br>Summarize long documents into structured, actionable outputs.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/VVbCpmQzyNkRBFV9zK6F">/spaces/FSlso1Kjob5CLDrh0dVn/pages/VVbCpmQzyNkRBFV9zK6F</a></td></tr><tr><td><strong>Slackbot Guide</strong><br>Deploy a StackAI agent as a Slack bot for your team.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/GvlL4ndpeJXpbjejI1Em">/spaces/FSlso1Kjob5CLDrh0dVn/pages/GvlL4ndpeJXpbjejI1Em</a></td></tr><tr><td><strong>Analyze Worksheets</strong><br>Use AI to analyze and extract insights from spreadsheet data.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/FCt1BTUITw5wIX7Rb1i1">/spaces/FSlso1Kjob5CLDrh0dVn/pages/FCt1BTUITw5wIX7Rb1i1</a></td></tr><tr><td><strong>Create a News Researcher</strong><br>Build an agent that monitors and summarizes news on a topic.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/ECqlsznwoNzgPkJ88Vjb">/spaces/FSlso1Kjob5CLDrh0dVn/pages/ECqlsznwoNzgPkJ88Vjb</a></td></tr><tr><td><strong>Fill in Excel Sheets with AI</strong><br>Automate data entry and enrichment in Excel files.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/VkqU8orjdsgqDpDN0iFN">/spaces/FSlso1Kjob5CLDrh0dVn/pages/VkqU8orjdsgqDpDN0iFN</a></td></tr><tr><td><strong>Create Slides</strong><br>Generate presentation slides from structured content or documents.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/1IIc6zWudnNa5NteIuWn">/spaces/FSlso1Kjob5CLDrh0dVn/pages/1IIc6zWudnNa5NteIuWn</a></td></tr><tr><td><strong>Compare Documents</strong><br>Build an agent that compares two documents and highlights differences.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/cdSsOFbAOSgmrF8d2OzS">/spaces/FSlso1Kjob5CLDrh0dVn/pages/cdSsOFbAOSgmrF8d2OzS</a></td></tr></tbody></table>

### How to use these tutorials

* Open a tutorial alongside [**Get Started with Workflow Builder**](/getting-started/start-here/get-started-with-workflow-builder) and follow each step.
* Use the finished [**Templates**](/getting-started/start-here/get-started-with-workflow-builder/templates) as starting points for your own workflows.
* Combine multiple tutorials to learn how to build compound, multi-step agents.


# Compliance Chatbot

Building a Compliance Chatbot in Stack AI

{% @arcade/embed flowId="6U78e0fVeBKJvK2YVUjg" url="<https://app.arcade.software/share/6U78e0fVeBKJvK2YVUjg>" %}


# IT Support Chatbot

Build an IT support chatbot in Stack AI

{% @arcade/embed flowId="za2GO4rucqlYdT9fF5yD" url="<https://app.arcade.software/share/za2GO4rucqlYdT9fF5yD>" %}


# Partnerships Agent

Build a strategic partnerships agent in Stack AI

{% @arcade/embed flowId="LejNCAw7jBVxCRzcmICI" url="<https://app.arcade.software/share/LejNCAw7jBVxCRzcmICI>" %}


# Policy Chatbot

Build a policy chatbot for your enterprise in Stack AI

{% @arcade/embed flowId="UqMjblZasUUJGxXQwFjx" url="<https://app.arcade.software/share/UqMjblZasUUJGxXQwFjx>" %}

**Why build a chatbot?**

Chatbots can be swiftly designed and deployed on the StackAI platform. You can unlock a better experience for both your emplyoees and customers by implementing a policy chatbot that references your own internal knowledge base. Updating a chatbot over time can also be easy by connecting it to a dynamic knowledge source.

**What are some ideas a policy chatbot?**

* HR Policy chatbot for onboarding new employees
* Customer Service chatbot for your customers
* Internal assistant chatbot for your employees


# Salesforce

Build a Salesforce agent in Stack AI

{% @arcade/embed flowId="P8lQigLhUwCJhyXQpL24" url="<https://app.arcade.software/share/P8lQigLhUwCJhyXQpL24>" %}


# Term Extraction

Build a term extraction agent in Stack AI

{% @arcade/embed flowId="bvnazk4qdRmf8H7C3uiK" url="<https://app.arcade.software/share/bvnazk4qdRmf8H7C3uiK>" %}


# Web Research

Build a web research agent in Stack AI

{% @arcade/embed flowId="VLwIkmtihHPKT5AdzHkx" url="<https://app.arcade.software/share/VLwIkmtihHPKT5AdzHkx>" %}


# Document Summarization

Build an agent to summarize documents in Stack AI

{% @arcade/embed flowId="UsG3sgWFC1kMNiFXkhis" url="<https://app.arcade.software/share/UsG3sgWFC1kMNiFXkhis>" %}


# Slackbot Guide

Learn how to configure the Slack bot for StackAI

{% @arcade/embed flowId="jKE0WHROqG6gXuoPueW1" url="<https://app.arcade.software/share/jKE0WHROqG6gXuoPueW1>" %}

**Example YAML with the least permission:**

{% file src="/files/D6NlpIWQBrAxpewQ7WXz" %}

**Sometimes, there may be additional permission required. Below is the YAML with the most permission required:**

{% file src="/files/3pzqx3uPte0VMbZoeslT" %}


# Analyze Worksheets

Learn how to analyze worksheets in your flow with speed and efficiency

{% @arcade/embed flowId="aqqX8uvMMcT7hg2FryU5" url="<https://app.arcade.software/share/aqqX8uvMMcT7hg2FryU5>" %}

**What is Code Execution doing exactly here?**

While not limited to file manipulation, the **Code Execution** tool helps the LLM write Python code to read a file as a pandas DataFrame to swiftly and accurately perform analysis on a worksheet

**Why use Code Execution?**&#x20;

**Code** **Execution** coupled with Anthropic's **Claude 4.5 Opus** is a powerful tool you can use to analyze worksheets. When you have large sets of data, this method allows you to complete more complex analysis on a worksheet.


# Create a News Researcher

Learn how to incorporate global news in your workflow

{% @arcade/embed flowId="IrUiYanIxmf98nhiNgbl" url="<https://app.arcade.software/share/IrUiYanIxmf98nhiNgbl>" %}

**What are some other uses for incorporating news in my flow?**

You might want to supplement reports or summaries with outside context, such as global events. For example, if you built a flow to analyze price differences in trades, you may want to supplement that analysis with global context. This is an ideal tool to use to gather that context.

**Can this tool do anything else?**

The **Web Search** tool can search for anything else you prompt it to, not just the news. You can also try using **Exa AI's Web Search** tool as well.&#x20;


# Fill in Excel Sheets with AI

Learn how to use the StackAI platform to fill in an Excel sheet new data, even with a template

{% @arcade/embed flowId="85LBmUMeeQZ5nHrscyFw" url="<https://app.arcade.software/share/85LBmUMeeQZ5nHrscyFw>" %}

**Why this is important**

In the past, LLMs often struggled to work with data sheets. Now with StackAI's powerful Computer Terminal tool, you can fill in an Excel sheet that may have a template, formatting, and formulas seamlessly.

**Can this tool do anything else?**

The **StackAI Computer** tool coupled with one of Anthropic's Opus models can do vast actions on worksheets such as analysis. You can also set up the flow to fill an Excel sheet that is stored in Sharepoint instead.


# Create Slides

Create slide decks using the power of LLMs!

You can now create a slide deck in StackAI using the Create Slides tool!

* The Create Slides tool allows you to generate a set of slides from a single prompt.
* Download the slides as a Powerpoint (.ppt) or PDF (.pdf) presentation!
* Tip: the tool does not have access to previous conversation context, so your prompt should include all necessary information for the slide deck.

***

### Step-by-Step: How to Use the Create Slides Tool

1. **Add an Input Node:**\
   Start your workflow with an Input node where the user can type their topic.
2. **Use an LLM Node:**\
   Connect the Input node to an LLM node (like OpenAI).
   * In the LLM node’s prompt, reference the input using "/" and instruct the LLM to create a prompt for slide creation based on the user's input.
3. **Add the Create Slides tool:**
   * Add a tool to the LLM and select Create Slides.
   * Reference the tool in the prompt using "@".
4. **Connect to Output or Template Node:**
   * Connect the Action node to an Output node to display the slides.

<figure><img src="/files/gbqd7B8PhOjv5Qo6shyB" alt=""><figcaption></figcaption></figure>

Download you slides using the download button in the top right corner. You can choose between downloading as .ppt for further edits, or as a PDF.

***

### Tips

* Make your input topic as clear and self-contained as possible.
* Use the LLM node to help structure or expand the user’s idea before it calls Create Slides.
* The output will be a set of slides you can display, export, or further process.


# Compare Documents


# Inputs

Input nodes define how data enters your StackAI workflow — from user messages and uploaded files to scheduled triggers and external form submissions.

Every workflow starts with at least one input node. Choose the type that matches how your agent receives data.

### In this section

<table data-view="cards"><thead><tr><th>Topic</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>Input Node</strong><br>Accept text, structured data, or user messages from the interface or API.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/jYCuAzL4Sv2RwJDvIDTP">/spaces/FSlso1Kjob5CLDrh0dVn/pages/jYCuAzL4Sv2RwJDvIDTP</a></td></tr><tr><td><strong>Files Node</strong><br>Accept uploaded files — PDFs, spreadsheets, images — as workflow inputs.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/bBAKtVVoITit4Ky9P2jl">/spaces/FSlso1Kjob5CLDrh0dVn/pages/bBAKtVVoITit4Ky9P2jl</a></td></tr><tr><td><strong>URL Input Node</strong><br>Fetch and use web page content as a workflow input.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/wy8TAMEHcAgr6PHE3vR3">/spaces/FSlso1Kjob5CLDrh0dVn/pages/wy8TAMEHcAgr6PHE3vR3</a></td></tr><tr><td><strong>Audio Input Node</strong><br>Accept audio files for transcription or analysis.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/cjC6ZUfmGndeGoX6q3SR">/spaces/FSlso1Kjob5CLDrh0dVn/pages/cjC6ZUfmGndeGoX6q3SR</a></td></tr><tr><td><strong>Trigger Node</strong><br>Start a workflow automatically on a schedule or external event.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/YMP8x0dWeHoxFEPLGgYP">/spaces/FSlso1Kjob5CLDrh0dVn/pages/YMP8x0dWeHoxFEPLGgYP</a></td></tr></tbody></table>

### Pick the right input for your use case

* Chat or API interface? Use the [**Input Node**](/workflow-builder/inputs/input-node).
* Handling uploaded documents? Use the [**Files Node**](/workflow-builder/inputs/files-node).
* Scheduled or event-driven jobs? Use the [**Trigger Node**](/workflow-builder/inputs/trigger-node).
* Working with audio? Use the [**Audio Input Node**](/workflow-builder/inputs/audio-input-node)**.**


# Input Node

An **Input Node** allows you and your end-users to input text into a workflow. The text query is passed to any node that accepts a text string as input.

<figure><img src="/files/Mt1u7HywD8THqHXmwFpM" alt=""><figcaption></figcaption></figure>

The most popular nodes accepting text inputs are:

1. The LLM nodes (adding the input as part of their prompt).
2. The Knowledge Base nodes (they use the input as a prompt to retrieve information from their contents).

Key characteristics:

* Inputs can be text fields of any length and are passed to their connected node in the flow.
* While inputs can be of any length, you should be mindful that LLM prompts have a limit on how long of an input they can process. If you expect long inputs, make sure you select a model with a sufficiently large context window.
* To expose an Input node to your users, you will need to set it up in the [**Interface**](https://docs.stack-ai.com/stack-ai/export-options/deploy-with-the-export-view) tab.

### Inputs in the Interface tab

The **Interface** tab is where you **export and deploy** your project, and define how end-users will interact with it. When your project is published to the Interface tab, end-users can use the agent interface to provide input (for example, by typing a message) which is then passed into the workflow.

#### Chat Assistant Interface

If you select the **Chat Assistant** interface, the message typed by the end-user becomes the workflow input and is passed into the Input Node in your workflow.

<figure><img src="/files/sbAc1CSBwABsP1ivby3t" alt=""><figcaption></figcaption></figure>

#### Form Interface

If you select a **Form** interface, inputs appear as form fields the user fills out before running the workflow.

* Each Input Node becomes a field in the form.
* You can include multiple Input Nodes, and each one will appear as a separate form field.
* You can choose which inputs are required vs optional.
* Users submit the form, then the workflow runs with those values.

<figure><img src="/files/79iTBR3yXgjXefVrG9pQ" alt=""><figcaption></figcaption></figure>


# Files Node

The Files Node allows users to upload a file to the flow and use it as an input to the LLM.

The Files Node is not a Knowledge Base; RAG will not be performed over the files. Instead, the contents of the file will always be given directly to the LLM as context.

This makes the Files Node ideal for:

* One-off or user-provided documents
* Ad-hoc analysis (e.g. “analyze this PDF”)
* Inputs that change frequently per run

If the **same file needs to be reused across multiple workflows or queries**, consider using a **Knowledge Base node instead** for better performance and scalability. ([more on knowledge bases](/workflow-builder/core-nodes/knowledge-bases)).

<figure><img src="/files/ATh1UzShlEI5LawnqUZ1" alt=""><figcaption></figcaption></figure>

**Expose as Input:** This toggle displays the files node as an available input on the user-facing interface, allowing the user to upload their own file. Toggle this OFF to keep the files static. The workflow will then always use the files you uploaded, and the user won't be able to change this.

### Files Node Settings

Click on the node to see the available settings.

<figure><img src="/files/wePU0l6hoRdW1NXNUalK" alt=""><figcaption></figcaption></figure>

#### **Expose as input**

When **Expose as Input** is enabled, the Files Node appears as an input field in the **user-facing interface**, allowing end users to upload their own files at runtime.

* **ON** → Users can upload or replace the file when running the workflow.
* **OFF** → The workflow always uses the file(s) you uploaded in the editor, and users cannot modify them.

#### Enable Parsing

* When enabled, Stack AI extracts readable text from the uploaded file and makes it available to the LLM as context.
* This is **required for most non-plain-text formats** such as PDFs, Word documents, and presentations. Without parsing, the LLM cannot access the file’s contents.
* ⚠️ **Performance note:** Parsing adds extra processing steps and can slow down workflows, especially for large or complex files. For this reason, only enable it when the file’s contents are actually needed by the LLM.

#### **Chunking Settings**

* **Chunking Algorithm**: Defines how the data is split (e.g., Sentence-based).
* **Chunk Overlap**: The number of overlapping tokens between chunks.
* **Chunk Length**: Max length of each chunk sent to the LLM.

More on [chunking](/getting-started/core-ai-concepts/chunking).

#### **Additional Features**

* **Advanced Data Extraction**: Enable more precise field-level parsing (toggle option).&#x20;
  * Use this when you need specific fields, more consistent outputs or structured downstream processing.
* **Text in Images (OCR)**: Extract and include text from images (toggle option).
  * ⚠️ **Efficiency warning:** OCR significantly increases processing time and cost. Enable it only if the document contains critical information embedded in images.

### How to Expose the Files Node to your Users

1. Go to the **Interface** tab.
2. Ensure to select "Expose as input" in the Files Node.
3. Enable the files node in the **Inputs** section.
4. Press **Save Interface** to save your changes.
5. Your users should now see an upload button in the interface.


# Trigger Node

A Trigger Node is the starting point for any automated workflow. Once a specific event happens, the trigger automatically run your StackAI workflow.

In this guide, we’ll cover:

1. [Core Trigger Types ](#id-1.-core-trigger-types)
2. [Managing connections](#id-2.-linking-your-accounts): How to link your external accounts and apps.
3. [Setup & Data Configuration](#id-3.-setup-and-configuration): A step-by-step on building and using trigger data.
4. [Best Practices](#id-4.-best-practices-and-implementation-notes)
5. [Common Workflows & Supported Apps](#id-5.-practical-examples-and-trigger-providers)

### 1. Core Trigger Types

Triggers generally fall into two categories based on *why* they start.

#### Event-Based (Real-Time)

These triggers run the moment an action occurs in another app or within StackAI itself. Some examples:

* Communication: A new email arrives in Gmail or Outlook.
* Data Entry: Someone submits a form in Typeform.
* System Events: A payment is processed in Stripe, or a ticket is created in Zendesk.
* Workflow Chaining: You can set a trigger to fire as soon as a *different* StackAI workflow finishes.

#### Time-Based (Scheduled)

These fire based on a clock rather than an external action. They can be either:

* One-time: Run at a specific date and time.
* Recurring: Run every hour, daily, or weekly (e.g., generating a Monday morning report).

### 2. Create a connection

To use triggers from apps like Gmail or GitHub, StackAI needs permission to "see" those events.

* Setting up a connection: The first time you use an external trigger, you'll be asked to log in to that service.
* Permissions: This simply allows StackAI to monitor for the specific events (like new emails) that you've selected.
* Management: You can manage or remove these permissions anytime under Organization → Connections.

See all available connection providers [here](#id-5.-common-workflows-and-supported-apps).&#x20;

### 3. Setup and Configuration

1. **Add the Node:** Place a Trigger Node on your canvas and choose the specific trigger you'd like to use.
2. **Connect:** Link the trigger in the corresponding node&#x73;**.**

   <figure><img src="/files/v4luPwmjZp0cISRaULT2" alt=""><figcaption></figcaption></figure>

#### Configuring and Filtering

Some triggers, like  "On Email Received" allow you to activate the trigger only if certain conditions are met. For example, if the email comes from a specific sender, has a specific label, or includes attachments.

For other triggers, you will need to select a specific table, sheet, or db from the connection.

Find these settings under "Configurations"

<figure><img src="/files/AmSJiMMOSBOgMrWZp1Rw" alt=""><figcaption></figcaption></figure>

#### How to Access and Use Outputs&#x20;

When a trigger occurs, it does more than just start a workflow—it captures specific details about the event and can pass them along as variables to other nodes.&#x20;

1. Locate the Variables: The list of available output fields is available in the "Outputs" section of each trigger.
2. Use in Downstream Nodes: You can reference these variables (like the sender's name or the body of the email) in your AI prompts, logic filters, or other action nodes. This allows the workflow to "know" the context of what triggered it.

<figure><img src="/files/XnDVRKAxTFH0OW73DYHA" alt=""><figcaption></figcaption></figure>

### 4. Testing

To test your triggers before publishing a workflow, you can click the "Run" button and see the options available.

You will be able to input test data or, for some triggers, use existing data (for example, from your inbox).

<figure><img src="/files/529Ct4kAkJXmzKlF4mJu" alt=""><figcaption></figcaption></figure>

You can also click on "live listen" and wait for the trigger event to kick off your workflow. Once your project is ready, make sure to publish to "turn on" the trigger.

### 5. Best Practices

To keep your automations running smoothly, keep these points in mind:

* Publishing is required:&#x20;
  * Triggers are only active once the workflow is Published. They will not respond to live events while the workflow is only in "Draft" mode.
* Connection health:&#x20;
  * Verify that your connection has the necessary permissions (if applicable).
  * Confirm that webhooks are properly configured.
  * Monitor workflow execution logs for any connection or processing errors.
  * Ensure your account has webhook capabilities.
* Use the Analytics Tab:&#x20;
  * If a workflow didn't run as expected, the Analytics tab is the best place to see if the trigger fired and where the data went.
* Test with sample data:&#x20;
  * Always use the "Test Values" before relying on live form submissions.&#x20;

### 6. Common Workflows & Supported Apps

StackAI offers native trigger nodes for direct integrations (like Gmail or Stripe) that start your workflow automatically.&#x20;

If an app isn’t supported natively, you can still trigger your workflow using inbound Webhooks via the StackAI API, allowing any app that sends HTTP requests to kick off your flow.

Key Considerations:

* Your external app must support outgoing HTTP requests.
* You may need to manually parse or transform data when using webhooks instead of native nodes.

<table><thead><tr><th width="134.12890625">Category</th><th width="131.98046875">Providers</th><th>Common Use Cases</th></tr></thead><tbody><tr><td><strong>Email &#x26; Shared Inboxes</strong></td><td>Gmail, Outlook, Missive</td><td><p>Auto-reply to emails. </p><p>Extract structured information.</p><p>Create tasks or tickets from emails.</p><p>Filter and categorize messages.</p><p>Process attachments.</p></td></tr><tr><td><strong>Chat &#x26; Collaboration</strong></td><td>Slack, Microsoft Teams, Realtime Chat</td><td><p>Route conversations.</p><p>Escalate issues.</p><p>Monitor channels and send alerts.</p></td></tr><tr><td><strong>Support &#x26; Customer Operations</strong></td><td>Zendesk</td><td><p>Create and update tickets.</p><p>Route customer requests.</p><p>Collect and categorize feedback.</p><p>Follow-ups or escalations.</p></td></tr><tr><td><strong>Forms &#x26; Hiring</strong></td><td>Typeform, Workable</td><td><p>Process leads and applications.</p><p>Route job candidates.</p><p>Handle event signups.</p><p>Analyze responses.</p></td></tr><tr><td><strong>Databases &#x26; Spreadsheets</strong></td><td>Airtable, Google Sheets</td><td><p>Monitor row changes.</p><p>Process structured records.</p></td></tr><tr><td><strong>Files &#x26; Document Management</strong></td><td>Google Drive, SharePoint</td><td><p>React to file uploads.</p><p>Process documents.</p><p>Archive or sync files.</p><p>Generate reports from updated files.</p></td></tr><tr><td><strong>Payments &#x26; Transactions</strong></td><td>Stripe</td><td><p>Handle orders and subscriptions.</p><p>React to failed payments.</p><p>Update CRM on subscription changes.</p></td></tr><tr><td><strong>Developer &#x26; System Events</strong></td><td>GitHub, AWS SQS</td><td><p>Run checks on new pull requests.</p><p>Process queued events.</p><p>Integrate system-level workflows.</p></td></tr><tr><td><strong>Internal Workflows</strong></td><td>StackAI</td><td><p>Trigger workflows on workflow completion.</p><p>Chain multi-step automations.</p></td></tr><tr><td>Run on a schedule</td><td>StackAI</td><td><p>Weekly reports</p><p>Weekly competitor analysis / web scraping<br>Read google spreadsheet every month to revise changes</p></td></tr></tbody></table>


# URL Input Node

### What is a URL Node?

<figure><img src="/files/prLxQO3OmjixiO6dEiaP" alt=""><figcaption></figcaption></figure>

The URL Node allows users to add a URL to the flow and scrape the HTML or Metadata of a website to use as an input to the LLM. If an LLM node returns a URL as its output, it can feed into the URL node to scrape a website in a more complex workflow. The entire output of the URL Node will be given to the LLM as context.

#### **Mode**

Defines what type of content to fetch from the provided URL.

* `Page HTML`: Downloads the full HTML content of the page. Suitable for use cases like content parsing, summarization, or extraction of visible page elements.
* `Metadata only`: Fetches only metadata (e.g., `<title>`, `<meta>` tags such as description and Open Graph data). Useful for lightweight previews or indexing.

#### **Scrape Subpages**

When enabled, the node will attempt to crawl and include linked subpages within the same domain.

#### **Enable URL as Input**

When checked, this enables dynamic input of URLs via upstream nodes or user input, rather than hardcoding a static value in the interface.

### How to use the URL Node

1. Add a URL node to your flow.
2. Connect the URL node to an LLM node.
3. Mention the URL node in the LLM node by pressing **"/"** and selecting the URL node.
4. Add an Output node to your flow.
5. Connect the Output node to the LLM node.

### URL Node Settings

If you click the gear icon in the node, you will see the available settings.

**Chunking Settings**

* **Chunking Algorithm**: Defines how the data is split (e.g., Sentence-based).
* **Chunk Overlap**: The number of overlapping tokens between chunks.
* **Chunk Length**: Max length of each chunk sent to the LLM.

**Additional Features**

* **Advanced Data Extraction**: Enable more precise field-level parsing (toggle option).
* **Text in Images (OCR)**: Extract and include text from profile images or banners (toggle option)


# Audio Input Node

The **Audio Node** allows you to upload or record an audio clip as input. The audio is converted to text (using an audio-to-text LLM) and passed to your model.

#### **Providers**

The Audio Node enables you to choose from two providers that will transcribe your audio:

* `deepgram`: Uses Deepgram's API for audio transcription. Supports multiple models and submodels.
* `whisper-1`: Uses OpenAI's Whisper v1 model. Does not support model or submodel selection (uses a default configuration).

#### **Model**

Available only when using the `deepgram` provider. Defines the main model used for transcription.

* `nova`: Legacy model, fast and lightweight.
* `nova-2`: Latest generation with improved accuracy and speed.
* `enhanced`: Optimized for high-quality audio and complex content.
* `base`: Baseline transcription model with balanced performance.

This field is disabled for `whisper-1`.

#### **Submodel**

Further refines transcription behavior. Available only with `deepgram`.

* `general`: Default submodel for general-purpose transcription.
* *Other submodels exist depending on Deepgram's model.*

This field is disabled for `whisper-1`.

### Audio Node Settings

If you're using your own audio-to-text model, here you can add your own API key to use it.

### How to use it

1. Add an Audio to Text node to your flow.
2. Connect the Audio to Text node to an LLM node.
3. Mention the Audio to Text node in the LLM node by pressing **"/"** and selecting the Audio to Text node.
4. Add an Output node to your flow.
5. Connect the Output node to the LLM node.

### Expose the Audio to Text node to your users

1. Go to the **Export** tab.
2. Enable the audio node in the **Inputs** section.
3. Press **Save Interface** to save your changes.
4. Your users should now see an upload button in the interface.


# Image Input Node

The Image Input node allows you to analyze and process images using advanced AI vision models. It can describe image content, extract information, answer questions about images, and perform various computer vision tasks by processing images from uploaded files.

To use the image node, upload a file or multiple files and connect the node to your input.

<figure><img src="/files/NDAZlkKt6mUAe2fXEgMP" alt=""><figcaption></figcaption></figure>

### OCR

OCR is OFF by default. Turn it ON to first transform the image to text before passing to the model. A model of your choice will transform the image to text, based on a prompt you provide.

**Available Models**

Select the AI vision model to use for image analysis

* **gpt-4o**: Fastest option
* **gpt-4.1**: Balanced option offering good performance with faster processing
* **flux-kontext-pro:** Advanced model for detailed image understanding and complex analysis

**OCR prompt**: Describe what you want the AI to do with the image

* Be specific about what information you need extracted
* Examples: "Describe the content of this image in detail", "Count the number of people in this photo", "What text is visible in this image?"

### Outputs

The Image Input node provides processed information based on your prompt and the selected model's analysis of the image.

### Common Use Cases

* **Content Moderation**: Automatically detect inappropriate or unsafe content in images
* **Product Cataloging**: Extract product details, descriptions, and features from product photos
* **Document Processing**: Extract text and data from scanned documents, receipts, or forms
* **Quality Control**: Analyze product images for defects or compliance issues
* **Social Media Management**: Generate captions and descriptions for social media posts
* **Accessibility**: Create alt text descriptions for web images
* **Inventory Management**: Count items or identify products in warehouse photos
* **Medical Imaging**: Analyze medical images for preliminary screening (with appropriate oversight)
* **Real Estate**: Generate property descriptions from listing photos
* **Education**: Create study materials by analyzing diagrams, charts, or textbook images

### Prompt Examples

* **General Description**: "Describe everything you see in this image in detail"
* **Text Extraction**: "Extract all visible text from this image and format it as plain text"
* **Object Counting**: "Count how many \[specific objects] are visible in this image"
* **Color Analysis**: "What are the dominant colors in this image?"
* **Scene Understanding**: "What is the setting or location shown in this image?"
* **Safety Assessment**: "Identify any potential safety hazards visible in this workplace image"
* **Product Information**: "List all the product features and specifications visible on this packaging"

### Best Practices

* **Image Quality**: Use high-resolution, clear images for better analysis results
* **Specific Prompts**: Be precise about what information you need from the image
* **Model Selection**: Choose the appropriate model based on complexity requirements
* **URL Accessibility**: Ensure image URLs are publicly accessible and don't require authentication
* **File Formats**: Use standard image formats (JPG, PNG) for best compatibility
* **Privacy Considerations**: Be mindful of privacy when processing images containing personal information

### Troubleshooting

* **Image Not Loading**: Verify the image URL is correct and publicly accessible
* **Poor Analysis Results**: Try using a more detailed or specific prompt
* **Model Errors**: Switch to a different model if you encounter processing issues
* **Slow Processing**: Consider using o3-mini for faster results on simple tasks
* **Format Issues**: Ensure your image is in a supported format and not corrupted


# Typeform Trigger Node

### What is a Typeform Trigger Node?

The Typeform Form Submission Trigger node monitors your Typeform forms and activates your workflow automatically whenever a new form response is submitted. It captures all form data in real-time, making the submission details immediately available for processing in your workflow.

### Outputs

When a form is submitted on Typeform, the trigger node provides the following output:

**Form Response** (string): A JSON string representing the complete response data from the Typeform submission, including all field answers, form metadata, submission timestamp, and respondent information

### How to set up the Typeform Form Submission Trigger Node

1. Add a Typeform Form Submission Trigger node to your workflow
2. Connect your Typeform account:
   * Click "New Connection" if no connection exists
   * Select an existing Typeform connection from the dropdown if available
   * Provide your Typeform API credentials when prompted
3. Select the specific Typeform you want to monitor from your account
4. Configure test values (optional):
   * Add a sample form response JSON for testing in the workflow builder
   * These test values are only used during development and don't affect the actual trigger
5. Connect the Typeform trigger to downstream nodes in your workflow
6. Publish your workflow to activate the trigger

### Important Notes

* The trigger will not work until you publish the workflow
* You must configure a Typeform connection before the trigger can be used
* The Typeform connection requires valid API credentials with webhook access
* Webhooks are automatically configured for your selected form
* The trigger responds to all new form submissions in real-time
* Test values are only used during workflow design and testing

### Using Form Data in Your Workflow

You can reference the form submission data in downstream nodes by:

* Selecting the Typeform trigger node as an input source
* Parsing the Form Response JSON to extract specific field values
* Using the submission data with AI nodes for analysis or processing
* Accessing metadata like submission time, form ID, and respondent details
* Processing answers from different question types (text, multiple choice, rating, etc.)

### Common Use Cases

* **Lead Generation**: Automatically process and route new leads from contact forms
* **Customer Support**: Create support tickets from feedback or help request forms
* **Event Registration**: Process event signups and send confirmation emails
* **Survey Analysis**: Analyze survey responses and generate insights
* **CRM Integration**: Add new contacts to your CRM system automatically
* **Email Marketing**: Subscribe form respondents to mailing lists
* **Order Processing**: Handle product orders or service requests
* **Feedback Management**: Collect and categorize customer feedback
* **Application Processing**: Review and route job applications or membership requests
* **Data Collection**: Store form responses in databases or spreadsheets

### Troubleshooting

* Ensure your workflow is published for the trigger to be active
* Verify that your Typeform connection has the necessary permissions
* Check that the selected form exists and is published on Typeform
* Confirm that webhooks are properly configured (usually handled automatically)
* Monitor workflow execution logs for any connection or processing errors
* Test with sample data first before relying on live form submissions
* Ensure your Typeform account has webhook capabilities (may require paid plan)


# Outputs

Output nodes define what your workflow produces — text responses, images, action calls, or rendered documents.

Connect an output node to the final step of your workflow to surface results to the user or downstream system.

### In this section

<table data-view="cards"><thead><tr><th>Topic</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>Output Node</strong><br>Return text or structured data to the user interface or API caller.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/DvCoTR6JmJjsUmquQmtH">/spaces/FSlso1Kjob5CLDrh0dVn/pages/DvCoTR6JmJjsUmquQmtH</a></td></tr><tr><td><strong>Image Node</strong><br>Generate or return an image as the workflow output.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/a8WoGfH0StFJywgH1zxQ">/spaces/FSlso1Kjob5CLDrh0dVn/pages/a8WoGfH0StFJywgH1zxQ</a></td></tr><tr><td><strong>Action Node</strong><br>Trigger an action in a connected app as the final step.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/Dm31MgnDl0Mj9OxKlI7k">/spaces/FSlso1Kjob5CLDrh0dVn/pages/Dm31MgnDl0Mj9OxKlI7k</a></td></tr><tr><td><strong>Audio Node</strong><br>Return synthesized speech or an audio file.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/cyXkd8nA9ght5nC4puCo">/spaces/FSlso1Kjob5CLDrh0dVn/pages/cyXkd8nA9ght5nC4puCo</a></td></tr><tr><td><strong>Template Node</strong><br>Render a document or formatted output using a template.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/1K0V8gzkQQlcNSWeSvMA">/spaces/FSlso1Kjob5CLDrh0dVn/pages/1K0V8gzkQQlcNSWeSvMA</a></td></tr></tbody></table>

### Pick the right output for your use case

* Returning a chat response or data payload? Use the [**Output Node**](/workflow-builder/outputs/output-node).
* Generating a report or formatted document? Use the [**Template Node**](/workflow-builder/outputs/template-node).
* Writing to a connected app (CRM, ticketing, etc.)? Use the [**Action Node**](/workflow-builder/outputs/action-node).


# Output Node

### What is an Output Node?

An Output node displays the results generated by other nodes in your workflow. It acts as the final delivery point in your data pipeline, where outputs from processing nodes (like LLMs or data processors) are shown to your users.

The Output node is typically connected to nodes that generate textual or structured responses, such as:

1. **LLM nodes** (to display answers or messages).
2. **Knowledge Base nodes** (to show retrieved documents or summaries).

Key benefits of the Output node:

* Provides a clear way to present results to end-users.
* Enables visibility into the results of data transformations or AI completions.
* Supports dynamic interfaces when exposed via the **Export** tab.

### How to expose Outputs externally?

To allow users to see the Output node results:

1. Go to the **Export** tab.
2. Enable the Output node in the **Outputs** section under **Fields**.
3. Click **Save Interface**.
4. The Output node’s results will now appear in your external interface when the workflow is triggered.

### What to expose in the Output node?

With the Output node, you will be able to plot the result coming out of any other node.

Here are a few quick facts:

* **Markdown:** The output node uses Markdown to format the text. You can use it to add links, imgs, headings, and more.
* **Length:** While output can have any length, you should be mindful that LLM prompts have a limit on how many words they can result.
* **Intermediate Outputs:** Use intermediate Output nodes to debug your workflow: for example, connect it to a vector store to see what chunks of text are returned.


# Image Node

### What is an Image Node?

The Image node allows you to generate visual content from text prompts using AI image generation models such as OpenAI’s DALL·E 3 or Stable Diffusion.

Use this node to turn descriptions into visuals. Ideal for creative tools, content generation, or enhancing user engagement with dynamic imagery.

Common applications include:

* Illustrating chatbot responses
* Creating product mockups or concept art
* Generating visual assets on-the-fly for user interfaces

### How to use it?

To use the Image node:

* **Input:** Accepts a text string (prompt), often from a user or LLM node.
* **Output:** Returns a generated image that can be previewed or used downstream.

The model processes the prompt and returns a generated image in the specified size and style.

### Settings

#### Configuration Options

* **Model:** Choose between available image generation models:
  * `OpenAI DALL·E 3`
  * `Stable Diffusion 3.5`
* **Image size:** Select the resolution for the generated image:
  * `1024×1024` (square)
  * `1024×1792` (portrait)
  * `1792×1024` (landscape)
* **API Key:** (Optional) Provide your own key to use a custom instance or higher tier of the selected model.

By adjusting the model and size, you can tailor visual outputs to match your product’s design or artistic needs.

### How to expose Images externally?

To allow users to see the generated images:

1. Go to the **Export** tab.
2. Enable the Image node in the **Outputs** section under **Fields**.
3. Click **Save Interface**.
4. The image result will now be rendered in your external interface when the flow is triggered.


# Action Node

### What is an Action Node?

An Action node allows your workflow to interact with external systems. You can use it to send data to other apps, update databases, trigger web searches, or automate other tasks across services.

This node is typically used after collecting and processing data through Input or LLM nodes.

Common uses include:

* Sending rows to **Airtable** or **Excel**
* Updating documents in **Notion** or **MongoDB**
* Querying or writing to **PostgreSQL**
* Triggering a **Web Search** and retrieving results
* Sending Emails using **Gmail** or **Outlook**

These nodes help turn your workflows into automated agents that don’t just compute — they also take action.

### How to use the Action node

To use the Action node:

1. Click the node.
2. In the right panel, search and select an action from the desired node.

Depending on the Action selected:

* **Input:** Requires structured data (usually JSON or plain text) from a previous node.
* **Output:** Sends data to an external service. The result can optionally be passed to an Output node or another processing node like an LLM.

Not all actions produce user-facing output. Some simply perform the task in the background — such as logging, sending an email, or updating a database.


# Audio Node

### What is an Audio Node?

The Audio node lets you generate audio from text using high-quality voice synthesis models. It's ideal for turning responses from LLMs or static text into spoken audio.

This node is commonly used in voice interfaces, accessibility workflows, or any experience where you want to deliver output via sound.

It supports popular text-to-speech engines and customizable voices to match your tone and use case.

Key capabilities include:

* Supports multilingual audio synthesis.
* Choose from multiple voice models and accents.
* Play back audio directly in the interface with **Test Output**.
* Optionally use your own API key to connect with external TTS providers.

### How to use it?

To use the Audio node:

* **Input:** Accepts a text string (e.g., from an LLM or Input node).
* **Output:** Returns a playable audio file that can be previewed that can be previewed.

After receiving text input, the Audio node displays a **Test Output** section with a play button, allowing you to listen to the generated audio.

### Settings

#### Configuration Options

* **Model:** Choose the TTS engine, such as `eleven_multilingual_v2`.
* **Voice:** Select from available voice profiles (e.g., Sarah, Chris).
* **API Key:** Optional field for providing your own TTS provider credentials.

### How to expose Audio externally?

To make audio results available in your external interface:

1. Go to the **Export** tab.
2. Enable the Audio node in the **Outputs** section under **Fields**.
3. Click **Save Interface**.
4. When triggered, users will be able to hear the generated audio directly in the interface.


# Template Node

### What is a Template Node?

A Template Node allows user to control how information is presented before it is shown to a user or sent somewhere else (such as email, report, or message). Instead of passing raw or unstructured data that comes from any node, users can turn it into something standardized or readable to their liking.

<figure><img src="/files/N16anTmAdEi3gSnN7UOU" alt=""><figcaption></figcaption></figure>

This node is typically connected to upstream nodes that supply data, enables users to format that data in a preferred structure, and passes the formatted output to downstream nodes that rely on it.

<figure><img src="/files/5yAIusXumr9NRykFSNE8" alt=""><figcaption></figcaption></figure>

Typically, this node is further connected to nodes that display or send information, such as:

* an [Output node](/workflow-builder/outputs/output-node) (showing results to the user), or
* some Send Email node, such as [Gmail](/workflow-builder/apps/gmail) node (sending formatted content via email), or
* some Send Message node, such as [Teams](/interface-and-deployment/end-user-interfaces/microsoft-teams) node (sending formatted messages via some messaging app), etc.

The benefits of the Template Node is that it facilitates:

* formatting output from any node before sending it onward
* reusing information from across the workflow, and combining them

  <figure><img src="/files/jc31f4Td3Nx84FDorQyr" alt=""><figcaption></figcaption></figure>
* using existing, standardized templates by uploading them directly to the workflow<img src="/files/SR3hpEyadjFO4QHcUvcu" alt="" data-size="original">


# Core Nodes

Core nodes are the primary building blocks of every StackAI workflow — the AI reasoning layer, the knowledge retrieval layer, and the platform utility layer.

These nodes handle the heavy lifting: reasoning over prompts, retrieving context from data, and calling StackAI's platform features.

### In this section

<table data-view="cards"><thead><tr><th>Topic</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>AI Agent Node</strong><br>Configure LLM reasoning, tools, knowledge sources, and agentic behavior.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/YjEQjSjqwYs4YdqzgwL9">/spaces/FSlso1Kjob5CLDrh0dVn/pages/YjEQjSjqwYs4YdqzgwL9</a></td></tr><tr><td><strong>Knowledge Bases</strong><br>Connect document stores and structured data for retrieval-augmented generation.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/IyHE7n42v7FygdPABjeO">/spaces/FSlso1Kjob5CLDrh0dVn/pages/IyHE7n42v7FygdPABjeO</a></td></tr><tr><td><strong>StackAI</strong><br>Access StackAI platform features like Human-in-the-Loop from within a workflow.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/786Fqu82gGo3nFSKLvIT">/spaces/FSlso1Kjob5CLDrh0dVn/pages/786Fqu82gGo3nFSKLvIT</a></td></tr></tbody></table>

### Start with the AI Agent Node

* The [**AI Agent Node**](/workflow-builder/core-nodes/ai-agent-node) is the core reasoning unit — configure it first.
* Add [**Knowledge Bases**](/workflow-builder/core-nodes/knowledge-bases) to give your agent access to documents or data.
* Use [**Human in the Loop**](/workflow-builder/core-nodes/stackai/human-in-the-loop) when workflows need human review before proceeding.


# AI Agent Node

An AI Agent Node is the heartbeat (or heartbeats!) or your project. StackAI is provider-agnostic, just choose your favorite provider and select the model you'd like to use in your project. If you change your mind and want to try a different provider or model, just make your selection in the dropdown menu.

<figure><img src="/files/VXYtuqX5WrRbuy3dHWGN" alt=""><figcaption></figcaption></figure>

To see an up to date list of our available providers and models, visit our [LLM Leaderboard here.](https://www.stack-ai.com/llm-leaderboard)

<figure><img src="/files/s2xvfEI1SYZ5uJXZhSfS" alt=""><figcaption></figcaption></figure>


# Prompting

In the Prompting section of the LLM Node, you will see two sections: Instructions, and Prompt.

### System Prompt

The system prompt sets the overall behavior, tone, and role of the AI assistant for the entire conversation. It acts as a set of instructions or context that the model should always keep in mind when generating responses. This message is passed into the model's context each time you interact with it, so the model with always "remember" what you say here. It's important to keep this part as short and informative as you can. Put only the most important information into this section. It’s best used for setting rules, style, or persona (e.g., “You are a helpful tutor. Always explain things simply.”).

<figure><img src="/files/hou2boa6LUSVb1uFkTkS" alt=""><figcaption></figcaption></figure>

### User Prompt

The user prompt is the main message or question that the LLM will answer. It can include direct user input, references to other nodes, or additional context. This is the main content the LLM will respond to, after considering the system prompt.

Include placeholders in your user prompt if you'd like to import output from other nodes (e.g., user input). You can do this by typing backslash and then selecting the node whose output you'd like to include.&#x20;

<figure><img src="/files/D3kVCd1Dymf9OsY0mHOO" alt=""><figcaption></figcaption></figure>

***

If you need help with your prompt, try our Magic Wand tool on the bottom right of the prompt box.

<figure><img src="/files/TzG7JFKVDQEDjWw6rByS" alt=""><figcaption></figcaption></figure>

To learn more about prompting best practices, go [here](/getting-started/core-ai-concepts/prompt-engineering).


# Tools

Add tools directly to your LLM Node to let the LLM decide when to use them. The LLM intelligently determines when and how to call these tools based on the context of the conversation and user inputs. Unlike an outside node, whose input is always passed in to the LLM, a tool is integrated into the LLM itself. This approach works best when:

* You don't need the tool to be accessed at every query, it's okay for the LLM to autonomously decide when to use the tool.
* You would like the LLM to have access to multiple tools at once.&#x20;

### LLMs with Tools

Only certain models are able to handle tools. If you don't see the option for tool calling in your LLM Node, it means that model is not built to handle tool calls.

### Tool Provider

Before using a tool, it's important to understand how tools are organized in Stack AI. Tools are grouped under "Providers" - these are the main services or systems that contain related functionality. Think of a Provider as a container for multiple related tools.

For example:

* Salesforce (Provider)
  * Create Lead (Tool)
  * Update Contact (Tool)
  * Search Records (Tool)

This organization makes it easy to find and use related tools. Additionally, providers share authentication headers and common access methods, allowing tools within the same provider to seamlessly utilize the same authentication and connection details when performing their actions.

<figure><img src="/files/eFbxesTmUtpytbODBXOY" alt=""><figcaption><p>LLM tool to execute another StackAI project</p></figcaption></figure>

### How It Works

* The LLM analyzes the user's request or query to understand what action needs to be taken
* It identifies which tool (API endpoint) is most appropriate for fulfilling that request
* It automatically constructs the API request by filling in:
  * Query parameters
  * Body parameters
  * Path parameters
  * Headers
  * Any other required request data

### Tools vs. Separate Node

When should you use a tool and when should you use a separate node? This depends on what you want to accomplish. If you want to enforce using the app at every invocation, then use an outside node--the LLM will have to use the app every time. If you only want the app to be used when necessary and you want the LLM to decide--use a tool!&#x20;

Tools are also a great choice if you want the LLM to have options. For example, if you want it to search LinkedIn, the Web, and your own knowledge base, you can add those tools to the same LLM and it may use one, two, or all of the options to answer your query.&#x20;

On the other hand, if you want to make sure that a search is carried out across LinkedIn, the Web, and your KB--then its better to have three separate nodes delivering their output to the LLM. In this case, be careful! Concatenating inputs could exceed you chosen model's context window.&#x20;

### Prompt Optimization with Tools

If you'd like to reference the tool directly in your user prompt, select the tool from the Tools card.

<div data-full-width="true"><figure><img src="/files/7JZgjNWtEh1ifvrR0wPl" alt=""><figcaption></figcaption></figure></div>

When using custom tools with an LLM node, it's important to provide clear prompting to help the LLM understand how and when to use your tools effectively:

1. **Describe the Tool's Purpose**: Include a clear description of what the tool does and when it should be used in your system prompt. For example: "Use the addPet tool to add a new pet to the store database."
2. **Provide Usage Examples**: Give examples of proper tool usage in your prompts to demonstrate the expected input/output patterns. For example: "addPet(name='Max', category='dog', status='available')"
3. **Set Clear Instructions**: Specify any requirements or constraints for using the tool in your prompts. For example: "When using addPet, ensure all required fields (name, category, status) are provided."
4. **Handle Errors**: Include guidance on how to handle potential errors or edge cases when using the tool. For example: "If addPet returns an error, verify the input data and try again with corrected values."

Example system prompt:

```
When the user wants to include a new pet, follow these steps:

1. Ask for the name of the pet
2. Use the listPets tool to check if the name already exists. If it does, ask the user for a different name that is not in the list.
3. If the pet name is unique, collect all required information for addPet.
   3.1. If any information is missing, ask the user for it.
4. Use the addPet tool to create the new pet entry
5. Use the getPetById tool to retrieve the newly created pet
6. Provide a summary confirming the successful pet addition with the key details
```

### Custom Tools

Custom Tools enable AI agents to execute custom actions by integrating with your API systems and services. When you define API endpoints in your custom tools, each endpoint becomes a distinct tool that the LLM can utilize.&#x20;

A custom tool represents a specific API endpoint and its functionality. Each tool has several key components:

* **Name**: A unique identifier for the tool that can be referenced in LLM prompts. For example, if you name a tool `addPet`, you would reference it as "addPet" when instructing the LLM to use it.
* **Description**: A clear explanation of what the tool does. This helps the LLM understand when and how to use the tool appropriately.
* **Path**: The API endpoint path that the tool will call (e.g., `/api/v1/pets`)
* **Method**: The HTTP method to use (GET, POST, PUT, DELETE, etc.)

When the LLM needs to create a new pet, it can reference the `addPet` tool by name and provide the necessary parameters based on the tool's description and requirements.

{% embed url="<https://www.youtube.com/watch?v=BuWR0Kk9zZ0>" %}

### Create a Custom Tool

<figure><img src="/files/c77k0lITbk5YFZAhnKZu" alt=""><figcaption></figcaption></figure>

Custom tools are defined through API services, allowing you to integrate external functionality into your LLM. When you create a custom tool, you'll describe your API endpoints and their capabilities.&#x20;

Each API endpoint becomes a distinct tool that represents a specific action or operation in your system. The LLM will automatically understand how to use these endpoints and fill in the required parameters (like body and query parameters) based on the context and user input.

For example, if you have an e-commerce API:

* The `/products` endpoint becomes a tool for retrieving product information, where the LLM can fill search parameters
* The `/orders/create` endpoint becomes a tool for placing new orders, with the LLM providing order details in the request body
* The `/inventory/update` endpoint becomes a tool for managing stock levels, where the LLM determines the updated quantities

This approach lets you transform your existing APIs into reusable tools that can be easily incorporated into any LLM, making your external services and systems accessible to AI agents. The LLM handles the complexity of constructing proper API requests by intelligently filling parameters based on the conversation context. Custom tools help you build more maintainable and scalable flows by promoting code reuse and modular design.

**To create a custom tool:**

1. Navigate to an LLM Node that supports Tools (like GPT-4 or Claude)
2. Click the "Tools" button in the Tools section
3. Select the "Custom tools" tab where your custom tools will appear. Click the "Add Custom Tool" button.

This will open the custom tool creation interface where you can define your tool's functionality.

### Adding Tool Information

<figure><img src="/files/xm7z25Rom17t4mOXCkJm" alt=""><figcaption></figcaption></figure>

To create a custom tool, you need to include:

1. **Tool Provider Name**: Give your tool provider a descriptive name that represents the service or system
2. **OpenAPI Schema**: Provide the OpenAPI specification that defines your API endpoints. The schema must include:
   * Server URLs for the API endpoints
   * Complete endpoint definitions with:
     * Important! Clear descriptions explaining what each endpoint does and its purpose to help the LLM understand how to use them correctly
     * HTTP methods (GET, POST, PUT, etc.)
     * Path parameters
     * Query parameters for GET requests
     * Detailed request body schemas for POST/PUT requests
     * Response schemas
     * Required headers specific to endpoints
3. **Common Headers** (Optional): Define headers that should be applied across all endpoints, such as:
   * Authentication headers (e.g. API keys)
   * Custom headers required by your API

Each API endpoint defined in your OpenAPI schema will be automatically transformed into an individual tool that you can use in your LLMs. Taking time to properly configure these settings will make your tools more user-friendly and reliable.

Your custom tool will now appear in the tools panel and can be used in any LLM!


# Knowledge Sources

Knowledge Sources let you connect external content to an LLM node so the model can reference your data when generating responses. Instead of relying solely on the model's training knowledge, you can point it at your own documents, files, and messages.

<figure><img src="/files/YgosWbnkvVNLJFETNuaO" alt=""><figcaption></figcaption></figure>

There are two types of Knowledge Sources you can add to a model node:

### Knowledge Base

A Knowledge Base is an indexed copy of your content stored inside Stack AI. You upload or connect your files, Stack AI ingests and indexes them, and the LLM node queries that index at run time using semantic search.

Use a Knowledge Base when:

* You have a large collection of documents that don't change often
* You need fast, consistent retrieval across many files
* You want to control exactly what content the model has access to

Learn more about Knowledge Bases [here](/workflow-builder/core-nodes/knowledge-bases).

### Search Connected Apps

Search Connected Apps queries your external applications — like Google Drive, OneDrive, SharePoint, or Slack — in real time, directly from an LLM node. There is no indexing step: Stack AI searches the live content in your connected accounts and passes the results directly to the model.

Use Search Connected Apps when:

* Your content changes frequently and needs to be current
* You want to start searching immediately without an ingestion step
* You need to search messages or files that are added continuously (e.g. Slack, shared drives)

Learn more about Search Connected Apps [here](https://docs.stackai.com/workflow-builder/llms/llm-node/knowledge-sources/search-connected-apps).

### Search Connected Apps vs. Knowledge Base

Stack AI offers two ways to give an LLM node access to your documents and data. They solve different problems.

A **Knowledge Base** is an indexed copy of your content stored inside Stack AI. When you create one, Stack AI ingests your files, chunks them, and builds a vector index. At run time, the LLM node queries that index — which is fast and handles large document collections well. The tradeoff is that the index is only as current as the last sync: if a file changes in Google Drive after the last ingestion, the Knowledge Base won't reflect it until it syncs again. Knowledge Bases are best for large, stable libraries where you want consistent, low-latency retrieval.

**Search Connected Apps** skips the index entirely. There is no ingestion step — Stack AI queries the live content in your connected accounts directly, every time the workflow runs. This means results are always up to date, but the search depends on the speed and capabilities of the external app's own search API. It works best for content that changes frequently (recent Slack messages, a shared Google Drive folder your team updates daily) or when you want to start searching immediately without waiting for an ingestion job.

|                        | Search Connected Apps                      | Knowledge Base                     |
| ---------------------- | ------------------------------------------ | ---------------------------------- |
| **Indexing required**  | No                                         | Yes                                |
| **Content freshness**  | Always current                             | As fresh as the last sync          |
| **Best for**           | Frequently changing files, recent messages | Large, stable document collections |
| **Setup time**         | Instant                                    | Requires ingestion                 |
| **Search latency**     | Depends on external API                    | Fast (vector index)                |
| **Max content volume** | Limited by API result caps                 | Scales with your index             |

{% hint style="info" %}
If the same Google Drive folder is connected to both a Knowledge Base and a Search Connected Apps node, Stack AI will prefer the cached Knowledge Base content when available, and fall back to live search for anything not yet indexed.
{% endhint %}


# Search Connected Apps

## Search Connected Apps

Search Connected Apps lets your workflow query external applications — like Google Drive, OneDrive, SharePoint, or Slack — in real time, directly from an LLM node. Unlike a Knowledge Base, there is no indexing step: Stack AI searches the live content in your connected accounts at run time and passes the results straight to the model.

Use this when you need up-to-date information from files or messages that change frequently, or when you don't want to maintain a separate index.

<figure><img src="/files/Y49OvldtcTHLfQGJd8qp" alt=""><figcaption></figcaption></figure>

### Supported apps

| App          | What it searches                                     |
| ------------ | ---------------------------------------------------- |
| Google Drive | Files and documents in your Drive (full-text search) |
| OneDrive     | Files in your OneDrive (Microsoft Graph Search)      |
| SharePoint   | Files and list items in SharePoint sites             |
| Slack        | Messages across channels you have access to          |

### Adding a connected app to an LLM node

1. Open a workflow and click on the LLM node to open its settings panel.
2. Scroll to the **Knowledge Sources** section and click **Add Knowledge Sources**.
3. Select **Search Connected Apps** from the dropdown.
4. A provider picker opens — select the app you want to search (e.g. Google Drive).
5. Choose an existing connection from the list, or click **Add connection** to create a new one.
6. The app appears as a card under **Connected Apps** in the node settings.

Repeat steps 3–6 to add multiple apps. The node will search all of them in parallel at run time.

### Managing connections

Each connected app appears as a card in the **Connected Apps** section of the node settings. From the card you can:

* **Remove** the connection (trash icon) — the app will no longer be searched by this node.
* **Switch connection** (settings icon) — swap the connection without removing the app from the node. Useful if you have multiple accounts for the same provider.

### Using the tool in your prompt

When you add a connected app to an LLM node, Stack AI automatically makes a **Search Connected Apps** tool available to the model. For the model to actually use it, you need to reference it in the Instructions — otherwise the model may answer from its training knowledge without ever querying your connected apps.

Tell the model explicitly when and how to use the tool. For example:

> *"When the user asks a question, use the Search Connected Apps tool to look up relevant information from their Google Drive before answering. Always base your answer on the search results."*

You can also be more specific about the query strategy:

> *"Use the Search Connected Apps tool with a short 2–3 word keyword query that captures the core topic of the user's question. If the first search returns no useful results, try a different keyword."*

{% hint style="warning" %}
If you don't instruct the model to use the tool, it may skip the search entirely and respond from its own knowledge. It is good practice to include an explicit instruction.
{% endhint %}

<figure><img src="/files/sQmTGGDmaO1Kmrw7W44J" alt=""><figcaption></figcaption></figure>

### How the search works

When the workflow runs, the node automatically generates a keyword search query from the conversation context and sends it to each connected app simultaneously. For each result, Stack AI fetches the content — downloading and extracting text from binary files like PDFs or Word documents as needed — and passes the enriched chunks to the model with source citations.

#### Output

| Field               | Type         | Description                                           |
| ------------------- | ------------ | ----------------------------------------------------- |
| `results`           | Object array | The search results with extracted content             |
| `query`             | String       | The search query that was used                        |
| `sources_searched`  | Number       | Number of connections that were successfully searched |
| `extraction_errors` | String array | Files that failed content extraction                  |

{% hint style="info" %}
If the same Google Drive folder is connected to both a Knowledge Base and a Search Connected Apps node, Stack AI will prefer the cached Knowledge Base content when available, and fall back to live search for anything not yet indexed.
{% endhint %}


# Main Settings

### Add Memory

Add memory to your LLMs in Stack AI. Improve user interaction by enabling models to remember previous conversations and provide more context-aware responses.

LLMs do not hold an internal state, and many applications require tracking previous interactions with the LLM as part of the interface (e.g. chatbots). To this end, you can add memory to an LLM node by toggling "Memory" on under Main Settings.

<figure><img src="/files/gILCSa1AEjllUN8iZPDe" alt=""><figcaption></figcaption></figure>

Some quick facts:

* All the LLM memory is encrypted end-to-end in the Stack AI database.
* This data can be self-hosted under the Stack AI enterprise plan.
* The LLM memory is user-dependent. Each user interacting with a workflow gets their own isolated instance of LLM memory. This means conversation history and context are not shared across users.
* When a workflow is deployed as an API, you can explicitly set a `user_id` with each request. StackAI uses this `user_id` to determine which LLM memory instance to read from and write to. Requests with the same `user_id` will share memory, while requests with different `user_id` values will use separate memory contexts.
* By default, the “Sliding Window Input” memory is selected when a new LLM node is added to the flow.

We offer three types of memory modalities:

* **Sliding Window**
  * Stores all LLM prompts and completions.
  * This strategy may consume many tokens as the LLM prompts can often occupy thousands of tokens.
  * Loads a window of the previous prompts and completions as part of the LLM conversation memory, up to the number of messages in the window.
  * In non-chat /completion models (e.g. GPT-3 Davinci), the memory is added as part of the prompt as a list of messages at the end of the prompt.
* **Sliding Window with Input**
  * Stores one LLM input parameter (e.g. in-0) and all LLM completions, without storing the entire prompt from each turn.&#x20;
  * This strategy is more token efficient and aligned with many applications (e.g. when only the user message from input is relevant)
  * Loads a window of the previous inputs and completions as part of the LLM conversation memory, up-to the number of messages in the window. In non-chat models (e.g. davinci-003-text), the memory is added as part of the prompt as a list of messages at the end.
* **Vector Database**
  * Stores all of the inputs and outputs to the LLM in a Vector Database and retrieves the most relevant messages to use as LLM memory.
  * This is especially useful if you expect some of the information to be needed at a later time but not in a sequential manner.
  * Allows the LLM to access older, contextually relevant interactions without the constraint of a fixed window size.

#### Sliding Window

The sliding window allows you to set the number of turns you would like to be included in your context.

#### Input Id

If you chose to have 'Sliding Window with Input' saved in memory, then you can also select the id of the input that you would like to be held in context. All other inputs will not be stored in context.

### Citations

Turn on citations to allow the AI to provide citations (references) for the information it generates, especially when it uses external sources or uploaded documents.

<figure><img src="/files/WFyakZ0dI1fowfAwWOlU" alt=""><figcaption></figcaption></figure>

### Response Format

Text is the default response format. You can also choose to have the AI return a response formatted as a JSON object

| Response Format         | When to Use?                                                                                                                                                                      |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Text                    | The default option. Best for most conversational, summary, or narrative outputs.                                                                                                  |
| JSON Object             | Useful when you want structured data for further processing, such as extracting specific fields, integrating with APIs, or using the output in downstream nodes that expect JSON. |
| JSON Object with Schema | When you want to specify an exact JSON schema for the output so the AI outputs data in a very specific format for integration, automation, or validation.                         |

### JSON Object with Schema

To have an LLM output a JSON object according to a provided schema, you must provide the schema in the following format. JSON schemas not formatted according to this specification may throw an error.&#x20;

* "strict": true if you want to enforce exactly this output schema
* "description": a description of your schema
* "schema": the actual schema of your ouput
  * "type": set to "object" if you would like to return a JSON object
  * "properties": the outputs you would like to return, include each outputs type, and an informative description for the LLM

```json
{
    "strict": true,
    "name": "weather-schema",
    "description": "Schema for a weather API request",
    "schema": {
        "type": "object",
        "properties": {
            "location": {
                "type": "string",
                "description": "The location to get the weather for"
            },
            "unit": {
                "type": "string",
                "description": "The unit to return the temperature in",
                "enum": ["F", "C"]
            }
        },
        "additionalProperties": false,
        "required": ["location", "unit"]
    }
}
```

<br>


# Advanced Settings

The Advanced Settings give you fine-grained control over how the large language model (LLM) behaves, how it handles errors, and how it protects sensitive data.

<figure><img src="/files/CyvweOo11W4rtqBW9Wok" alt=""><figcaption></figcaption></figure>

#### Stream Data

**Default: On**

When this is on, the AI's response appears word by word as it is being written. When it is off, the workflow waits for the entire response to be finished before passing it along.

**Note:** Some Claude models require Stream Data turned on for long responses (e.g. writing extensive documents) that takes a few minutes or more to complete.

#### Safe Context Window

**Default: Off**

Safe context window automatically reduces the response to the model's maximum context size.&#x20;

This setting is turned off by default. When the setting is off, you will get an error message if your context gets too big.&#x20;

Note: Turning this on means you might unexpectedly lose meaningful context.

#### File Access

**Default: Off**

When you pass very large pieces of content to the LLM (e.g. the content of a large PDF file), loading it all directly in the prompt can be wasteful and slow.&#x20;

With File Access turned on, large inputs are saved as files in a secure sandbox, and the AI is given a tool to read from them on demand instead of having everything crammed into the prompt.

#### Data & Time

**Default: On**

When turned on, the LLM will be aware of the current date & time.

#### Guardrails

**Default: Off**

Guardrails screen the LLM response for harmful or inappropriate content. If a violation is detected, the workflow can surface a warning or block the content entirely.

You can choose which types of content to screen for:

* **Toxic Content:** Catches hateful, abusive, or offensive language.
* **Legal Advice:** Flags responses that provide unlicensed legal guidance.
* **Suicidal Thoughts:** Detects content involving self-harm or suicidal ideation.

#### PII Compliance

**Default: Off**

PII stands for Personally Identifiable Information. When this setting is on, the node scans for PII in the input before sending it to the LLM.

For each type of PII, you can choose how to handle it:

* **Warning:** The PII is detected and flagged in logs, but the original value is still sent to the model.
* **Encrypt:** The PII is replaced with a coded placeholder before being sent to the model. The original value is restored in the output, so the AI never sees the raw sensitive data.

The four categories you can configure are: **Email**, **Phone**, **SSN** (Social Security Number), and **Credit Card**.

#### Temperature

**Default: 0 (most focused)**\
**Range: 0 to 1**

Increase temperature in order to increase randomness in the output, making the model less deterministic.&#x20;

#### Max Output Length

Default - 3000.&#x20;

**Default: 10,000 tokens (\~7,500 words)**\
**Range: 0 to the model's maximum**

This sets the maximum length of the LLM response. A "token" is roughly ¾ of a word in English. Increasing this slider will allow the model to give more verbose answers.

#### Retry on Failure

**Default: Off**

Sometimes a LLM model fails temporarily due to high traffic, a brief provider outage, or a network hiccup. You can reduce workflow failure from these temporary issues with retry options:

* **Max Retries:** How many times to retry before giving up. You can set between 1 and 10 retries. Default when enabled is 2.
* **Retry Interval:** How long to wait between each retry attempt, in milliseconds. The default is 1,000 ms (1 second). You can set anything from 100 ms to 20 seconds.

#### LLM Fallback Mode

**Default: Off**

A fallback model is a backup LLM that automatically takes over if the primary model fails, even after all retries. You choose which provider and model acts as the backup.

When you turn this on, you can specificy:

* **Fallback Provider:** The AI company whose model will be used as the backup (e.g. Anthropic, OpenAI, Google).
* **Fallback Model:** The specific model from that provider to fall back to.

#### Fallback Branch

**Default: Off**

When turned ON, you can specify a different flow to follow in case this LLM node's execution fails, such as sending a notification message or go down a different path.


# Subflow Tools

While [Tools](/workflow-builder/core-nodes/ai-agent-node/tools#llms-with-tools) enable the Large Language Models (LLMs) to access data and perform actions, Subflow Tools enables orchestrations across a fleet of AI agents. &#x20;

### Adding Subflow Tools to the Workflow

You can add Subflow Tools in the AI Agent node by giving your tool a name and an optional description. Think of each subflow flow as a specialist agent that you would like the main agent to command.&#x20;

<figure><img src="/files/85bw5yGDsD7IDXokNztz" alt=""><figcaption><p>Example: Contact Enrichment</p></figcaption></figure>

Subflow Tools can work **independently**. In the contact enrichment example above, these tools check various systems without needing input from each other.

Subflow Tools can also work **collaboratively**. In the report writing example below, the AI Agent node (LLM) can first call the `research website` to cast a wide net. Then, the AI Agent node can call the `article deep dive` to only analyze a subset of articles based on selection criteria.

<figure><img src="/files/tJgX7LRu0SOBEWjuuXs5" alt=""><figcaption><p>Example: Report Writing</p></figcaption></figure>

### Setting up Subflow Tools

Each Subflow Tool can be as simple or complex as required by the business use case.

<figure><img src="/files/ZJXQlyiU4NbA8FplHHr3" alt=""><figcaption></figcaption></figure>

Each Subflow Tool needs to connect to an output node be complete (e.g. Deep Dive Output in the above example). The output node connected with the main orchestrator (e.g. Final Output in the above example) is what end users see.

Prompting for Subflow Tools is easy. In the **Instructions** of the AI Agent node, you can describe

* **The purpose of each Subflow Tool**
* **The logical sequence**: Some tools can be used in parallel (e.g. contact enrichment), while other tools are dependent on each other (e.g. report writing).&#x20;
* **The usage**: Some Subflow Tools are expected to be called multiple times. For example, you may indicate in the Instructions *"use `article deep dive` as many times as needed to analyze every article."*

{% hint style="info" %}
For best results, try to keep the name of the Subflow Tools consistent between the **Instructions** in LLM and the **Subflow Tool** configuration.
{% endhint %}

<figure><img src="/files/bxOelongkjGKKVVAW89d" alt=""><figcaption></figcaption></figure>

### A note on Subflow Tool Input

Input into Subflow Tools may be different from input into the orchestrating LLM (AI Agent node).&#x20;

<figure><img src="/files/Opkoy5iIX3J6kBcoKNkc" alt=""><figcaption><p>Input vs Subflow Tool Input</p></figcaption></figure>

In the report writing example, the **Text Input** may be *"research the list of websites"*, whereas the **Subflow Tool Input** to the `article deep dive` Subflow Tool will be the content of articles found on the websites.&#x20;

You can use these two variables to pass intermediary information to other parts of the workflow based on your needs.


# LLM Hosting & Governance


# How to Improve LLM Performance

This guide offers various strategies and techniques to improve the performance of your Language Model (LLM). You can experiment with these methods individually or in combination to achieve better results for your specific needs. Some strategies include:

### 1. Write Clear Instructions

Ensure that your instructions are concise and clear. If the outputs are too lengthy, request brief responses. If you need expert-level writing, specify that. Minimizing guesswork for the LLM increases the likelihood of receiving the desired output. Consider the following:

* Include specific details in your query for more relevant answers.
* Instruct the model to adopt a specific persona.
* Use delimiters to indicate distinct parts of the input.
* Specify the steps required to complete a task.
* Provide examples.
* Specify the desired length of the output.
* Refer to the Evaluation Description of available LLMs.

### 2. Provide Reference Text

To reduce the generation of fake answers, particularly on obscure topics, or to include citations and URLs, provide reference text that can assist the LLM. Here's what you can do:

* Instruct the model to answer using reference text.
* Instruct the model to answer with citations from reference text.
* Refer to Offline Data Loaders.

### 3. Break Down Complex Tasks into Simpler Subtasks

Complex tasks tend to have higher error rates. To enhance performance, break down complex tasks into simpler subtasks. You can:

* Use intent classification to identify the most relevant instructions for a user query.
* For dialogue applications with long conversations, summarize or filter previous dialogue.
* Summarize long documents piecewise and construct a full summary recursively.
* Refer to the Description of available LLMs.

### 4. Allow LLMs Time to "Think"

LLMs may make more reasoning errors when rushed. Asking for a chain of reasoning before a response can help them reason their way to correct answers. Consider:

* Instructing the model to work out its solution before rushing to a conclusion.
* Using an inner monologue or a sequence of queries to hide the model's reasoning process.
* Asking the model if it missed anything on previous passes.
* Refer to the Description of available LLMs.

### 5. Utilize External Tools

Compensate for LLM weaknesses by using outputs from other tools. Text retrieval systems or code execution engines can be helpful. If a task can be done more reliably or efficiently with a tool, consider using it for better results:

* Use embeddings-based search for efficient knowledge retrieval.
* Use code execution for more accurate calculations or call external APIs.
* Refer to Offline Data Loaders.

### 6. Test Changes Systematically

Measuring the impact of changes is essential for improvement. Define a comprehensive test suite (eval) to ensure that modifications yield a net positive performance:

* Evaluate model outputs with gold-standard answers.
* Refer to Evaluation.

Each of the strategies listed above can be implemented with specific tactics. These tactics provide ideas for experimentation and improvement. Feel free to explore creative ideas beyond what's listed here.


# LLMs Hosted on Azure & AWS Bedrock

Microsoft Azure and AWS Bedrock offer the ability to host private clouds with OpenAI models. You can add these models in Stack AI using an "Azure" node or "Bedrock" node. Hosting models in Azure/Bedrock has benefits:

#### Azure

1. **Lower and Consistent Latency:** Cloud hosted models are not affected by public API traffic. This is a great option if latency is a real concern.
2. **Higher Rate Limits:** Models in Azure offer higher rate limits of up to 240,000 tokens per minute and 1440 requests per minute.
3. **Data Privacy and Compliance:** data sent to Azure is kept under the private cloud and is not sent to OpenAI or any external service. These models are covered under Azure's Business Associate Agreement (BAA) and are HIPPA compliant.

#### AWS Bedrock

1. **AWS Security & Compliance:** Bedrock leverages AWS’s security, IAM, and compliance features. You can use AWS IAM roles, VPC endpoints, and audit logging for enterprise-grade security.
2. **Data Privacy & Residency:** Data processed through Bedrock stays within AWS infrastructure. You can choose the AWS region for data residency requirements.

### How It Works

#### Microsoft Azure

* **Azure OpenAI Service**: Azure provides access to OpenAI models (like GPT-3.5, GPT-4, etc.) through its Azure OpenAI Service.
* **How it works**: You provision an Azure OpenAI resource, get an endpoint and API key, and can then use these credentials to access models via Azure’s API.

#### AWS Bedrock

* **Amazon Bedrock**: AWS offers access to multiple foundation models (including Anthropic Claude, AI21, Cohere, and Amazon’s own Titan models) through the Amazon Bedrock service.
* **How it works**: You provision an AWS Bedrock resource, get an endpoint and API key, and can then use these credentials to access the models you have enabled via AWS's API.


# Local LLM

This guide will walk you through how to **set a default connection for your preferred LLM provider**. You'll also learn how to **disable the use of StackAI API keys across providers**, **deactivate specific LLM providers**, and manage other advanced configuration options.

Let’s start!

***

### 1. Creating a Default Connection

Navigate to **Settings** on the bottom left of your screen, underneath your avatar. Then, select **Feature Access** from the menu.

Under the **LLMs** section, search for **Local LLMs**—you can follow the same steps for any other provider as well. If needed, this is also where you can **disable specific LLM providers** to prevent your users from accessing them.

<figure><img src="/files/mlQSYTlMCpHClcuKLZJu" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/805Rul0pXEXKMqkuBvHX" alt=""><figcaption></figcaption></figure>

Once you're in the tab for a specific LLM provider, you'll see a toggle to **enable or disable** the provider, as well as a **"New Connection"** button under Default Connection to define it as your primary connection.

<figure><img src="/files/ktcqKbs91WfsaSWNxlCD" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/IoCTAghVmiVNZp3ll55A" alt=""><figcaption></figcaption></figure>

Once you click the button, you can create a connection that will serve as the **default for all LLMs from that provider** within your workspace. This is especially useful because your users **won’t need to manually enter an API key** to use those models.ally.

### 2. Using a Local LLM

<figure><img src="/files/wy6HQLSHcsmeUnYDprXB" alt=""><figcaption></figcaption></figure>

Once the connection is set up, you can **create a new project**, choose your **LLM provider**, select the **specific model** you want to use, and start **interacting with it immediately**.

<figure><img src="/files/PbzbejLj2iyOwHUIUlWE" alt=""><figcaption></figcaption></figure>

You won’t need to manually add the connection—your **default connection will appear automatically at the bottom**. If you prefer to use a different connection, you can **create it directly from that section** and select it for your project.

### 3. Connections Manager

All your connections are stored in the **Connections Manager** tab. You can also **create new connections** from there, and easily **select any of them** when adding an LLM node to your project.

<figure><img src="/files/hvAW6SIraWaXolHG9HZv" alt=""><figcaption></figcaption></figure>

You can choose to make your connections either **public** or **private**, and you’re free to change the **default connection** at any time. Simply go to the **Access Control** tab in your **Settings** to update this preference.

### 3. Disconnecting all StackAI’s API keys usage

If you'd like to prevent any unintended usage of LLMs without your API keys, you can **disable all StackAI API Keys**. This ensures that only LLMs configured to send data to your own servers are allowed. To do this, navigate to **Settings > Feature Access > Other > General LLM Configuration**.

<figure><img src="/files/dQH4fJpuI0FlMx8MW0IN" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/JG9arOn8zRe3aDeX8pd5" alt=""><figcaption></figcaption></figure>


# LLM Provider Governance

Control which LLMs your organization has access to, and where information is sent & stored.

### Local LLMs

Stack AI allows organizations to connect and use their own local LLMs (such as models hosted on private infrastructure or on-premise servers) instead of relying solely on cloud-based models like OpenAI or Bedrock.

**Governance Benefits:**

* **Data Privacy:** Your data never leaves your infrastructure, ensuring compliance with strict privacy or regulatory requirements.
* **Custom Control:** You can select, update, or fine-tune models as needed, and restrict which users or workflows can access them.
* **Auditability:** All usage of the local LLM can be logged and monitored within your organization’s security perimeter.

**How it works in Stack:**

* Admins can add a local LLM as a provider in the Stack AI admin console. See [our guide.](/workflow-builder/core-nodes/ai-agent-node/llm-hosting-and-governance/local-llm)
* Once added, the local LLM appears as an option in the workflow builder, just like any other provider.
* You can set permissions to control which users or teams can access the local LLM.

***

### Turning Off Stack API Keys

By default, Stack AI provides hosted API keys for popular providers (like OpenAI, Anthropic, etc.) so users can get started quickly. However, for governance and security, organizations may want to require the use of their own API keys or connections.

**Governance Benefits:**

* **Credential Control:** Prevents users from accidentally or intentionally using Stack’s shared keys, ensuring all API usage is billed to and controlled by your organization.
* **Security:** Reduces risk of data leakage or misuse of shared credentials.
* **Compliance:** Ensures all API access is auditable and tied to your organization’s own accounts.

**How it works in Stack:**

* Admins can disable Stack-provided API keys for any provider in the admin console.
* Once disabled, users must add their own connection (API key) to use that provider in workflows.
* This setting can be enforced globally or per-provider.

***

### Deactivating Certain Providers

Stack AI supports a wide range of providers (OpenAI, Bedrock, Google, Slack, etc.). For governance, you may want to restrict which providers are available to your users.

**Governance Benefits:**

* **Risk Mitigation:** Prevents use of unapproved or high-risk providers.
* **Simplified Compliance:** Ensures only vetted and compliant services are available.
* **User Experience:** Reduces clutter and confusion by hiding unused or irrelevant providers.

**How it works in Stack:**

* Admins can deactivate (hide or block) any provider from the admin console.
* Deactivated providers will not appear in the workflow builder or connection menus for end users.
* This can be managed at the organization or workspace level.

***

### Summary Table

| Feature                      | What It Does                                   | Governance Benefit                       |
| ---------------------------- | ---------------------------------------------- | ---------------------------------------- |
| Add Local LLM                | Use your own on-prem/private LLM               | Data privacy, control, auditability      |
| Turn Off Stack API Keys      | Require org-owned API keys for providers       | Credential control, security, compliance |
| Deactivate Certain Providers | Hide/block specific providers from user access | Risk mitigation, compliance, simplicity  |

<br>


# Knowledge Bases

A **knowledge base** is a centralized repository of information, documents, or data that can be searched and referenced for AI agents to get additional context, ground their answers, and solve problems.

StackAI provides indexing and storage in the vector database so that users can leverage a powerful and flexible RAG (Retrieval-Augmented Generation) system without heavy investments in infrastructure. See pages in this section on how to create and use knowledeg bases.


# Creating a Knowledge Base

### The Knowledge Base Dashboard

StackAI allows you to create a knowledge base from uploaded documents, tables, Dropbox, Google Drive, Sharepoint, etc.&#x20;

In the [**Knowledge Base Dashboard**,](https://www.stackai.com/dashboard/knowledge-bases) you can customize upload settings, upload files, import data from external connections, and manage access permissions.&#x20;

<figure><img src="/files/lEzM9LzJzl9IJUDbMs8l" alt=""><figcaption></figcaption></figure>

You can also create new knowledge bases on the fly from within the workflow builder. Right click to add a Knowledge Base node and import files there.

<figure><img src="/files/TPaQFkF6ReyNfQCjp1dP" alt=""><figcaption></figcaption></figure>

***

### Upload Settings

Before importing any files, you can customize how files are processed and indexed in your knowledge base using **Upload Settings**. This step is optional, as the default settings suffice for most use cases.

<figure><img src="/files/rFpSxoH8PxXrdmyTgj5B" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/H9tHMxPl38laKGnVjsaP" alt=""><figcaption></figcaption></figure>

1. **Chunking Algorithm**: Choose where and how files are broken down for indexing. Sentence-based chunking is more granular; files are broken down into sentence chunks.&#x20;
2. **Chunk Length**: Define the maximum size of each chunk in characters.&#x20;
3. **Chunk Overlap**: Specify how much content should overlap between chunks. Some overlap can improve retrieval, as it avoids fragmentation.
4. **OCR (Optical Character Recognition)**: This setting will slow down the indexing process for the knowledge base. Only enable this if you need to extract text from images or visual-heavy presentations.&#x20;
5. **Advanced Data Extraction**: Activate for enhanced processing of complex files.
6. **Embedding Model**: Select the AI model for embedding and indexing files.

#### Example Setting:

* Chunking Algorithm: Sentence-based
* Chunk Length: 2,500 characters
* Embedding Model: `text-embedding-3-large`

#### **A note on chunking algorithms**

StackAI implements both `sentence` and `naive` chunking algorithms:

**Naive Algorithms** are typically simpler and less sophisticated. They often rely on basic methods like searching for specific keywords or phrases.&#x20;

* **Lack of Context Understanding:** they usually don't understand the context or the structure of the language. For example, a naive algorithm might count the frequency of words without understanding their meaning or part of speech.&#x20;
* **Speed and Efficiency:** due to their simplicity, these algorithms can be faster and more efficient, especially for straightforward tasks.&#x20;
* **Limitations:** naive algorithms are generally less accurate in complex language processing tasks. They might miss nuances, sarcasm, or idiomatic expressions.

**Sentence Chunking Algorithms** are more sophisticated. They involve breaking down text into syntactically correlated parts of words like noun phrases, verb phrases, etc.&#x20;

* **Context and Structure Understanding:** sentence chunking algorithms understand the structure of a sentence. They analyze parts of speech and how words relate to each other in a sentence.
* **Accuracy:** they are more accurate in understanding the meaning and context of sentences. This makes them suitable for complex tasks like sentiment analysis, information extraction, and language translation.&#x20;
* **Resource Intensity:** these algorithms are usually more resource-intensive due to their complexity. They might require more computational power and time to process text.

To learn more about best practices with regard to chunking, see our guide to chunking [here](/getting-started/core-ai-concepts/chunking).

***

### Upload Files

The most straightforward way to create a knowledge base is by uploading files from your computer.

<figure><img src="/files/eZZnXwegzVFh0LGZGXUr" alt=""><figcaption></figcaption></figure>

#### Supported File Types:

* **Word Documents**: `.doc`, `.docx`, `.json`
* **PDF Files**: `.pdf`
* **PowerPoint Presentations**: `.ppt`, `.pptx`
* **Excel Spreadsheets**: `.xls`, `.xlsx`

***

### Import from Connection

You can import files from external connections such as **Dropbox**, **Google Drive**, **Notion**, and **SharePoint** from the knowledge base dashboard. Be aware that the more files you import, the longer it will take to process them.

<figure><img src="/files/ubrIVfH1hpyUH2zefVGb" alt=""><figcaption><p>Import from Connection</p></figcaption></figure>

**Auto Sync Files**

If you are importing from a connection, you may want your files to automatically sync with your connection so that if a file is updated at the source, it is also updated in your StackAI Knowledge Base. When Auto Sync is turned on, the knowledge base will sync with the source once a week.

<figure><img src="/files/bbtsW5eM3EYeYcnoMy2Q" alt=""><figcaption><p>Auto Sync</p></figcaption></figure>

You can also re-sync the files on-demand by clicking "Sync Files." This is useful if you have added a new file and you would like it to be reflected you StackAI KB immediately.

<figure><img src="/files/qKr48E1yNIotAbyQqgeA" alt=""><figcaption><p>Sync Files</p></figcaption></figure>

***

### Role-Based Access Control (RBAC)

Control who can view, edit, or manage your knowledge bases with [RBAC](/welcome-to-stackai/security-and-governance/security-in-stackai/connection-and-knowledge-base-permissions). You can assign roles and permissions to individuals or groups:

1. **Admin**: Full control over the knowledge base, including editing and sharing.
2. **Viewer**: Read-only access.
3. **Groups**: Share with predefined groups for streamlined collaboration.

Learn more about Workspace and Folder Access [here](/welcome-to-stackai/security-and-governance/security-in-stackai/workspace-and-folder-access).


# How to Use Knowledge Bases

This page walks through the two ways an AI agent can use knowledge bases.

### Standalone Knowledge Base

The standalone Knowledge Base Node is best used when the agent is always expected to consult the knowledge base (e.g. source of truth documents, compliance policies, etc).

<figure><img src="/files/gdp45weqrS902Jj3GIZS" alt=""><figcaption></figcaption></figure>

The standalone Knowledge Base Node requires an input, such as the user's question. This input serves as the query that the Knowledge Base uses to fetch relevant context. If there are multiple inputs connected, you can specify which one to use in the Knowledge Base settings.

{% hint style="warning" %}
**If no input is connected or specified in the Knowledge Base Node, it will not return a result.**
{% endhint %}

<figure><img src="/files/LVwA7MX4O34Fbdd22YIH" alt=""><figcaption><p>Configure Input Query in the settings</p></figcaption></figure>

### Search Knowledge Base Tool

Large Language Models (LLMs) can use the Search Knowledge Base Tool to intelligently query your documents during a live conversation. Rather than a static lookup, the LLM dynamically generates search queries to retrieve relevant information based on the context of the discussion.

When you select a knowledge base inside the LLM, the "Search Knowledge Base Tool" will be automatically added. You can reference this tool and prompt the LLM on when and how to search the knowledge base.&#x20;

<figure><img src="/files/7ZYjBLPoVbfXYimWqud4" alt=""><figcaption><p>Add the knowledge base as a tool to the LLM</p></figcaption></figure>

### Search Parameters

Both Knowledge Base Node and Search Knowledge Base Tool have a set of search parameters to refine the search results.

![Search Parameters in the standalone node](/files/JRiIP5h0N69ROu6L9D2Z)

<figure><img src="/files/ggudZtt9366sm14pIQpw" alt=""><figcaption><p>Search Parameters in the tool</p></figcaption></figure>

* **Output Format:** Choose between chunks, pages, and docs. This is not the output the end user will see but the unit of information to be retrieved. For example, if "docs" is selected, the entire document will be retrieved. By default, "chunks" is selected and should suit most use cases.
* **Metadata Filter Strategy:** Choose between Strict Filter, Loose Filter, and No Filter. See below section for more details.
* **Query Strategy:** Choose between Semantic, Keyword, and Hybrid. See below section for more details.
* **Top Results:** Number of search results ranked by relevance.
* **Max Characters:** Limits the number of characters sent to the LLM.
* **Answer Multiple Questions:** Get the answers from multiple questions in parallel.
* **Advanced Q\&A:** Handle questions to compare or summarize documents. By enabling this feature, the knowledge base search will automatically use "retrieval utilities" to select the best mechanism to answer the user questions depending on whether the question aims to: retrieve a fact, compare a set of documents, or summarize a document inside the knowledge base.
* **Rerank:** Get more precise information retrieval. The knowledge base will divide its number of results in half with the most relevant results, using a sophisticated ranking algorithm. This will reduce token usage.
* **Query Transformation:** Get more precise information retrieval. Forces the knowledge base to rewrite the user message as a better question. This increases the quality of the search results for the language model.

### Metadata Filter Strategy

**Metadata filtering** helps narrow down the documents retrieved from a vector store. The filters operate on metadata associated with each document, such as date, source, topic, etc. StackAI imports tags and metadata fields from your connections, and you can add custom metadata as well.

<div align="left"><img src="/files/Ng8M4vOUKxWVtv6XT5Jp" alt="Example of file metadata" width="563"></div>

If you want to surface as much information as possible, it is best to use **no filter**. In this case, no metadata constraints are applied. This strategy is best to use when you don't have a very large knowledge base.

With **loose filtering**, metadata is used as a soft constraint. The system prefers documents matching the filter, but still considers other documents. This gives you the best of both worlds and is best used when metadata is helpful but not critical.

**Strict filtering** should be used for situations where you have many similar documents in your KB that you need to distinguish between. With a strict filter, metadata constraints are hard requirements. Only documents matching the specified metadata are eligible for retrieval.

### Query Strategy

In Retrieval-Augmented Generation (RAG), **keyword-based search** relies on traditional information retrieval techniques that match exact or fuzzy terms within documents. This approach works best when the query and content use consistent vocabulary, such as in legal, technical, or structured domains where terminology is predictable. It's especially useful when you know the precise terms you're looking for.

**Semantic querying**, on the other hand, uses vector embeddings to represent the meaning of both queries and documents. It enables retrieval based on conceptual similarity, rather than exact keyword matches. This makes it well-suited for natural language questions, varied phrasing, and content where language is less standardized—such as customer support, internal knowledge bases, or conversational search. By focusing on meaning, semantic search improves recall, but may miss documents with exact keyword relevance.

**Hybrid querying** combines both strategies—typically by blending keyword and semantic relevance scores or performing multi-stage retrieval. This approach provides the benefits of both precision and flexibility, making it ideal for general-purpose RAG systems that must handle a variety of user intents and content types. While slightly more complex to implement, hybrid search often yields the most balanced and robust retrieval performance in production applications.

### Citation

Citation is controlled by the Large Language Model node, regardless of using the knowledge base node or tool.

<div align="left"><figure><img src="/files/1Ne2oz2UrllNXsvK5rf2" alt="" width="563"><figcaption></figcaption></figure></div>

When enabled, citations are displayed as superscripts in the interface. Users can click on the references to review the specific information within the source files.

<figure><img src="/files/8Mzj9u9oatWBj2XnEhzG" alt=""><figcaption></figcaption></figure>


# Knowledge Base Nodes and Tools

### Knowledge Base Tool

A Search Knowledge Base tool enables an LLM to intelligently query your documents during a live conversation. Rather than a static lookup, the LLM dynamically generates search queries to retrieve relevant information based on the context of the discussion.

#### Key Capabilities

* Intelligent Query Generation: The LLM automatically formulates one or more search strings to find the best possible matches within your data.
* Customizable Execution: You can define exactly when and how the tool is triggered. For example, you can instruct the model to perform three distinct queries for every user question to ensure comprehensive data retrieval.
* Instruction-Driven Behavior: The tool’s logic—including when to search, what to look for, and how to use the results—is controlled entirely through the model's System Instructions.

<figure><img src="/files/mbVfjLpdrpOKWoXzmw7J" alt=""><figcaption></figcaption></figure>

### Node Settings & Search Parameters

Click on the node to change its settings.

<figure><img src="/files/dFcgfYgYkH2kiMR52SBr" alt=""><figcaption></figcaption></figure>

At the top of the window, you will find a drop-down menu to select a Knowledge Base or choose documents to form a new Knowledge Base. You can select or de-select individual documents that you'd like to include.

### Settings + Search Parameters

Below that you will see the configurations for **Settings** and **Search Parameters**

* **Output Format:** Choose between chunks, pages, and docs.
* **Metadata Filter Strategy:** Choose between Strict Filter, Loose Filter, and No Filter.
* **Query Strategy:** Choose between Semantic, Keyword, and Hybrid.
* **Top Results:** Number of search results ranked by relevance.
* **Max Characters:** Limits the number of characters sent to the LLM.
* **Answer Multiple Questions:** Get the answers from multiple questions in parallel.
* **Advanced Q\&A:** Handle questions to compare or summarize documents. By enabling this feature, the knowledge base search will automatically use "retrieval utilities" to select the best mechanism to answer the user questions depending on whether the question aims to: retrieve a fact, compare a set of documents, or summarize a document inside the knowledge base.
* **Rerank:** Get more precise information retrieval. The knowledge base will divide its number of results in half with the most relevant results, using a sophisticated ranking algorithm. This will reduce token usage.
* **Query Transformation:** Get more precise information retrieval. Forces the knowledge base to rewrite the user message as a better question. This increases the quality of the search results for the language model.

### Advanced Upload Parameters

Some nodes, like the Websites Node and Google Drive Node, will also allow you to specify **Advanced Upload Parameters**, settings for how you'd like your documents to be ingested. You can also control these parameters from the KB Dashboard.

* **Model for Embeddings:** as default, the `text-embedding-3-large model` from OpenAI is selected. However, you will have the option to select the following ones: `azure-text-embedding-ada-002`, `bert-base-cased`, `all-mpnset-base`, `palm2` and more.
* **Chunking algorithm:** by default, the system uses `sentence`. You can also choose `naive`.
* **Chunk overlap:** by default, the system uses `500`. You can also choose as many as you want up to `4500` by clicking the number and editing it.
* **Chunk length:** by default, the system uses `2500`. You can also choose as many as you want up to `4500` by clicking the number and editing it.
* **Advanced Data Extraction:** For complex data like tables, images, charts. Enable it if you want to extract text from images that are present in your documents. By default, this option is deselected since it will increase the latency of your workflow (i.e., it will run slower).
* **Text in images (OCR):** by default, this option is deselected. Enable it if you want to extract text from imgs that are present in your documents.
* **Embeddings API key:** by default, the text field is empty. Stack AI's API key are used. If you would like to use yours, then include your API key in this text field.

### Chunking Algorithms

StackAI implements both `sentence` and `naive` chunking algorithms:

**Naive Algorithms** are typically simpler and less sophisticated. They often rely on basic methods like searching for specific keywords or phrases.&#x20;

* **Lack of Context Understanding:** they usually don't understand the context or the structure of the language. For example, a naive algorithm might count the frequency of words without understanding their meaning or part of speech.&#x20;
* **Speed and Efficiency:** due to their simplicity, these algorithms can be faster and more efficient, especially for straightforward tasks.&#x20;
* **Limitations:** naive algorithms are generally less accurate in complex language processing tasks. They might miss nuances, sarcasm, or idiomatic expressions.

**Sentence Chunking Algorithms** are more sophisticated. They involve breaking down text into syntactically correlated parts of words like noun phrases, verb phrases, etc.&#x20;

* **Context and Structure Understanding:** sentence chunking algorithms understand the structure of a sentence. They analyze parts of speech and how words relate to each other in a sentence.
* **Accuracy:** they are more accurate in understanding the meaning and context of sentences. This makes them suitable for complex tasks like sentiment analysis, information extraction, and language translation.&#x20;
* **Resource Intensity:** these algorithms are usually more resource-intensive due to their complexity. They might require more computational power and time to process text.

To learn more about best practices with regard to chunking, see our guide to chunking [here](/getting-started/core-ai-concepts/chunking).

### File Status

You will see a label for each document that you upload with the following icons:

* **Pending:** the document is being processed and indexed.
* **✅:** the document was successfully indexed.
* **Error:** the document could not be indexed (e.g., due to a formatting issue).

### Metadata Filter Strategy

**Metadata filtering** helps narrow down the documents retrieved from a vector store. The filters operate on metadata associated with each document — like date, source, topic, etc.

If you want to surface as much information as possible, it is best to use **no filter**. In this case, no metadata constraints are applied. The system retrieves the top-k most relevant documents based on your search algorithm. This strategy is best to use when you don't have a very large knowledge base as it increases the likelihood that irrelevant documents will be retrieved.

With **loose filtering**, metadata is used as a soft constraint — the system prefers documents matching the filter, but still considers other documents. This gives you the best of both worlds and is best used when metadata is helpful but not critical.

**Strict filtering** should be used for situations where you have many similar documents in your KB that you need to distinguish between. With a strict filter, metadata constraints are hard requirements — only documents matching the specified metadata are eligible for retrieval. When results must meet certain conditions — e.g. regulatory compliance, user access control, project-specific scopes — strict filtering is the way to go.

### Query Strategy

In Retrieval-Augmented Generation (RAG), **keyword-based search** relies on traditional information retrieval techniques that match exact or fuzzy terms within documents. This approach works best when the query and content use consistent vocabulary, such as in legal, technical, or structured domains where terminology is predictable. It's especially useful when you know the precise terms you're looking for.

**Semantic querying**, on the other hand, uses vector embeddings to represent the meaning of both queries and documents. It enables retrieval based on conceptual similarity, rather than exact keyword matches. This makes it well-suited for natural language questions, varied phrasing, and content where language is less standardized—such as customer support, internal knowledge bases, or conversational search. By focusing on meaning, semantic search improves recall, but may miss documents with exact keyword relevance.

**Hybrid querying** combines both strategies—typically by blending keyword and semantic relevance scores or performing multi-stage retrieval. This approach provides the benefits of both precision and flexibility, making it ideal for general-purpose RAG systems that must handle a variety of user intents and content types. While slightly more complex to implement, hybrid search often yields the most balanced and robust retrieval performance in production applications.

### Typical Workflow Structure

A common pattern is:

1. **User Input** (Input Node): The user provides a question or prompt.
2. **Knowledge Base Node**: Receives the user’s query (directly or via an LLM node) and retrieves relevant information from the knowledge base.
3. **LLM Node**: Uses both the user’s input and the retrieved knowledge base content to generate a final, context-rich answer.

***

### How the Interface Works

**A. Data Flow**

* The Knowledge Base node typically takes the user’s input as its query, searches the knowledge base, and outputs relevant text chunks.
* The LLM node can reference the output of the Knowledge Base node in its prompt using the node’s ID.

**B. Connections (Edges)**

* The Input node is connected to the Knowledge Base node (for the query).
* The Knowledge Base node is connected to the LLM node (providing retrieved content).
* The LLM node is connected to the Output node (displaying the answer).

**C. Execution Order**

1. The user submits a question.
2. The Knowledge Base node receives the question and retrieves relevant information.
3. The LLM node receives both the user’s question and the retrieved information, then generates a response.
4. The Output node displays the LLM’s answer.

***

### Why Use This Pattern?

* **Retrieval-Augmented Generation (RAG)**: This approach allows the LLM to ground its answers in specific, up-to-date, or proprietary knowledge, improving accuracy and relevance.
* **Separation of Concerns**: The Knowledge Base node handles retrieval, while the LLM node handles synthesis and reasoning.

***

### Key Points

* The LLM node does not “search” the knowledge base directly; it relies on the Knowledge Base node to do the retrieval.
* The LLM node’s prompt must reference the Knowledge Base node’s output to use the retrieved information.
* All node references must match actual node IDs in the workflow.

***

### Available Knowledge Bases

* Document Upload
* Websites
* Azure Blob Storage
* Coda
* Confluence
* Dropbox
* Google Drive
* Gmail
* Jira
* Notion
* OneDrive
* OneNote
* Outlook
* AWS S3
* ServiceNow
* Sharepoint
* Strapi
* Veeva


# Specific Knowledge Base Features

### Document Upload

When you create a Knowledge Base node, you will see a button for uploading data to the Vector Store API. You can find the API documentation [here](broken://pages/579aeebf21a4cd5251c81f75c6bc6a5a80c495ba). &#x20;

### Google Drive

Authenticate through Google to give your project access to your Google Drive. Your end users will be able to ask an LLM questions based on the files you've uploaded.

### Sharepoint

The Sharepoint Node allows you to index two types of media: documents stored in Sharepoint and Sharepoint News, where everything on the page is indexed.&#x20;

<figure><img src="/files/X9thOhaRBlbRhwnBdPj1" alt=""><figcaption></figcaption></figure>

To authenticate to your Sharepoint organization account, you must follow these steps:

* **Go to App Registrations in Azure**: visit your Azure Portal and go to "App Registrations" [here](https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade).
* **Create App**: Click on "New Registration". Add a name to your app and select "Accounts in this organizational directory only (Default Directory only - Single tenant)".
* **Get Client ID and Tenant ID**: get your client and tenant id from the "Essentials" section. You will find them under "Application (client) ID" and "Directory (tenant) ID ".
* **Create a client secret**: Navigate to "Certificates & Secrets" then click on "New client secret". Give an expiration date to your secret. Finally, you will find the client secret in the "Value" field of the secret.
* **Add Scopes**: Naviate to "App Permissions" and then click on "Add a permission". Click on "Microsoft Graph" and select "Application Permissions". Then select the following scopes: Sites.ReadAll, Files.ReadAll, BrowserSiteLists.Read.All. Then click on "Add Permissions". Finally click on "Grant Admin Consent for Default Directory".

Now you can proceed to add your node in Stack AI add add the value of your client\_id, client\_secret, tenant\_id, site\_id, and folder path.

### Table

Use a Table Node to create a Knowledge Base from a .csv file. StackAI creates a SQL database with your .csv file and performs semantic search, all under the hood. A generative model decides which search result--SQL or semantic search--is more informative, giving you powerful search over tables.

### Websites

The Website Node allows you to create a Knowledge Base from a website URL.  The URLs that you upload are then indexed and stored in a vector data base - don't worry, we do this for you in the background! This process is done once, so that you can later query this knowledge base and only retrieve the pieces of information that are more related to your query. It's the most efficient way to manage a long list of URLs, without having to index them everytime you run the workflow (i.e., embeddings are generated only once, when you upload the URLs).

### Jira

The Jira Node allows you to create a knowledge base from Jira projects. To use this node, first establish a connection to Jira, see how to do so [here](/workflow-builder/apps/jira). You will be able to select which projects to include in your knowledge base and perform RAG over those projects.


# 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.&#x20;
  * The tool runs commands in an E2B Desktop sandbox with a browser.&#x20;
  * **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:&#x20;
    * browsernav navigate (navigate to a URL),&#x20;
    * browsernav view (list interactive elements with indices),&#x20;
    * browsernav execute "javascript" (run JavaScript),&#x20;
    * browsernav click-element (click by index),&#x20;
    * browsernav input-text "text" (input text),&#x20;
    * browsernav scroll-down/up (scroll),&#x20;
    * 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.&#x20;
  * **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.&#x20;
  * **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.&#x20;
  * **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.&#x20;
  * **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.


# Human in the Loop

## 1. Overview

The **Ask Human in Chat Interface** tool enables **Human-in-the-Loop (HITL)** workflows in StackAI.

<figure><img src="/files/mn8o1qYDZOv9OCjy6h7m" alt=""><figcaption></figcaption></figure>

It allows an AI workflow to pause execution, request input from a human in the Chat Assistant interface, and then resume execution once the user responds.

This allows you to build **hybrid AI workflows** where automation handles most of the work but defers to human judgment at critical decision points.

Common use cases include:

* Confirming actions before executing high-impact, long tasks
* Clarifying ambiguous user requests
* Selecting between multiple possible options
* Collecting information that the AI cannot infer

Example:

> “Running this analysis across the full dataset may take several minutes. Would you like me to proceed, or should I limit the analysis to the most recent records?”

## 2. How It Works

**Ask Human in Chat Interface Workflow**:

1. **Tool Invocation**: LLM calls the tool for human input.
2. **Pause Execution**: workflow pauses as the need for user input is identified.
3. **User Interaction**: The question appears in the Chat UI.
4. **User Response**: The user submits an answer through the chat.
5. **Resume Execution**: Workflow resumes with user's input.

Optimize performance by equipping an LLM node with the Ask Human tool in a chat interface instead of using it as a separate action. Refer to this [guide](https://docs.stackai.com/workflow-builder/llms/llm-node/tools#prompt-optimization-with-tools\)?) for instructions on adding tools to LLMs.

<figure><img src="/files/xtE8iUhdfPmGP6sDmcJR" alt=""><figcaption></figcaption></figure>

⚠️ **Important:**\
This tool **only works inside the Chat Assistant interface**. It does **not function when workflows are triggered via API or used in Form mode**, since it relies on the interactive chat UI to collect responses.

<figure><img src="https://framerusercontent.com/images/7xdgFdLhUpGwZEJuKp1NUAs.gif?scale-down-to=2048&#x26;width=3404&#x26;height=1740" alt="" width="900"><figcaption></figcaption></figure>

## 3. Configuration

### Input Parameters

These parameters can either be:

* **Provided directly by the user**, or
* **Dynamically set by the LLM when invoking the tool from the LLM node**, just like with any other tool in a StackAI workflow.

Allowing the LLM to control these fields enables **more flexible and adaptive workflows**, while specifying them explicitly can enforce **more deterministic behavior** when required.

{% columns %}
{% column %}

<figure><img src="/files/Uqq2pxGx0zHlnOxc5O88" alt="" width="520"><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="/files/SLQIqrKh1BWNvZefclG0" alt="" width="520"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

<table><thead><tr><th width="140.62109375">Parameter</th><th width="88.09375">Type</th><th width="83.98046875">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>question</code></td><td>string</td><td>Yes</td><td>The question presented to the human user. It should be clear and actionable.</td></tr><tr><td><code>context</code></td><td>any</td><td>No</td><td>Optional context to help the user understand the situation or decision.</td></tr><tr><td><code>response_type</code></td><td>string</td><td>No</td><td>Determines the UI input type. Options: <code>"text"</code>, <code>"approval"</code>, <code>"choice"</code>. Default is <code>"text"</code>.</td></tr><tr><td><code>choices</code></td><td>array</td><td>No</td><td>List of selectable options. Only used when <code>response_type</code> is <code>"choice"</code>.</td></tr></tbody></table>

### 3.1. Response Types

Set `response_type` to control what the user sees in chat.

#### Approval (`"approval"`)

Use this for a simple **yes/no** confirmation step.

<figure><img src="/files/R2XrFNEUYjiEqTYLtqxw" alt=""><figcaption></figcaption></figure>

#### Choice (`"choice"`)

Use this when the user should pick from a predefined list.

Set `choices` when using `"choice"`.

<figure><img src="/files/eBKqslm59OunSqxqrrsd" alt=""><figcaption></figcaption></figure>

#### Text (`"text"`, default)

Use this when you need free-form input from the user.

<figure><img src="/files/YpHvkFSSnu7PM9VXMPDK" alt=""><figcaption></figcaption></figure>

## 4. Common Use Cases

<table><thead><tr><th width="147.93359375">Use Case</th><th>Description</th><th>Example Question from Human in the Chat</th></tr></thead><tbody><tr><td><strong>Approval Gates</strong></td><td>Pause before performing sensitive or high-impact actions and ask the user for confirmation.</td><td>“I'm about to update 47 customer records with the new pricing. Proceed?”</td></tr><tr><td><strong>Clarification Requests</strong></td><td>Resolve ambiguity when multiple interpretations are possible.</td><td>“I found three contacts named John Smith. Which one do you mean?”</td></tr><tr><td><strong>Data Collection</strong></td><td>Gather information that the AI cannot determine automatically.</td><td>“What budget range should I use for this proposal?”</td></tr><tr><td><strong>Human Review</strong></td><td>Allow a human to review AI-generated content before executing an action.</td><td>“Here's the draft email I've prepared. Should I send it as is?”</td></tr><tr><td><strong>Routing Decisions</strong></td><td>Let a human select the next step in a workflow when multiple valid paths exist.</td><td>“This support ticket could be handled as a refund, replacement, or escalation. Which approach should we take?”</td></tr></tbody></table>

## 5. Best Practices

**Guide the LLM on When to Request Human Input**

Your LLM instructions should clearly define when human input is required. Guide the agent on how frequently it should intervene based on how critical confirmation or human judgment is for the workflow and the expected user behavior.

Use HITL sparingly for routine tasks, but require it for **high-impact, irreversible, or ambiguous actions**.

Example instruction:

> “Before sending emails or updating databases affecting more than 10 records, ask the user for approval using the **Ask Human in Chat Interface** tool.”

**Prefer Approvals or Choices Over Free-Text Input**

Whenever possible, use `approval` or `choice` response types instead of `text`. Even when the parameters are controlled by the LLM, guide the agent to prefer these options.

Structured responses are faster for users and reduce friction in the workflow. In many cases, users prefer **quick decisions (clicking a button or selecting an option)** rather than typing responses.

Using predefined options also helps:

* reduce ambiguity
* avoid input errors
* keep workflows moving quickly

Reserve **`text`** responses for situations where the user truly needs to provide **new or open-ended information**.

**Choose OpenAI**

OpenAI's GPT models consistently provide superior performance and results in various applications. We recommend selecting them when using Ask Human in the Chat Interface.


# Apps

StackAI connects to 70+ apps and services — from databases and cloud storage to CRMs, communication tools, and AI providers.

Each app page explains how to set up the connection, what actions are available, and how to use the node in your workflow.

### Popular integrations

<table data-view="cards"><thead><tr><th>Topic</th><th data-card-target data-type="content-ref">Page</th></tr></thead><tbody><tr><td><strong>Salesforce</strong><br>Read and write Salesforce objects, records, and workflows.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/sfMHV1U1SO6vKkQunZJ8">/spaces/FSlso1Kjob5CLDrh0dVn/pages/sfMHV1U1SO6vKkQunZJ8</a></td></tr><tr><td><strong>SharePoint</strong><br>Access files and documents stored in SharePoint.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/LNimerusmSHg3wYyByUR">/spaces/FSlso1Kjob5CLDrh0dVn/pages/LNimerusmSHg3wYyByUR</a></td></tr><tr><td><strong>Google Sheets</strong><br>Read, write, and update spreadsheet data.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/F3Z2z9r0FlTKEgzzJHOd">/spaces/FSlso1Kjob5CLDrh0dVn/pages/F3Z2z9r0FlTKEgzzJHOd</a></td></tr><tr><td><strong>Slack</strong><br>Send messages, read channels, and trigger workflows from Slack.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/zH6xTDtYyzuIic6XMupr">/spaces/FSlso1Kjob5CLDrh0dVn/pages/zH6xTDtYyzuIic6XMupr</a></td></tr><tr><td><strong>HubSpot</strong><br>Sync contacts, deals, and activities with HubSpot CRM.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/QdyQQhgxfHhioo2tGwAJ">/spaces/FSlso1Kjob5CLDrh0dVn/pages/QdyQQhgxfHhioo2tGwAJ</a></td></tr><tr><td><strong>ServiceNow</strong><br>Create and update tickets and records in ServiceNow.</td><td><a href="/spaces/FSlso1Kjob5CLDrh0dVn/pages/8DGc8ejTqopT3ONkH7uM">/spaces/FSlso1Kjob5CLDrh0dVn/pages/8DGc8ejTqopT3ONkH7uM</a></td></tr></tbody></table>

### Find your integration

* Use the sidebar to browse the full alphabetical list of integrations.
* Each page includes setup instructions, available actions, and example use cases.
* Don't see your app? Use the [**Custom API**](/workflow-builder/utils-logic-and-others/utils/custom-api) node to connect any REST API.


# Airtable

Query and manage your Airtable bases directly from StackAI workflows.

The Airtable node in StackAI enables seamless integration with your Airtable workspaces. You can perform database queries, retrieve records, and automate data management tasks as part of your workflow automation.

{% @arcade/embed flowId="xj8qcFbHavayMw1WouSH" url="<https://app.arcade.software/share/xj8qcFbHavayMw1WouSH>" %}

### Usage overview

1. Choose the action that you'd like to perform in Airtable (query or write).
2. Establish a connection to Airtable by either signing in via the **New Connection** button or selecting an existing connection from the dropdown. The Airtable node requires a valid API key or OAuth connection to access your bases. Validate the connection is 'Healthy' with **Test**.&#x20;
3. Fill out the parameters for the action that you'd like to take in Airtable by setting up the **Inputs** and **Configurations** (more details in dedicated sections below).
4. The node can be connected to input nodes (for dynamic queries), LLM nodes (for natural language queries), or other action nodes for advanced automation.

### Available Actions and Triggers

#### 1. **Query Airtable**

**Description:**\
Query an Airtable base using a structured query or natural language.

**Inputs:**

* **Query** (string, required):&#x20;
  * The query is a plain English question or instruction that describes what data you want from the Airtable table. For example, you might write:
    * "Employees in the Marketing department"
    * "Employees hired after January 2024"
    * "Employees with the title 'Manager'"

**Configurations:**

* **Base\_id** (string, required): The unique identifier of your Airtable base.
  * Example: `app1234567890`
  * &#x20;You can locate this in the URL on your Airtable browser:  `https://airtable.com/app1234567890/tbl...`
* **Table** (string, required): The name of the table to query.&#x20;

  * Open your Airtable base.
  * Look at the **tabs along the top** (or left, depending on your layout). Each tab represents a table.
  * Th**e table name** is the label shown on each tab, e.g. `Employees`&#x20;

  <figure><img src="/files/O89CWw6ZhoDZBQYJZwuM" alt=""><figcaption></figcaption></figure>
* **View** (string, optional): Name of the view to use for filtering/sorting.

  * Open your Airtable base.
  * Navigate to the specific table you're working with.
  * At the top left of the table, next to the table name, you’ll see a dropdown with the current view name (e.g., `Grid view` , `Kanban` , `Calendar` ).
  * Click the dropdown to see all available views. The view you’re currently in is highlighted.

  <figure><img src="/files/S1esCjcwFxAZUNANlL4y" alt=""><figcaption></figcaption></figure>
* **AirtableSearchModeEnum** (select, optional):&#x20;
  * Determines how your query is interpreted and executed.
  * **Formula mode ("formula")**: Translates your natural language query into Airtable formula syntax—ideal for precise, rule-based filtering (e.g., your query may be “Find all employees in the Sales department”).
  * **Semantic mode ("semantic")**: Uses semantic search to find records by meaning, not exact wording—useful for broader, context-driven queries (e.g., your query may be “Show me people who work with customers”.)
* **Max Records** (integer, optional): Maximum number of records to return.
  * Example: `100`

**Configurations:**

* **connection\_id** (string, required): The connection ID for your Airtable account.
  * Example: `"your-connection-id"`

**Outputs:**

* **records** (array, required): List of records matching the query.
  * Each record includes field values and record ID.
  * Example:

    ```json
    [
      {
        "id": "rec1234567890",
        "fields": {
          "Name": "Task 1",
          "Status": "Open",
          "Due Date": "2025-07-10"
        }
      }
    ]

    ```

***

#### 2. **Write to Airtable**

**Description:**

Insert or update records in an Airtable base.

**Inputs:**

* **Data** (string, required): Your intent in plain English, describing what record you want to create and what values to set for each field.
  * Examples:
    * Add an employee named Alice Johnson, email <alice@company.com>, department Engineering, and start date July 15, 2025.
    * Create a new product with name 'Widget X', price $99.99, and category 'Electronics'.
  * Tips
    * Be as specific as possible about the fields and values you want to set.
    * Use the field names as they appear in your Airtable table for best results.
    * You can add multiple fields in one sentence.

**Configurations:**

* **Base Id** (string, required): The unique identifier of your Airtable base.
  * Example: `app1234567890`
  * &#x20;You can locate this in the URL on your Airtable browser:  `https://airtable.com/app1234567890/tbl...`
* **Table** (string, required): The name of the table to query.&#x20;

  * Open your Airtable base.
  * Look at the **tabs along the top** (or left, depending on your layout). Each tab represents a table.
  * Th**e table name** is the label shown on each tab, e.g. `Employees`&#x20;

  <figure><img src="/files/O89CWw6ZhoDZBQYJZwuM" alt=""><figcaption></figcaption></figure>
* **View** (string, optional): Expects either the **name** or the **ID** of a view in your Airtable table.

  * Open your Airtable base.
  * Navigate to the specific table you're working with.
  * At the top left of the table, next to the table name, you’ll see a dropdown with the current view name (e.g., `Grid view` , `Kanban` , `Calendar` ).
  * Click the dropdown to see all available views. The view you’re currently in is highlighted.

  <figure><img src="/files/S1esCjcwFxAZUNANlL4y" alt=""><figcaption></figcaption></figure>

  * If you leave it blank, the default view (usually "Grid view") will be used.
  * Specifying a view can be useful if you want to restrict the write operation to records visible in that view&#x20;

**Outputs:**

* **records** (array, required): List of records that were created or updated.
  * Each record includes field values and record ID.
  * Example:

    ```json
    [
      {
        "id": "rec0987654321",
        "fields": {
          "Name": "New Task",
          "Status": "In Progress"
        }
      }
    ]

    ```

***

**3. Update Airtable Record**

**Description:**

Updates the values of an existing record on Airtable.

**Inputs:**

* **Record Id** (string, required): The unique identification number of the record you would like to modify.&#x20;
  * Retrieve Record ID from Airtable
    1. Using the Query Airtable Node
       * You can retrieve a record by using the *Query Airtable* node.
       * This method automatically returns the record ID as a parameter.
    2. Using a Formula Field in Airtable
       * Add a new *Formula* field to your table.
       * Enter the formula: `RECORD_ID()`
       * The field will display the record ID for each record.
       * Copy the ID from the relevant cell as needed.
* **Data** (string, required): .Your intent in plain English, describing what part of the record you would like to update.
  * Examples:
    * Change 'X' column's entry to 100

**Configurations:**

* **Base Id** (string, required): The unique identifier of your Airtable base.
  * Example: `app1234567890`
  * &#x20;You can locate this in the URL on your Airtable browser:  `https://airtable.com/app1234567890/tbl...`
* **Table** (string, required): The name of the table to query.&#x20;

  * Open your Airtable base.
  * Look at the **tabs along the top** (or left, depending on your layout). Each tab represents a table.
  * Th**e table name** is the label shown on each tab, e.g. `Employees`&#x20;

  <figure><img src="/files/O89CWw6ZhoDZBQYJZwuM" alt=""><figcaption></figcaption></figure>

***

**4. Delete Airtable Record**

**Description:**

Delete an existing record on Airtable.

**Inputs:**

* **Record Id** (string, required): The unique identification number of the record you would like to modify.&#x20;
  * Retrieve Record ID from Airtable
    1. Using the Query Airtable Node
       * You can retrieve a record by using the *Query Airtable* node.
       * This method automatically returns the record ID as a parameter.
    2. Using a Formula Field in Airtable
       * Add a new *Formula* field to your table.
       * Enter the formula: `RECORD_ID()`
       * The field will display the record ID for each record.
       * Copy the ID from the relevant cell as needed.

**Configurations:**

* **Base Id** (string, required): The unique identifier of your Airtable base.
  * Example: `app1234567890`
  * &#x20;You can locate this in the URL on your Airtable browser:  `https://airtable.com/app1234567890/tbl...`
* **Table** (string, required): The name of the table to query.&#x20;

  * Open your Airtable base.
  * Look at the **tabs along the top** (or left, depending on your layout). Each tab represents a table.
  * Th**e table name** is the label shown on each tab, e.g. `Employees`&#x20;

  <figure><img src="/files/O89CWw6ZhoDZBQYJZwuM" alt=""><figcaption></figcaption></figure>

***

**Summary Table of Actions**

| Action Name            | Description                       | Required Inputs                | Required Configurations | Outputs             |
| ---------------------- | --------------------------------- | ------------------------------ | ----------------------- | ------------------- |
| Query Airtable         | Query records from a base/table   | base\_id, table\_name          | connection\_id          | query, results      |
| Write to Airtable      | Insert/update records in a table  | base\_id, table\_name, records | connection\_id          | record\_id, fields  |
| Update Airtable Record | Update existing record in a table | record\_id, data               | base\_id, table\_name   | record\_id, fields  |
| Delete Airtable Record | Delete a record in existing table | record\_id                     | base\_id, table\_name   | record\_id, deleted |


# Local

Run language models hosted on your own infrastructure inside StackAI workflows.

The **Local LLM integration** allows you to connect to your **preferred** particular models and use them directly in StackAI projects.&#x20;

Once connected, Local Models behave like any other LLM provider in StackAI and can be selected inside AI Agent nodes in your workflows.

For detailed instructions on **setting up and managing** Local Model connections, see the full guide:&#x20;

[**Local LLM Setup Guide**](https://docs.stackai.com/workflow-builder/llms/local-llm)

***

### Usage Overview

<div align="left"><figure><img src="/files/hvAW6SIraWaXolHG9HZv" alt=""><figcaption></figcaption></figure></div>

1. Click **New Connection** to create a **Local Model** connection.&#x20;
2. Enter the endpoint details for the server hosting your model.
3. Use **Test Connection** to verify the connection is **Healthy**.
4. Select the connection when configuring an **AI Agent node** in your workflow.

After the connection is created, it will appear in the connection dropdown when selecting **Local** as the AI Provider.

***

### Workspace Setup

Workspace administrators can configure **default Local Model connections** and control provider access in the workspace settings.

For detailed instructions on:

* Creating default connections
* Enabling or disabling AI Providers
* Managing connections across the workspace
* Disabling StackAI-managed API keys

See the full guide: [**Local LLM Setup Guide**](https://docs.stackai.com/workflow-builder/llms/local-llm)


# Algolia

Learn how to use the Algolia node in Stack AI to perform advanced semantic and natural language searches on your Algolia index, with detailed input, configuration, and output examples.

The **Algolia Node** in Stack AI allows you to search your Algolia index using natural language or semantic queries. This integration is ideal for retrieving relevant data, documents, or records from your Algolia-powered search infrastructure directly within your AI workflows.

***

## How to use it?

Add the Algolia node to your Stack AI workflow to execute search queries against your Algolia index. Connect an input node or LLM node to provide the search query, and use the results in downstream nodes for further processing or display.

***

## Example of Usage

Suppose you want to search for documentation related to "API authentication" in your Algolia index. You would connect an input node (where the user types their query) to the Algolia node, and the Algolia node will return the most relevant results.

***

## Available Actions

### 1. Database Query (Algolia Search)

**Description:**\
Executes a search query against your Algolia index and returns matching results.

***

#### Inputs

| Name  | Type   | Required | Description                                            | Example                                                                             |
| ----- | ------ | -------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------- |
| Query | String | Yes      | The search query to execute against the Algolia index. | "how to implement authentication" ,, "database optimization" ,, "api documentation" |

Showing 1-1 of 1 items

**Example Input:**

```json
{
  "query": "api documentation"
}
```

***

#### Configurations

There are no additional configuration parameters required for the Algolia Database Query action. All you need is the search query input.

***

#### Outputs

| Name    | Type   | Required | Description                                     | Example                                           |
| ------- | ------ | -------- | ----------------------------------------------- | ------------------------------------------------- |
| Results | String | Yes      | The search results from Algolia in JSON format. | '\[{"title": "API Docs", "url": "https\://..."}]' |

Showing 1-1 of 1 items

**Example Output:**

```json
{
  "results": [
    {
      "title": "API Docs",
      "url": "https://docs.example.com/api"
    },
    {
      "title": "Authentication Guide",
      "url": "https://docs.example.com/auth"
    }
  ]
}

```

***

## Summary Table

| Action Name    | Required Inputs | Configurations | Outputs                |
| -------------- | --------------- | -------------- | ---------------------- |
| Database Query | Query (string)  | None           | Results (string, JSON) |




---

[Next Page](/llms-full.txt/1)

