# Lunnoa documentation > Learn how to deploy, operate, and integrate Lunnoa Automate through tutorials, guides, and platform resources. # Adminspace > Manage workspaces, users, authentication, apps, AI access, and core platform settings as a SuperAdmin. Adminspace is the SuperAdmin area for platform governance. Use it to control who can access Automate, which services are available, and which credentials or AI providers users can use. Open **Admin Panel** from your profile area. The admin sidebar appears with **Admin** at the top and **Back to App** when you want to return to the normal workspace. Changes here can grant access, remove access, expose app connections, or change how AI is used. Make changes deliberately and document why they were made. ## In this guide | Admin job | Start here | |---|---| | Create and manage workspaces | [Workspaces](/guides/adminspace/workspaces) | | Manage users, roles, and access | [Users and roles](/guides/adminspace/users-and-roles) | | Configure SSO and SCIM-style access | [SSO](/guides/adminspace/sso) | | Create machine API keys | [API keys](/guides/adminspace/api-keys) | | Configure AI providers and AI connections | [AI configuration](/guides/adminspace/ai-configuration) | | Pull AI providers from git (self-host) | [Installation settings](/guides/deploy/installation-settings) | | Configure apps, OAuth, and managed connections | [App configuration](/guides/adminspace/app-configuration) | ## Adminspace areas | Group | Typical work | |---|---| | **Platform Health** | Overview and background jobs | | **User Management** | Workspaces, roles, and users | | **App Configuration** | Installed apps, OAuth app credentials, managed connections, MCP servers, external agents | | **Authentication** | SSO and API keys | | **AI Configuration** | AI providers, AI connections, and skills | | **Data Management** | Object types | | **System Settings** | Email, observability, and vector database | This first Adminspace guide set covers the high-priority core areas. More specialised settings can be documented after the main access and configuration flows are stable. ## A safe Adminspace workflow For citizen-admins and operations teams: 1. Decide the business outcome first, such as “give Finance access to the invoice workspace”. 2. Check whether the change belongs to **workspace membership**, **role permissions**, or a grant on a shared resource (apps, OAuth clients, shared credentials, MCP servers, skills, external agents, or AI connections). 3. Make the smallest change that solves the outcome. 4. Test with a user who has the target role. 5. Record what changed, especially for production workspaces. ## Related - [Workspaces](/guides/adminspace/workspaces) - [Users and roles](/guides/adminspace/users-and-roles) - [AI configuration](/guides/adminspace/ai-configuration) - [App configuration](/guides/adminspace/app-configuration) Source: https://docs.lunnoa.com/guides/adminspace --- # Workspaces > Create and manage workspaces so teams have the right place to build agents, workflows, apps, and knowledge. Workspaces are the top-level business containers in Automate. A workspace holds users, agents, workflows, variables, apps, and shared configuration. Open **Admin Panel → Workspaces**. Workspaces can be declared in an [installation settings file](/guides/deploy/installation-settings). For those, the name and description cannot be changed here and the workspace cannot be deleted. Change it in the settings repository instead. ## When to create a workspace Create a workspace when a group needs its own access boundary or operating environment. Good reasons: - A business unit needs its own users, agents, and workflows. - A customer or client environment must be isolated. - A staging workspace should be separate from production. - Different teams need different app, AI, MCP, skill, or managed connection access. Do not create a new workspace just for a single workflow when the same team, users, and governance rules already apply. ## Manage workspaces Open **Admin Panel**, then go to **User Management → Workspaces**. Check the workspace name, status, and who owns it before making changes. Create a new workspace when a team needs a new governed area. Edit existing workspace settings when the business owner, naming, or lifecycle changes. ## Workspace design checklist Before creating a workspace, decide: | Question | Why it matters | |---|---| | Who owns this workspace? | Someone must be responsible for access and cleanup | | Which users need access? | Drives membership and role assignment | | Which apps and AI connections are allowed? | Prevents accidental access to the wrong systems | | Is it production or testing? | Helps naming and risk level | | What should happen when the team stops using it? | Avoids forgotten workspaces | ## Naming Use names that make the workspace purpose obvious: - `Finance Operations` - `Customer Support Production` - `Client A Sandbox` Avoid vague names such as `Main`, `Test`, or `New workspace`. A workspace the [installation settings](/guides/deploy/installation-settings) file owns shows a Git badge. Change its name and description in the file. Members stay editable here. ## Related - [Users and roles](/guides/adminspace/users-and-roles) - [App configuration](/guides/adminspace/app-configuration) - [AI configuration](/guides/adminspace/ai-configuration) - [Adminspace overview](/guides/adminspace) Source: https://docs.lunnoa.com/guides/adminspace/workspaces --- # Users and roles > Invite users, assign roles, and keep workspace access aligned with business responsibility. Users and roles decide who can enter Automate and what they can do. Use Adminspace to keep access intentional, especially for production workflows and shared agents. Open **Admin Panel → Users** or **Admin Panel → Roles**. Custom roles can be declared in an [installation settings file](/guides/deploy/installation-settings). For those, the name, description, permissions, and workspace list cannot be changed here. Change them in the settings repository instead. People and workspace membership are never managed by the file. ## The relationship | Concept | Meaning | |---|---| | **User** | A person who can sign in to Automate | | **Role** | A reusable permission set | | **Workspace membership** | Which workspace a user belongs to | Roles should match business responsibility, not job titles alone. For example, a finance operations builder may need more workflow permissions than a finance viewer. ## Review users In **Admin Panel**, go to **User Management → Users**. Find the person you want to review. Confirm workspace membership and role assignment before editing. Add, change, or remove the user's access based on their current responsibility. ## Manage roles Open **Admin Panel → Roles**. A custom role the [installation settings](/guides/deploy/installation-settings) file owns shows a Git badge. Change its name, permissions, and the workspaces it covers in the file. Who belongs to the role stays editable here. Built-in roles (`Admin`, `Editor`, `Viewer`, and `Agent User`) are not declared in the file. Roles centralise permission decisions. Instead of customising every user one by one, create roles that match common responsibility levels, then assign users to those roles. Examples: | Role idea | Typical purpose | |---|---| | Workspace viewer | Read agents, workflows, and execution history | | Workflow editor | Build and test workflows | | Agent builder | Create and configure agents | | Workspace admin | Manage workspace-level users and settings | | SuperAdmin | Manage platform-level Adminspace settings | Grant the smallest role that lets the user do their job. Production workflow, connection, and API key permissions can affect real systems. ## Roles and shared resources A role also decides who can use shared platform resources. A SuperAdmin grants each resource to everyone, to selected workspaces, or to selected roles: - Apps, including who can create a connection - OAuth clients - Shared credentials (managed connections) - MCP servers - Skills - External agents - AI connections Open the resource in Adminspace and use **Who can use this?**: | Choice | Who can use it | |---|---| | **Everyone** | Every user on the platform | | **Selected workspaces and roles** | Members of the chosen workspaces, and people who hold a chosen role on their membership in that workspace | | **Nobody** | No one | A role grant applies only in a workspace where that person holds the role. Holding the role in another workspace does not open the resource. Object types stay on a workspace grant. They do not use this role list. ## Access review checklist Review access when: - A user joins or leaves the organisation. - A user changes team or responsibility. - A workspace moves from testing to production. - A shared app, credential, MCP server, skill, external agent, or AI connection is added. - A workflow starts touching sensitive systems. ## Related - [Workspaces](/guides/adminspace/workspaces) - [SSO](/guides/adminspace/sso) - [API keys](/guides/adminspace/api-keys) - [Adminspace overview](/guides/adminspace) Source: https://docs.lunnoa.com/guides/adminspace/users-and-roles --- # SSO > Configure single sign-on so users authenticate through your organisation's identity provider. SSO lets users sign in to Automate through your organisation's identity provider instead of managing separate passwords. Use it when your company requires central MFA, conditional access, or directory-driven user lifecycle. Open **Admin Panel → SSO**. ## When to use SSO SSO is recommended when: - Automate is used by more than a small pilot group. - Your organisation already uses an identity provider such as Microsoft Entra ID, Okta, Keycloak, or Google Workspace. - Security policy requires central MFA or session rules. - User access must be removed quickly when someone leaves. ## Configure SSO safely In your identity provider, create an OIDC or supported SSO application for Automate. Keep issuer, client ID, client secret, and redirect/callback details ready. In **Admin Panel**, go to **Authentication → SSO**. Enter the provider details from your identity platform. Use exact values from the provider rather than retyping from memory. Test sign-in before rolling out to the whole workspace. Keep a break-glass SuperAdmin path available during setup. ## Rollout checklist | Check | Why it matters | |---|---| | SuperAdmin break-glass access exists | Prevents lockout if the provider is misconfigured | | Test user can sign in | Confirms the provider and redirect settings work | | Roles and workspace access are correct | Authentication alone does not prove the user has the right permissions | | Offboarding process is clear | Identity provider disablement should remove access quickly | | Users know which sign-in method to use | Reduces support requests during rollout | ## SSO and roles SSO proves who the user is. Roles decide what they can do after sign-in. Review [Users and roles](/guides/adminspace/users-and-roles) when you enable or change SSO. ## Related - [Users and roles](/guides/adminspace/users-and-roles) - [Workspaces](/guides/adminspace/workspaces) - [Adminspace overview](/guides/adminspace) Source: https://docs.lunnoa.com/guides/adminspace/sso --- # API keys > Create and manage machine API keys for integrations that call Automate without a human session. API keys let external systems call Automate as a machine client. Use them for trusted integrations, backend jobs, and scripts that need stable access without a browser login. Open **Admin Panel → API Keys**. API keys can grant direct access to Automate. Store them in a secrets manager, never in documentation, chat messages, screenshots, or git. ## When to create an API key Create an API key when: - A backend service needs to call Automate. - A script or scheduled job runs outside Automate. - A trusted integration cannot use a human browser session. Do not create API keys for casual testing when a normal user session is enough. ## Create a key In **Admin Panel**, go to **Authentication → API Keys**. Create a new key with a name that identifies the system using it, not the person creating it. Copy the secret once and store it in your approved secrets manager. Do not paste it into the docs or source code. Test the key with the target system, then remove any temporary copies. ## Naming and ownership Good API key names answer three questions: - Which system uses this key? - Which environment is it for? - Who owns it? Examples: - `billing-sync-production` - `client-portal-staging` - `data-export-nightly` ## Rotation and cleanup Review API keys regularly: | Event | Action | |---|---| | Owner leaves | Rotate or delete keys they maintained | | Integration is retired | Delete the key | | Key may have leaked | Revoke immediately and create a replacement | | Environment changes | Create separate keys for staging and production | ## Related - [SSO](/guides/adminspace/sso) - [Users and roles](/guides/adminspace/users-and-roles) - [API authentication](/api/auth) - [Adminspace overview](/guides/adminspace) Source: https://docs.lunnoa.com/guides/adminspace/api-keys --- # AI configuration > Configure AI providers and AI connections so agents and workflow builders can use approved models. AI configuration decides which AI providers and model connections are available to users. Business users can build agents only when they have access to at least one AI connection and model. Open **Admin Panel → AI Providers** or **Admin Panel → AI Connections**. Providers, connections, and connection access can be declared in an [installation settings file](/guides/deploy/installation-settings). Rows it owns are read-only here. Change them in the settings repository instead. ## Providers vs connections | Item | Meaning | |---|---| | **AI Provider** | The provider type or platform, such as OpenAI, Azure, or another supported model source | | **AI Connection** | A configured account or credential users can select in agents and Build with AI | Citizen developers usually interact with **AI Connection** and **Model** fields. SuperAdmins configure the provider and grant access behind the scenes. ## Configure AI access In **Admin Panel**, go to **AI Configuration → AI Providers**. Review which providers are available. Go to **AI Configuration → AI Connections**. Create or review the connections users will select. Open the connection and set **Who can use this?** to **Everyone**, **Selected workspaces and roles**, or **Nobody**. Skills under **AI Configuration → Skills** use the same choice. Separate testing and production access when model cost or data policy differs. Open an agent as a normal builder and confirm **AI Connection** and **Model** appear in [Create and configure](/guides/agents/create-and-configure). ## Providers from git A self-hosted install can declare providers and who may use them in an [installation settings file](/guides/deploy/installation-settings). The file sets the provider, the catalogue models and tools, connection access, and a [secret reference](/guides/deploy/installation-settings/secrets) for the API key. It does not contain the key. A provider the file owns cannot be saved or deleted here. A connection the file owns keeps its name and access in the file. Models, tools, and whether it may see personal data can still be edited here. Providers and connections you created in Admin Space are left alone. ## Model governance When choosing what to expose, decide: | Question | Why it matters | |---|---| | Which data may be sent to this provider? | Protects customer, employee, and operational data | | Which teams need higher-quality models? | Controls cost and performance | | Which models are approved for production agents? | Avoids experimental models in business workflows | | Who owns the provider account? | Makes billing and rotation clear | ## If users cannot chat with agents Check: 1. Is the AI connection granted to everyone, to this workspace, or to a role this user holds here? 2. Does the connection expose at least one model? 3. Did the agent builder select both **AI Connection** and **Model**? 4. Is the provider credential still valid? ## Related - [Create and configure agents](/guides/agents/create-and-configure) - [Chat to workflow](/guides/workflows/chat-to-workflow) - [Adminspace overview](/guides/adminspace) Source: https://docs.lunnoa.com/guides/adminspace/ai-configuration --- # App configuration > Configure installed apps, OAuth credentials, and managed connections for workspace builders. App configuration controls which external systems users can connect to and which shared accounts are available for workflows and agents. Open **Admin Panel → Apps**, **OAuth Config**, or **Connections** under **App Configuration**. ## The admin app model | Admin area | What it controls | |---|---| | **Apps** | Which apps are installed or available in the workspace | | **OAuth Config** | App-level OAuth credentials used when users connect their own accounts | | **Connections** | Managed connections that administrators configure and share | | **MCP Servers** | Tool servers available from the [MCP](/guides/mcp) page | | **External Agents** | A2A or external agent integrations when enabled | This page focuses on Apps, OAuth Config, and managed Connections. ## Configure an app for users In **Admin Panel**, go to **App Configuration → Apps**. Confirm the app is installed or available. Go to **OAuth Config** when an app requires OAuth client credentials. Add the provider details from the external service. Go to **Connections** to create a managed account that users can select in workflows or agents. Open [Apps](/guides/integrations) as a normal user and confirm the app appears in **Connect Your Accounts** or **Managed Connections** as intended. ## OAuth config vs managed connection | Need | Configure | |---|---| | Users should sign in with their own account | **OAuth Config**, then users connect from [Apps](/guides/integrations/connect-an-app-account) | | Workflows should use one shared service account | **Connections** as a managed connection | | A team should not see or use an app | Leave it on **Nobody**, or grant it only to other workspaces and roles | ## Managed connection governance Before creating a managed connection, decide: - Which workspace, or which role in that workspace, should be able to use it? - Which external account should be connected? - Who owns the external account? - What workflows or agents depend on it? - How will it be rotated if the credential expires? Managed connections are powerful because they let production workflows avoid depending on one user's personal account. ## Who can use it On an app, OAuth client, managed connection, MCP server, or external agent, set **Who can use this?** to **Everyone**, **Selected workspaces and roles**, or **Nobody**. A role grant counts only where that person holds the role. See [Users and roles](/guides/adminspace/users-and-roles). ## User-facing effect After admin configuration: - Users see normal app cards under [Apps](/guides/integrations). - OAuth apps open a sign-in flow when users click **Add New Connection**. - Managed connections appear under **Managed Connections** and can be selected in workflow or agent fields. ## Related - [Apps](/guides/integrations) - [Managed connections](/guides/integrations/managed-connections) - [MCP](/guides/mcp) - [Adminspace overview](/guides/adminspace) Source: https://docs.lunnoa.com/guides/adminspace/app-configuration --- # Email configuration > Configure SMTP email, test delivery, and activate verification mail as a SuperAdmin. Email configuration controls whether Automate can send verification and notification mail. Configure it under **Admin Panel → System Settings → Email Config**. Without an **active** email provider, verification emails are skipped and users may not receive account mail from the platform. SMTP passwords are stored encrypted. Prefer this Adminspace form over deployment `MAIL_*` env vars. Those env vars are ignored when present. ## What you configure | Area | Purpose | |---|---| | **Sender** | From email, from name, optional reply-to | | **SMTP** | Host, port, SSL/TLS, optional username and password | | **Skip email verification** | Platform toggle for whether new users must verify email | | **Lifecycle** | Save, test, activate or deactivate, delete | Provider type in the UI is SMTP. Services such as SendGrid or Postmark work by using their SMTP host and API credentials as username and password. ## Recommended flow Always: **Save → Test email → Activate**. Activate stays disabled until a test succeeds (`isVerified`). Open **Admin Panel**, then **System Settings → Email Config** (`/adminspace/email-config`). Fill the required fields: | Field | Notes | |---|---| | From email / From name | Required; shown on outbound mail | | Reply-to | Optional | | SMTP host / port | Required; default port is often `587` | | Use SSL/TLS | Typical for port `465` | | Username / password | Optional for open relays; leave password blank on edit to keep the stored secret | Save the configuration. Secrets are encrypted at rest. Use **Test Email**, enter a recipient you control, and confirm the message arrives. Activate the provider so Automate can send verification and related mail. After email is active, turn **off** skip verification if new users must confirm their address. You can only enable skip when email is not active; you can only require verification when email is configured and active. ## Operational rules | Situation | What to do | |---|---| | Configured but inactive | Activate after a successful test | | No provider configured | Verification emails are skipped | | Rotating SMTP credentials | Edit, set the new password, save, re-test, keep active | | Retiring email entirely | Use Danger Zone delete only when intentional; this disables platform email | ## Related - [Environment variables](/guides/deploy/environment-variables) (Adminspace vs env) - [SSO](/guides/adminspace/sso) - [Users and roles](/guides/adminspace/users-and-roles) - [Adminspace overview](/guides/adminspace) Source: https://docs.lunnoa.com/guides/adminspace/email-config --- # Observability > Export OpenTelemetry traces for compliance and operations as a SuperAdmin. Observability controls server-side OpenTelemetry export from Automate. Configure it under **Admin Panel → System Settings → Observability** (`/adminspace/observability`). This is separate from browser (frontend) OTEL env vars. Server export is **Adminspace only**, not `OTEL_*` on the server process. Trace data can include operational context. Review redaction and identity toggles with your security or DPO before activating production export. ## What you configure | Section | Purpose | |---|---| | **Provider and connection** | Grafana Cloud, Datadog, SigNoz, or Langfuse; OTLP endpoint and headers | | **LLM-specific backend** | Optional second OTLP endpoint for AI spans only | | **Telemetry scopes** | HTTP, database, LLM/AI SDK, queue jobs, auth | | **Compliance and privacy** | Redact prompts, SQL, HTTP bodies; optional user, workspace, client IP | | **Lifecycle** | Save, test connection, activate or deactivate, audit log, delete | Use the **base** OTLP URL only. Automate appends `/v1/traces`. Do not paste a full traces path into the endpoint field. ## Recommended flow Always: **Save → Test connection → Activate**. Activate requires a verified test. Open **Admin Panel**, then **System Settings → Observability**. Select Grafana Cloud, Datadog, SigNoz, or Langfuse. Apply any endpoint hint the UI offers for that provider. Enter a display name, OTLP endpoint, protocol (HTTP or gRPC), and OTLP headers as `Key=Value` lines. Headers are stored encrypted. Enable the telemetry scopes you need. Keep redaction on unless you have an approved reason to send raw prompts, SQL, or HTTP bodies. Treat **client IP** as GDPR-sensitive. If AI spans should go to a different collector, set the LLM-specific OTLP endpoint and headers. Save, run **Test connection**, then activate. Review the compliance status card after save. ## Privacy checklist Before production activation: | Check | Why | |---|---| | Prompt redaction | Avoid sending model prompts/responses to the collector | | SQL / HTTP body redaction | Reduce sensitive payload leakage | | User and workspace IDs | Useful for support; confirm policy allows them | | Client IP | Enable only with a documented legal basis | | Custom `service.name` | Keep environments distinguishable in the backend | ## Env and related settings | Topic | Where | |---|---| | Server OTEL export | This Adminspace page only | | Browser OTEL | `VITE_ENABLE_BROWSER_OTEL` and related vars in [Environment variables](/guides/deploy/environment-variables) | | Self-hosted SigNoz UI | `SIGNOZ_JWT_SECRET` for the SigNoz stack | ## Operational rules | Event | Action | |---|---| | Collector URL or headers change | Update, re-test, keep active | | Temporary pause | Deactivate instead of delete when you expect to resume | | Remove configuration | Danger Zone delete stops export; confirm before removing | ## Related - [Environment variables](/guides/deploy/environment-variables) - [Email configuration](/guides/adminspace/email-config) - [Adminspace overview](/guides/adminspace) Source: https://docs.lunnoa.com/guides/adminspace/observability --- # Getting started > Choose the right first build, then create your first agent or workflow in Lunnoa Automate. Lunnoa Automate helps teams create AI agents and workflows without starting from code. This guide is for a first session: open your workspace, choose a small business process, then build either a first agent or a first workflow. Your first build should be narrow. Pick one job a teammate already repeats, such as answering policy questions, collecting request details, triaging emails, or routing approvals. ## Choose what to build first | Build | Choose this when | Example | |---|---|---| | **Agent** | A person should chat, ask questions, or get guided help | A policy Q&A assistant, invoice intake assistant, or supplier support assistant | | **Workflow** | The same steps should run in order every time | A request approval flow, recurring report, or form-to-notification process | Many real processes use both. A workflow can call an agent, and an agent can use tools that trigger workflow actions. For your first session, choose one starting point so testing stays simple. ## First session checklist Sign in to Lunnoa Automate and confirm the workspace name matches the team or environment you intend to use. Agents and workflows belong to that workspace. If you have access to more than one workspace, use a test or training workspace for your first build. Make sure you can create the thing you are building. Agents need an available **AI Connection** and model. Workflows may need app connections before actions can run. Avoid real customer records, production approvals, or sensitive documents while learning. Use a short sample document, a test email, or a simple manual trigger. ## Build your first agent Use this path when the first user experience should be a conversation. Go to [Agents](https://automate.lunnoa.com/agents) under **Build**, then click **New Agent**. Give the agent a job-based name, such as `Policy Q&A` or `Invoice Intake Assistant`. Open **Configure**. Set **Profile & instructions**, then choose **AI settings**. The minimum useful setup is a clear name, description, instructions, AI connection, and model. If the agent answers from documents, enable one [Knowledge notebook](/guides/knowledge/use-with-agents). If it should take an action, add one [Tool or MCP integration](/guides/agents/tools-knowledge-and-skills). Do not add everything at once. Return to **Build** and ask three prompts: one easy success case, one case that should use knowledge or a tool, and one case the agent should refuse or escalate. For the full setup guide, see [Create and configure an agent](/guides/agents/create-and-configure). For every configuration area and option, see [Agent configuration reference](/guides/agents/configuration-reference). ## Build your first workflow Use this path when the first user experience should be a repeatable process. Go to [Workflows](https://automate.lunnoa.com/workflows) under **Build**, then click **New Workflow**. Start with **Manually Run** for your first build. Manual triggers are easier to test because you decide exactly when the workflow runs. Click the **+** on the canvas and add one simple action. For example, send a message, create a draft record, or call an agent. Click the node, fill required fields, connect any required app account, then use **Save & Test** if the action supports it. Click **Save**, run the workflow manually, then check [Monitor executions](/guides/workflows/monitor-executions) to confirm what happened. For a click-by-click canvas guide, see [Build on the canvas](/guides/workflows/build-on-the-canvas). If you prefer describing the process in chat, see [Chat to workflow](/guides/workflows/chat-to-workflow). ## A good first example Try one of these: | Goal | Start with | Why it is good for learning | |---|---|---| | Answer a policy question | Agent + one Knowledge notebook | Shows instructions and document grounding | | Collect an internal request | Agent with clear questions | Shows conversation design without risky actions | | Send a weekly reminder | Workflow with manual or schedule trigger | Shows triggers, actions, and executions | | Ask for approval | Workflow with Flow Control approval | Shows human decision points and run history | ## Next steps - Learn the platform concepts: [Business users](/guides/business) - Build with agents: [AI agents](/guides/agents) - Build repeatable automations: [Workflows](/guides/workflows) - Connect external services: [Apps](/guides/integrations) - Prepare production setup: [Deploy](/guides/deploy) Source: https://docs.lunnoa.com/guides/getting-started --- # For business users > Workspaces, agents, and day-to-day automation without writing code. Lunnoa Automate is built so operations and process owners can describe work, review runs, and hand off to IT for governance. ## Core ideas - **Workspace**: the shared home for agents, workflows, and permissions. - **Agent**: an automated worker that follows a defined process. - **Task**: one run of an agent, with inputs, outputs, and audit trail. A future bridge will turn annotated screenshots into draft docs and Automate workflows. Today, capture steps with `` and `
` so that path stays open. ## Typical week 1. Review failed or waiting tasks. 2. Adjust prompts or handoffs with the process owner. 3. Ask IT to widen a role only when a permission error is real. ## Related - [Getting started](/guides/getting-started) - [Variables](/guides/variables) for reusable values in workflows and agents - [Workflows](/guides/workflows) for canvas and chat-to-workflow automations - [AI agents](/guides/agents) for assistants that can use tools and knowledge - [Apps](/guides/integrations) and [MCP](/guides/mcp) for external systems - [Knowledge](/guides/knowledge) for documents agents can search - [Approvals](/guides/approvals) for human decisions inside workflows - [Public API](/api/auth) for system integrations Source: https://docs.lunnoa.com/guides/business --- # Variables > Reuse named values across workflows and agents without hard-coding them in every step. Variables are named values you store once and reuse wherever Automate accepts dynamic fields. Create them at [Variables](https://automate.lunnoa.com/variables), then insert them into workflow steps or let agents read and update them with the built-in Variables tools. Use variables for things that change over time or appear in many places: a shared inbox address, a default currency, a cut-off date, or a feature flag. Change the value once; every workflow and agent that references it picks up the new value on the next run. ## In this guide | Topic | Start here | |---|---| | Create, change, or delete a variable | [Create and manage](/guides/variables/create-and-manage) | | Insert variables in workflow fields and app actions | [Use in workflows](/guides/variables/use-in-workflows) | | Let agents read or update variables safely | [Use with agents](/guides/variables/use-with-agents) | ## Saved variables vs execution variables | Kind | Lifetime | Good for | |---|---|---| | **Saved variable** (Variables page) | Persists until you change or delete it | Shared settings across many runs | | **Execution variable** | Exists only for one workflow run | Passing temporary data between steps in that run | Do not put long-lived business settings into execution variables. Create a saved variable instead. Details for both kinds are in [Use in workflows](/guides/variables/use-in-workflows). Variables belong to the workspace. Workflows and agents in that workspace can use them. ## Rules and limits | Rule | Detail | |---|---| | Name length | Up to **100** characters; required | | Description length | Up to **1000** characters; optional | | Value | Required when you create or update | | Data types you can pick in the UI | **Text**, **Number**, **True/False**, **Date** | | Name uniqueness | Prefer unique, human-readable names so pickers and agents stay clear | | Delete impact | Deleting a variable affects **every workflow** that still references it | | Secrets | Prefer connection credentials for API keys and passwords. Variables may appear in the Variables table and in run context; treat them as shared configuration, not a secrets vault | ## Related - [Create and manage](/guides/variables/create-and-manage) - [Use in workflows](/guides/variables/use-in-workflows) - [Use with agents](/guides/variables/use-with-agents) - [Business users](/guides/business): core platform concepts - [Workflows](/guides/workflows): building and running automations - [AI agents](/guides/agents): agents that can call tools and start workflows Source: https://docs.lunnoa.com/guides/variables --- # Create and manage variables > Create, change, and delete saved variables on the Variables page. Open [Variables](https://automate.lunnoa.com/variables) to manage saved values your workflows and agents reuse. For when to use variables and the rules that apply, see [Variables](/guides/variables). ## Create a variable Use **New Variable** on the Variables page. On the Variables page, click **New Variable**. Enter a **Variable Name** (required, max 100 characters) using a clear business phrase. Add a **Description** (optional, max 1000 characters) that tells people and agents what the value is for, when to change it, and any format rules. See [Name and describe variables for agents](/guides/variables/use-with-agents#name-and-describe-variables-for-agents). Pick **Text**, **Number**, **True/False**, or **Date**, then enter the value. Changing the type tab clears the value field, so set the type first. Click **Create**. You should see confirmation that you can start using the variable in workflows. ## Change a variable On the Variables page, click the variable **name**, or open the row menu (**…**) and choose **Update**. Update the name, description, and/or value. Keep the value compatible with the existing data type (for example do not put text into a Number variable). Click **Save**. The next workflow or agent run that reads the variable uses the new value. Changing a value does **not** rewrite past runs. Only future executions see the update. ## Delete a variable On the Variables page, open **…** on the row and choose **Delete**. Read the warning: deleting affects workflows that still use this variable. Confirm only when you have removed or replaced those references. Search your workflows for steps that still insert the variable. Replace or remove those references first, then delete. Otherwise runs may fail when they cannot resolve the value. ## Next - [Use in workflows](/guides/variables/use-in-workflows): insert a variable from a field picker - [Use with agents](/guides/variables/use-with-agents): name and describe variables so agents can use them safely Source: https://docs.lunnoa.com/guides/variables/create-and-manage --- # Use variables in workflows > Insert saved variables into workflow fields, use Variables app actions, and pass temporary execution variables. Workflows can read saved variables from the field picker, call Variables app actions mid-run, and store temporary **execution variables** for a single run. Create saved variables first on the [Variables](https://automate.lunnoa.com/variables) page ([Create and manage](/guides/variables/create-and-manage)). ## What to use them for | Use | Example | |---|---| | Fill action fields without typing the same value in every step | `Support inbox` = `ops@example.com` in email “To” fields | | Keep environment-specific values out of the canvas | `CRM base URL` for staging vs production | | Flip behaviour without editing the graph | `Approvals enabled` = True / False | | Store dates the process depends on | `Quarter end` as a date | | Update a shared value during a run | Variables app action **Update Variable** | ## Insert a variable from a field In a step field that supports dynamic input: 1. Open the **+** picker on the field. 2. Choose the **Variables** tab. 3. Select a saved variable (or an execution variable when one exists for this run). At run time Automate replaces the reference with the current stored value. ## Variables app actions | Action | When to use it | |---|---| | **List Variables** | See saved variables in the workspace | | **Get Variable** | Read a value into a later step | | **Update Variable** | Change a saved variable’s value mid-run (for example increment a counter) | | **Set Execution Variable** | Store a temporary value for **this run only** | | **Get Execution Variable** | Read a temporary value set earlier in the same run | ## Execution variables Execution variables exist only for one workflow run. Use them to pass temporary data between steps. Do not put long-lived business settings here; create a [saved variable](/guides/variables/create-and-manage) instead. ### Example: temporary request id **Goal:** Pass an id between steps in a single run without saving it permanently. 1. Add **Set Execution Variable** with key `requestId` and the value from an earlier step. 2. Later steps use **Get Execution Variable** (or the Variables picker **exec** entries) to read `requestId`. 3. The value disappears when the run finishes. ## Example: shared support inbox **Goal:** Several email steps should always use the same inbox. 1. Create a Text variable named `Support inbox` with value `ops@example.com` ([Create and manage](/guides/variables/create-and-manage)). 2. In each email step’s **To** field, insert `Support inbox` from the Variables tab. 3. When the address changes, update the variable once. Future runs use the new address. ## Next - [Use with agents](/guides/variables/use-with-agents): let agents read or update the same values - [Variables](/guides/variables): scope, rules, and overview Source: https://docs.lunnoa.com/guides/variables/use-in-workflows --- # Use variables with agents > Enable Variables tools for agents and name values so agents can pick and update them safely. Agents use variables in two practical ways: 1. **As tools** — enable the Variables app for the agent so it can list, get, or update values when a conversation or task needs them (for example “what is our default reply-to address?” or “set the escalation flag to true”). 2. **Indirectly through workflows** — if the agent starts a workflow that already references variables, those values are resolved when the workflow runs. Agents choose which variable to read or update from the **name** and **description**. Treat those fields as instructions for the agent, not only as labels for people. Create and maintain the values on the Variables page ([Create and manage](/guides/variables/create-and-manage)). ## Name and describe variables for agents When an agent has the Variables tools, it lists available variables and picks one by reading the **name** and **description**. Vague names force guessing. Clear names plus a short “how to use this” description make tool calls reliable. ### How to name variables Use a short business phrase a colleague would recognise. Prefer spaces and plain English over codes or abbreviations. | Prefer | Avoid | Why | |---|---|---| | `Support inbox` | `email1`, `var_to` | Says what the value is for | | `Approvals enabled` | `flag`, `bool2` | States the business meaning | | `Default reply language` | `lang`, `dl` | Agents can match user requests like “switch to German” | | `Invoice reminder days` | `n`, `days` | Includes the unit in the name | | `CRM base URL` | `url`, `endpoint` | Distinguishes from other URLs | | `Quarter end` | `date1` | Clear calendar meaning | Naming tips: - Start with the **business concept**, not the technical field (`Support inbox`, not `to_address`). - Keep names under a few words when you can (still within the 100-character limit). - Use the same wording your team uses in chat and tickets so agents and people stay aligned. - Do not encode the data type in the name (`Support inbox text`); the type selector already does that. - Avoid near-duplicates (`Support inbox` vs `Support inbox email`) unless the difference is obvious in both name and description. ### Why descriptions matter for agents The description is the agent’s usage guide. A good description answers: **what this value is**, **when to read or change it**, and **what must stay true** (format, who owns the decision, do not invent values). Without a description, the agent only sees a short name. That is often enough for `Support inbox`, but not for flags, counters, or values that must not be guessed. Write descriptions that: 1. **State the purpose** in one sentence. 2. **Say when to update** (operator request, after approval, never mid-conversation, and so on). 3. **Constrain the value** (email format, True/False only, ISO date, allowed languages). 4. **Point to related process** if needed (which workflow or team owns it). | Name | Weak description | Strong description | |---|---|---| | `Support inbox` | Email | Shared mailbox for customer replies. Use as the To address in outbound support emails. Update only when IT changes the mailbox. | | `Approvals enabled` | Flag | When True, the invoice workflow pauses for human approval. Set to False only if an ops lead asks to skip approvals temporarily. | | `Default reply language` | Language | ISO-style language for agent replies (for example `en` or `de`). Read this before drafting customer messages. Do not invent a language code. | | `Invoice reminder days` | Number | Days after due date before sending a reminder. Whole number only. Agents may read it; only finance may ask to change it. | The **name** helps the agent pick the right variable. The **description** tells the agent how to use or update it safely. Spend an extra sentence on the description whenever an agent can change the value. ## Example: approval flag (workflow + agent) **Goal:** Turn human approval on or off without rebuilding the flow. 1. Create a True/False variable named `Approvals enabled`, value `True` ([Create and manage](/guides/variables/create-and-manage)). 2. Description example: “When True, the invoice workflow pauses for human approval. Set to False only if an ops lead asks to skip approvals temporarily.” 3. In a branch or condition step, compare against that variable (or have an early step **Get Variable** and branch on the result). See [Use in workflows](/guides/variables/use-in-workflows). 4. Allow an agent the Variables tools so an operator can ask: “Turn off approvals” and the agent runs **Update Variable** using that description as guidance. ## Next - [Create and manage](/guides/variables/create-and-manage) - [Use in workflows](/guides/variables/use-in-workflows) - [Variables](/guides/variables): overview and rules Source: https://docs.lunnoa.com/guides/variables/use-with-agents --- # Workflows > Build automations on a visual canvas or with chat-to-workflow, then save, test, activate, and operate them. Workflows are step-by-step automations that run in Automate. Each workflow starts with a **trigger**, then runs **actions** (apps, Flow Control, agents, and more) in order. Open the list at [Workflows](https://automate.lunnoa.com/workflows). You can assemble steps yourself on the canvas, or describe the process in **Build with AI** and let the assistant interview you and place nodes. Both land on the same canvas; you can mix them. ## In this guide ### Build | Topic | Start here | |---|---| | Create a workflow and assemble steps with clicks | [Build on the canvas](/guides/workflows/build-on-the-canvas) | | Describe a process and let AI draft the graph | [Chat to workflow](/guides/workflows/chat-to-workflow) | | What Build with AI can do vs the agent builder | [Builder tools](/guides/agents/builder-tools) | | Choose how a run starts | [Triggers](/guides/workflows/triggers) | | Approvals, branches, waits, and other built-in logic | [Flow Control](/guides/workflows/flow-control) | | Name, description, tags, metrics, and Active | [Settings](/guides/workflows/settings) | ### Operate | Topic | Start here | |---|---| | Save a graph as a reusable pattern, or start from one | [Templates](/guides/workflows/templates) | | Share a workflow file between workspaces or environments | [Export and import](/guides/workflows/export-and-import) | | Find runs, open details, and clean up history | [Monitor executions](/guides/workflows/monitor-executions) | ## What a workflow is made of | Piece | Role | |---|---| | **Trigger** | How the run starts (for example Manually Run, Recurring Schedule, or an app event). See [Triggers](/guides/workflows/triggers). | | **Actions** | What happens next: call apps, [Flow Control](/guides/workflows/flow-control) (branches, waits, approvals), talk to agents, write knowledge, and more | | **Connections** | Credentials many actions need before they can run | | **Active** | When on (and saved), the workflow can run according to its trigger | Every workflow belongs to the **workspace**. Create one from the Workflows list with **New Workflow**. ## Canvas at a glance You do not drag steps from a left palette. You build by: 1. Choosing a **trigger** on the empty canvas (**Select a trigger...**). 2. Adding the next action with the **+** on a node or on a connection line. 3. Clicking a node to configure fields, connections, and **Save & Test**. 4. Turning **Active** on and clicking **Save** in the header when you are ready for real runs. The right-hand **Build with AI** panel is the chat-to-workflow path. See [Chat to workflow](/guides/workflows/chat-to-workflow). ## After you build | Job | Where | |---|---| | Keep the workflow findable and ready | [Settings](/guides/workflows/settings) (**Active**, name, tags, metrics) | | Reuse the pattern in this workspace | [Templates](/guides/workflows/templates) | | Move the graph to another workspace | [Export and import](/guides/workflows/export-and-import) | | Check whether runs succeeded or failed | [Monitor executions](/guides/workflows/monitor-executions) (under **Observability → Executions**) | ## Related - [Variables](/guides/variables): reuse values in step fields - [AI agents](/guides/agents): agents that workflows can message - [Business users](/guides/business): core platform concepts Source: https://docs.lunnoa.com/guides/workflows --- # Build on the canvas > Create a workflow and assemble triggers and actions with click-to-add steps on the visual canvas. This guide covers the **drag-and-drop style** builder: you pick triggers and actions from menus on the canvas (there is no separate palette to drag from). For the AI-assisted path, see [Chat to workflow](/guides/workflows/chat-to-workflow). ## Create a workflow Open [Workflows](https://automate.lunnoa.com/workflows). Click **New Workflow** (top right). Enter a **Workflow Name**, then click **Create**. The workflow is created in the current workspace. Automate opens the builder. New workflows start as **Untitled Workflow** (or the name you entered) with an empty canvas and **Select a trigger...**. ## Choose a trigger Every workflow needs exactly one trigger. Click the **+** placeholder (or **Select a trigger...**). Search or browse. Flow Control triggers appear first (for example **Manually Run**, **Recurring Schedule**, **Listen for Webhook**). App triggers sit under **Apps**. Click the trigger node to open its settings. Fill required fields and any connection, then **Save**. Structure changes (adding the trigger) also auto-save so you can test without losing the draft. Deleting the trigger turns it back into the **Select a trigger...** placeholder. You cannot remove the trigger slot entirely. ## Add actions After a trigger (or any configured node) is in place: | Control | What it does | |---|---| | **+** after a node | Opens the action picker for the next step | | **+** on a connection line | **Insert Action** between two steps (or split the path when offered) | | Drag between handles | Connect nodes manually; the link auto-saves | In the action picker, **Popular** lists common apps (Flow Control, AI, Web, Knowledge, Queues). Everything else is under **Apps**. Search to jump to a name. A multi-step canvas looks like a left-to-right chain of nodes: ### Canvas controls Bottom-left of the canvas: - **Zoom In** / **Zoom Out** - **Center View** - **Fix Layout** Scroll to pan. Right-click a node for **Delete** (or press Delete). ## Configure a step Click any node to open its configuration popover (or drawer on a narrow screen). Typical contents: - Name and description for the step - **Connection** when the app needs one (**Select a connection** or add a new one) - App-specific fields (text, options, dates, and so on) - Optional **Retry on Failure** and **Continue on Failure** Footer actions: | Button | Use it to | |---|---| | **Save** | Keep the form and close | | **Save & Test** | Run this step with **Use Mock Data** or **Use Real Data** (and validate conditions on some triggers) | | **View Output** | Inspect the last test result when available | If the form asks for a connection, choose one before Save or Save and Test. Dynamic option lists often stay empty until a connection is selected. Dynamic fields can insert [variables](/guides/variables/use-in-workflows) and outputs from earlier nodes with the **+** picker on the field. ## Save, activate, and run | Control | Behaviour | |---|---| | Adding or connecting nodes | Persists structure automatically | | Header **Save** | Saves the workflow (toast **Workflow saved**) | | **Active** switch | Marks the workflow active or inactive; on the builder, click **Save** after toggling so the change persists | | **Manually Run** trigger | Use when you want to start a run yourself after the workflow is ready | | Schedule / webhook / app triggers | Fire according to their configuration once the workflow is active and saved | Rename the workflow from the title in the builder header when you want a clearer name than **Untitled Workflow**. ## Tips - Prefer **Manually Run** while you learn, then switch the trigger when the path is solid. - Use **Save & Test** on each critical action before activating. - Yellow warning icons on nodes usually mean missing configuration or a failed validation. Open the node and complete required fields. - You can leave **Build with AI** open and still edit the canvas by hand. See [Chat to workflow](/guides/workflows/chat-to-workflow). ## Next - [Triggers](/guides/workflows/triggers) - [Flow Control](/guides/workflows/flow-control) - [Chat to workflow](/guides/workflows/chat-to-workflow) - [Variables in workflows](/guides/variables/use-in-workflows) - [Export and import](/guides/workflows/export-and-import) - [Monitor executions](/guides/workflows/monitor-executions) - [Workflows overview](/guides/workflows) Source: https://docs.lunnoa.com/guides/workflows/build-on-the-canvas --- # Chat to workflow > Use Build with AI on the workflow canvas to describe a process and draft steps with an assistant. Chat to workflow is the **Build with AI** panel on the right of the workflow builder. You describe the process in plain language; the assistant interviews you like a business analyst and places steps on the same canvas you use for [Build on the canvas](/guides/workflows/build-on-the-canvas). Nodes created by chat are normal canvas steps. You can edit, test, insert, or delete them by hand at any time. ## Before you start 1. Open or [create a workflow](/guides/workflows/build-on-the-canvas). 2. Use the **Build with AI** panel on the right of the builder. 3. Set an **AI connection** and **model** in the panel (**Select model** / AI settings). Until those are set, the panel shows **Select an AI connection and model to start**. You need a workspace AI connection before you can chat. ## Build a draft with chat On the workflow builder, keep the **Build with AI** panel visible on the right. The empty state asks you to describe the process you want to automate. The assistant name is **Workflow Builder**. Open the model picker in the panel. Select an **AI connection** and a **Model**, then confirm. Those choices only steer the builder assistant, not runtime app actions unless an action uses the same connection. Write what should happen in business language, start to finish if you can. Include: - How the run should start (manual, schedule, webhook, or an app event) - Systems involved (apps, inboxes, files, agents) - Decisions, approvals, or waits - The outcome you want The assistant usually restates a short process outline for you to confirm, then places steps one at a time rather than building the whole canvas in one go. Watch nodes appear as the assistant works. Status lines in the panel show when it is updating the graph. Open any node to check fields, connections, and yellow warning icons. Complete missing connections and required fields. Use **Save & Test** on critical steps. When the path looks right, turn **Active** on and click **Save** in the header. Details: [Build on the canvas](/guides/workflows/build-on-the-canvas). ## What to expect | Behaviour | Detail | |---|---| | Interview style | Like a business analyst: first a plain-language process description and a short outline to confirm, then one step at a time on the canvas | | Canvas updates | Tools in the panel add or change nodes; you stay on the same builder | | Mixed editing | You can type in chat and still click **+**, drag edges, or delete nodes | | Saved conversation | After the workflow is saved, the chat is stored with that workflow. Refresh or leave and return to continue. Use **Clear conversation** in the panel header to start over (canvas unchanged) | | Agent handoff | If a step needs an agent (tools, persona, multi-step work), the assistant creates a **draft agent**, wires **Message Agent**, and links you to finish tools and knowledge | | Hidden views | The panel is hidden on execution review and workflow template views | The workflow builder uses its own canvas tools (list workspace resources including triggers, set trigger, add or change steps, configure schedules, create draft agents). It does **not** use the agent platform tools such as Search Available Triggers. Full comparison: [Builder tools](/guides/agents/builder-tools). Simple AI steps (summarise, extract, decide) can use the built-in **AI** app. Steps that need tools or a reusable role get a [draft agent](/guides/agents/create-and-configure) created for you. Open the link in chat to add tools and knowledge, then continue the workflow interview. ## Prompt tips - Start with the trigger: “When a form is submitted…” or “Every weekday at 09:00…” - Name the apps you already use in Automate when you know them. - Call out human gates: “Request approval from Finance before sending.” - Prefer one clear process per chat. For a second process, create another workflow. ## After the draft | Next job | Guide | |---|---| | Finish a draft agent from chat | [Create and configure](/guides/agents/create-and-configure) | | Configure triggers in detail | [Triggers](/guides/workflows/triggers) | | Add approvals, branches, or waits | [Flow Control](/guides/workflows/flow-control) | | Insert shared values | [Variables in workflows](/guides/variables/use-in-workflows) | | Name, tags, metrics, Active | [Settings](/guides/workflows/settings) | | Check runs after you go live | [Monitor executions](/guides/workflows/monitor-executions) | ## Related - [Builder tools](/guides/agents/builder-tools) - [Build on the canvas](/guides/workflows/build-on-the-canvas) - [Workflows overview](/guides/workflows) - [AI agents](/guides/agents) Source: https://docs.lunnoa.com/guides/workflows/chat-to-workflow --- # Triggers > Choose how a workflow starts with Manually Run, Recurring Schedule, Listen for Webhook, or an app event. Every workflow needs exactly one **trigger**. The trigger decides when a run starts. Built-in options live under **Flow Control**; app events sit under **Apps**. This page explains the three Flow Control triggers. For how to place a trigger on the canvas, see [Build on the canvas](/guides/workflows/build-on-the-canvas). For built-in steps after the trigger, see [Flow Control](/guides/workflows/flow-control). ## Pick a trigger On a new workflow, click **Select a trigger...** (or the **+** on the empty placeholder). Flow Control triggers appear at the top of the menu. App triggers are listed under **Apps**. Use **Search** to jump to a name. Deleting the trigger turns it back into **Select a trigger...**. You cannot remove the trigger slot entirely. ## Manually Run Use **Manually Run** when you want to start a run yourself (or from another workflow or an agent). It is the simplest trigger while you design and test. Click the node to open its settings. You can optionally add **input** fields so each run asks for values. Use **Save & Test** or **Save** when you are done. Good for: - Learning the canvas and testing step by step - Workflows you start on demand from the builder or another process - Agent-requested runs when the trigger is available to agents ## Recurring Schedule Use **Recurring Schedule** when the workflow should run on a calendar (daily, weekly, and so on). Open the node and set: | Field | Purpose | |---|---| | **Start** | When the schedule begins (required) | | **Repeats** | How often it runs (appears after **Start** is set) | Save the trigger, turn **Active** on, and click **Save** in the header so the schedule can fire. **Recurring Schedule** starts new runs on a timetable. The Flow Control **Wait** and **Schedule** *actions* pause an *already running* execution. See [Flow Control](/guides/workflows/flow-control). ## Listen for Webhook Use **Listen for Webhook** when an external system should start the workflow with an HTTP request. Open the node and set: | Field | Purpose | |---|---| | **Unique Webhook URL** | The URL for this workflow (copy it into the other system) | | **HTTP Method** | **POST**, **PUT**, or **GET** (must match what the caller sends) | Use **Save & Listen** or **Save**, then activate and save the workflow so Automate accepts requests. ## App triggers Many connected apps also offer triggers (for example “new email” or “new file”). They appear under **Apps** in the same picker. You usually need a **connection** for that app before the trigger can run. See [Integrations](/guides/integrations). ## Next - [Flow Control](/guides/workflows/flow-control): built-in actions after the trigger - [Build on the canvas](/guides/workflows/build-on-the-canvas): place and connect steps - [Chat to workflow](/guides/workflows/chat-to-workflow): describe the process and let AI place the trigger Source: https://docs.lunnoa.com/guides/workflows/triggers --- # Flow Control > Use built-in Flow Control actions for approvals, branches, loops, waits, and other workflow logic. **Flow Control** is the built-in app for workflow logic. It does not need a connection. Use it for approvals, branches, loops, waits, and calling other workflows. Triggers such as **Manually Run** also belong to Flow Control; those are covered in [Triggers](/guides/workflows/triggers). This page covers **actions** you add after the trigger. ## Add a Flow Control action 1. Click **+** on a node (or on a connection line) to open the action picker. 2. Under **Popular**, open **Flow Control**. 3. Pick an action, or use **Search** to jump to a name. ## What you can build with Group by job (not every action needs its own page): ### Approvals and human input | Action | Use it to | |---|---| | **Request Approval** | Pause until eligible people approve or reject | | **Get Input Data** | Wait for a user to enter custom data, then continue | | **Manually Decide Path** | Wait for a person to pick which branch to take | | **Pause** | Stop until someone continues the run manually | Approvers work from the [Approvals inbox](/guides/approvals) in Automate when a run is waiting. ### Branches | Action | Use it to | |---|---| | **Conditional Paths** | Split the flow when conditions match | | **Merge Paths** | Wait for branches to finish before continuing | | **Manually Decide Path** | Let a person choose the branch at runtime | ### Loops | Action | Use it to | |---|---| | **For Each** | Run the following steps once per item in a list | | **Repeat** | Repeat a block a fixed number of times or until a condition | | **Loop Collector** | Collect results from a loop body | | **String List Loop** | Run another workflow for each item in a comma-separated list | ### Time | Action | Use it to | |---|---| | **Wait** | Pause for a duration (for example 30 minutes), then continue | | **Schedule** | Resume at a specific time or offset | If a **Wait** is longer than two minutes, the execution status moves to **Scheduled** until it resumes. ### Call other workflows and finish | Action | Use it to | |---|---| | **Run Workflow** | Start another workflow from this one | | **Output Workflow Data** | Return data for an agent or a parent workflow | | **Stop and Delete Execution** | End the run and remove it (requires typing **DELETE** to confirm) | ## Example canvas A simple Flow Control chain might look like this: start manually, request approval, then wait before the next step. ## Tips - Prefer **Manually Run** while you learn, then add Flow Control actions one at a time and **Save & Test** where available. - Yellow warning icons usually mean missing required fields. Open the node and complete them. - Flow Control actions do not need an integration connection. App actions under **Apps** often do. - For how runs start, see [Triggers](/guides/workflows/triggers). ## Next - [Triggers](/guides/workflows/triggers) - [Build on the canvas](/guides/workflows/build-on-the-canvas) - [Chat to workflow](/guides/workflows/chat-to-workflow) - [Variables in workflows](/guides/variables/use-in-workflows) - [Approvals](/guides/approvals) Source: https://docs.lunnoa.com/guides/workflows/flow-control --- # Workflow settings > Configure name, description, tags, metrics, and Active so workflows stay findable and ready to run. Workflow settings cover metadata and run readiness for the whole workflow. They are separate from the fields on individual trigger and action nodes. Open settings from the builder with the **gear** icon (or go to `/workflows//settings`). The left nav has **General**, **Tags**, and **Metrics**. ## What matters most | Setting | Why it matters | Where | |---|---|---| | **Name** | How the workflow appears in lists, search, and links. Keep it short and specific. | General (also editable in the builder title) | | **Description** | Explains purpose for teammates and future you. Does not affect execution. | General | | **Active** | When off, Automate will not run or poll the workflow. Turn on only when the graph is ready. | Builder header (save with **Save**) | | **Tags** | Filter and group workflows in the list. Optional. | Tags | | **Metrics** | Estimate business impact (time, money, items, errors) for reporting. Optional. | Metrics | Timeouts, retries, webhooks, schedules, and connections live on **nodes**, not in workflow settings. Use the canvas to configure those. ## Open settings From [Workflows](https://automate.lunnoa.com/workflows), open the workflow you want to edit so you land on the canvas. In the builder header, click the **settings (gear)** control. Automate opens **Workflow Settings** on the **General** page. Switch between **General**, **Tags**, and **Metrics** in the left sidebar. Changes on General need **Save changes**. Tags and Metrics save as you edit. ## General ### Name - **Required.** - Max length 100 characters. - Use a name that says what the workflow does (for example `Invoice PDF to Finance Slack`), not a generic label like `Test 3`. - You can rename from General or by editing the title on the canvas. ### Description - **Optional**, but recommended for shared workspaces. - Max length 1000 characters. - Write who it is for, when it should run, and any caveats (for example “Do not activate until the Accounting connection is shared”). - Descriptions help people decide whether to open or duplicate a workflow; they are not shown to end users of your automations. ### Create Template On General, **Create Template** saves the current workflow as a reusable template under Workflow Templates. Use this when the graph is a pattern you want to reuse in the workspace. Full steps: [Templates](/guides/workflows/templates). ### Delete workflow Under **Danger Zone**, **Delete workflow** permanently removes the workflow. Prefer turning **Active** off if you only want to stop runs. ## Active (on the canvas) The **Active** switch sits in the builder header, not on the General form. | State | Effect | |---|---| | **Active** on (and saved) | Triggers can fire; schedules and polls run as configured | | **Active** off | Runs and polling are rejected with a not-active error | Toggle the switch, then click **Save** so the change persists. New duplicates start inactive so you can review before going live. ## Tags Tags organise workflows for filtering. They are workspace-level labels you assign to one or more workflows. | Control | Purpose | |---|---| | **Assigned Tags** | Tags currently on this workflow | | **Available Tags** | Other workspace tags you can assign | | **New Tag** | Create a tag (**Tag Name** and **Color** required) | Use tags for ownership (`Team: Ops`), domain (`Finance`), or lifecycle (`Draft`, `Production`). Keep the set small so filters stay useful. ## Metrics Metrics estimate impact per successful run. They do not change how the workflow executes. | Metric | Typical meaning of **Expected value per run** | |---|---| | **Time Saved** | Hours saved each successful run | | **Money Saved** | Amount saved (for example CHF) each run | | **Items Processed** | Count of items handled each run | | **Error Reduction** | Error reduction percentage (or related value) each run | Enable a metric with its switch, then set **Expected value per run**. Automate can use these values for impact views; leave metrics off if you do not track business outcomes yet. ## Builder AI settings (optional) In the **Build with AI** panel, the model picker can set an **AI connection** and **Model** for chat-assisted building on this workflow. Those choices only affect the builder assistant, not runtime actions unless an action uses the same connection. ## Related - [Build on the canvas](/guides/workflows/build-on-the-canvas) - [Chat to workflow](/guides/workflows/chat-to-workflow) - [Templates](/guides/workflows/templates) - [Monitor executions](/guides/workflows/monitor-executions) - [Workflows overview](/guides/workflows) Source: https://docs.lunnoa.com/guides/workflows/settings --- # Templates > Save a workflow as a template and start new workflows from workspace or public templates. Templates are reusable workflow patterns. Browse them at [Templates](https://automate.lunnoa.com/workflow-templates) under **Build**. Create a template from an existing workflow when the graph is a pattern you want to reuse. A template is either in the workspace or public. ## Browse templates Open [Templates](https://automate.lunnoa.com/workflow-templates). Search by name or description. | Scope | What you see | |---|---| | **Workspace** | Templates in this workspace | | **Public** | Templates shared with all Lunnoa Automate users (reviewed before publish) | Each card shows the template name and the apps used in its trigger and actions. ## Use a template Go to [Templates](https://automate.lunnoa.com/workflow-templates) and find a card. **Use Template** opens a copy in the current workspace. Review nodes, set connections, and test. The copy is yours to edit. Turn **Active** on and **Save** when ready. See [Build on the canvas](/guides/workflows/build-on-the-canvas). ## Create a template from a workflow You need permission to create workflow templates (typically Admin or Editor). Open the workflow you want to reuse so you land on the canvas. Click the **settings (gear)** control in the builder header. Stay on **General**. Under **Create Template**, save the current workflow as a template. Automate shows **Template created** with a link to **View Templates**. The template keeps the graph structure for reuse. Prefer a clear [name and description](/guides/workflows/settings) on the source workflow before you create the template. ## Share a template From a template card’s **⋮** menu (when available): | Action | Effect | |---|---| | **Share with Workspace** | All workspace members can use it. Connections are removed and node outputs are stripped. You cannot unshare later; you can delete the template. | | **Share to Public** | Available to all Lunnoa Automate users after review. Variables, connections, and outputs are stripped. Lunnoa Labs emails can share publicly. | ## Templates vs export | Approach | Best for | |---|---| | **Templates** | Patterns inside Automate; browse and **Use Template** | | **Export and import** | A portable `.lunnoa-workflow` file across environments | See [Export and import](/guides/workflows/export-and-import). ## Related - [Settings](/guides/workflows/settings): Create Template on General - [Build on the canvas](/guides/workflows/build-on-the-canvas) - [Export and import](/guides/workflows/export-and-import) - [Workflows overview](/guides/workflows) Source: https://docs.lunnoa.com/guides/workflows/templates --- # Export and import > Share workflow graphs as .lunnoa-workflow files and import them into a workspace. Export and import move a workflow’s **structure** between workspaces or environments. Use them to share a solution with a teammate, back up a graph, or promote a design from staging to production. Open [Workflows](https://automate.lunnoa.com/workflows) for both actions. Exports omit connection secrets, agent assignments, and execution history. After import, configure connections and agents on the canvas before you activate. ## What is included | Included | Not included | |---|---| | Name and description | Connection credentials | | Nodes and their field configuration | Agent assignments | | Edges and layout | Execution history and output data | The download is a `.lunnoa-workflow` file (JSON). Import also accepts a compatible `.json` file. ## Export a workflow You need the **workflows:export** permission (typically Admin or Editor). Go to [Workflows](https://automate.lunnoa.com/workflows). Find the workflow. Click the **⋮** menu on that row. Choose **Export**. Confirm in the **Export Workflow** dialog. Automate downloads `workflow-name.lunnoa-workflow` and shows **Workflow exported successfully**. The dialog reminds recipients that they must configure connections and other dependencies after import. ## Import a workflow You need the **workflows:import** permission (typically Admin or Editor). On the Workflows page, click **Import** (next to **New Workflow**). Drag and drop a `.lunnoa-workflow` or `.json` file, or browse to select one. Automate validates the file (maximum 10 MB) and shows a preview: name, description, node count, trigger type, and required apps. Confirm or edit the **Name**. The workflow is created in the current workspace. Click **Import**. Automate creates the workflow and opens it in the builder. The new workflow is always **inactive**. Select or create connections for each app, assign agents if needed, and review node fields. Use **Save & Test** where useful. Turn **Active** on and click **Save** only when the path is ready. ## Duplicate vs export | Action | When to use it | |---|---| | **Duplicate** (row **⋮** menu) | Copy inside the same workspace and keep editing | | **Export / Import** | Move or share a file across workspaces or environments | ## Troubleshooting | Problem | What to try | |---|---| | Invalid file type | Use `.lunnoa-workflow` or `.json` from a Lunnoa export | | Validation error | Re-export from the source workflow; avoid editing the file by hand | | File too large | Keep under 10 MB | | Missing apps after import | Install or enable the required apps, then set connections on each node | ## Related - [Templates](/guides/workflows/templates): reuse patterns without a file download - [Build on the canvas](/guides/workflows/build-on-the-canvas): finish connections after import - [Settings](/guides/workflows/settings): Active, name, and description - [Workflows overview](/guides/workflows) Source: https://docs.lunnoa.com/guides/workflows/export-and-import --- # Monitor executions > Track workflow runs under Executions, open details, and clean up history. **Executions** is the list of workflow runs across your workspace. Use it to confirm schedules fired, investigate failures, and open the canvas for a specific run. Open [Executions](https://automate.lunnoa.com/executions) under **Observability** in the sidebar. ## Open the list Go to [Executions](https://automate.lunnoa.com/executions). Each row shows the workflow name, run number, status, and timing. | Column | What it shows | |---|---| | **Workflow** | Name of the workflow (opens the workflow) | | **Workflow Run #** | Run number (opens that execution’s detail) | | **Status** | Current or final state of the run | | Timing | When the run started and how long it took | Filter by workflow when you only care about one automation. ## Statuses | Status | Meaning | |---|---| | **Running** / **Retrying** | The run is in progress | | **Success** | Finished without a failing step | | **Failed** | A step failed | | **Needs Input** | Waiting for a person (for example approval); may show **Approval pending** | | **Waiting** | Paused for input or an external event | | **Scheduled** | Waiting until a later time (for example a long **Wait** action) | Open the info icon on a row when a status message is available. ## Open a run On [Executions](https://automate.lunnoa.com/executions), locate the row by workflow name, status, or filter. Click the **Workflow Run #**, or open the row **⋮** menu and choose **Open Execution**. Automate opens the execution detail for that run (timeline and step results). From the same **⋮** menu, choose **Open Workflow** to jump to the builder for that workflow. From detail you can review which step ran, outputs, and error text when a run failed. Fix the workflow on the canvas, then trigger a new run when ready. ## Delete an execution From the row **⋮** menu, choose **Delete** and confirm. Deleted executions cannot be recovered. Prefer deleting only when you are cleaning history, not as a substitute for fixing a failed workflow. ## Related operations | Job | Where | |---|---| | Approve or reject a waiting step | Approvals inbox (when status is **Needs Input** for an approval) | | Change whether new runs can start | [Settings](/guides/workflows/settings) (**Active**) | | Test a single step while building | [Build on the canvas](/guides/workflows/build-on-the-canvas) (**Save & Test**) | ## Related - [Flow Control](/guides/workflows/flow-control): Wait, Schedule, and Request Approval behaviour during a run - [Triggers](/guides/workflows/triggers): how new runs start - [Workflows overview](/guides/workflows) Source: https://docs.lunnoa.com/guides/workflows/monitor-executions --- # AI agents > Create AI assistants that can answer questions, use tools, search knowledge, and help run business processes. AI agents are assistants you configure in a workspace. A good agent has a clear job, an AI connection and model, instructions, and only the tools or knowledge it needs to do useful work. Open [Agents](https://automate.lunnoa.com/agents) under **Build**. The model gives the agent language ability. Instructions tell it how to behave. Tools, knowledge, apps, and MCP connections decide what it can actually do. ## In this guide | Topic | Start here | |---|---| | Create the agent, choose AI settings, and write instructions | [Create and configure](/guides/agents/create-and-configure) | | Understand every Configure option | [Configuration reference](/guides/agents/configuration-reference) | | Give the agent access to tools, knowledge, skills, and MCP integrations | [Tools, knowledge, and skills](/guides/agents/tools-knowledge-and-skills) | | What the agent builder vs workflow builder assistants can do | [Builder tools](/guides/agents/builder-tools) | | Chat with the agent, review conversations, and share it safely | [Chat and share](/guides/agents/chat-and-share) | ## Setup order Follow this order for a new agent: | Step | Why it matters | |---|---| | **1. Create the agent in the workspace** | The workspace owns the agent, along with related workflows, knowledge, and permissions | | **2. Set AI connection and model** | The agent cannot answer properly until it knows which AI provider and model to use | | **3. Write profile and instructions** | The agent needs a job description, boundaries, and tone | | **4. Add tools and knowledge** | Only add access the agent needs for the process it supports | | **5. Chat, test, and share** | Test with realistic prompts before teammates rely on it | ## What you configure | Area | What it controls | Where | |---|---|---| | **Profile & instructions** | Agent name, description, avatar, and behaviour rules | **Configure** | | **AI settings** | AI connection and model | **Configure** | | **Dynamic discovery** | Whether the agent can adapt its setup while building | **Configure** | | **Objects** | Business object types and records the agent can access | **Configure** | | **Tools** | Built-in actions and external MCP integrations | **Configure** | | **Knowledge** | Notebooks the agent can search | **Configure** | | **Skills** | Reusable capability packs when enabled for your workspace | **Configure** | | **Sharing** | Public or shared access settings | **Sharing** tab | Editors see the main chat tab as **Build** because they can both chat and shape the agent. View-only users may see it as **Chat**. ## Good agent design Citizen developers usually get better results by starting narrow: - One agent should own one business job, such as “triage supplier emails” or “answer policy questions”. - Give instructions that say what to do, what not to do, and when to ask a human. - Add knowledge only when the agent should answer from documents. - Add tools only when the agent needs to take action. - Test with examples before sharing with a wider group. ## Related - [Getting started](/guides/getting-started): build your first agent or workflow - [Configuration reference](/guides/agents/configuration-reference): every major Configure option - [Knowledge](/guides/knowledge): create notebooks for agents to search - [Apps](/guides/integrations): connect external systems - [MCP](/guides/mcp): connect MCP tool accounts - [Workflows](/guides/workflows): automate repeatable processes - [Variables](/guides/variables/use-with-agents): let agents read and update shared values Source: https://docs.lunnoa.com/guides/agents --- # Create and configure an agent > Create an agent, select its AI connection and model, and write instructions that make it useful for a business process. This guide takes you from a blank agent to a configured assistant that is ready to test. Do these steps before you invite teammates to use the agent. If **AI Connection** or **Model** is empty, the agent will not behave like a finished assistant. Choose both before you judge the agent's answers. ## Before you begin You need: - Permission to create agents - Access to at least one AI connection from your administrator If **AI Connection** is empty later, stop and ask an administrator to grant access to an AI connection. ## Create the agent Go to [Agents](https://automate.lunnoa.com/agents) under **Build**. Click **New Agent**. Fill **Agent Name**. Use a name that says what the agent does, such as `Policy Q&A` or `Supplier Invoice Assistant`. Click **Create**. Automate opens the new agent on the **Build** tab. ## Open Configure The **Build** tab is where you chat with the agent. Use **Configure** to decide how the agent behaves. Open the agent and click **Configure**. The centre of the configuration map contains **Core** settings: **Profile & instructions**, **AI settings**, and **Dynamic discovery**. If you do not see **Configure**, you can probably chat with the agent but cannot edit it. Ask an administrator for edit access. This page covers the first useful setup. For every panel and setting on Configure, including AI tuning, Objects, MCP integrations, and Skills, use the [Configuration reference](/guides/agents/configuration-reference). ## Choose AI connection and model Open **AI settings**. | Field | What it means | |---|---| | **AI Connection** | The provider account the agent uses, such as your organisation's approved OpenAI, Azure, or other model provider | | **Model** | The specific model the agent uses for reasoning and replies | | **Temperature** | How creative or focused replies should be | | **Max Tool Roundtrips** | How many tool-use loops the agent may try for one request | | **Message Lookback Limit** | How much recent conversation history the model sees | For citizen developers, the safest default is to use the connection and model your administrator recommends for normal workspace agents. Only change models when you understand the trade-off between cost, speed, and quality. On **Configure**, open **AI settings**. Choose **AI Connection**. If you see **No AI connections are available**, ask an administrator to grant access. Choose **Model**. The available models depend on the selected connection. Click **Done** when the panel has the connection and model you want. ## Write profile and instructions Open **Profile & instructions**. | Field | Recommendation | |---|---| | **Name** | Short, specific, and easy to recognise in lists | | **Description** | One or two sentences explaining who should use the agent and for what | | **Instructions** | The agent's job, limits, tone, and escalation rules | Good instructions are concrete. Instead of “help with invoices”, write: ```text You help the Finance team review supplier invoices. Ask for missing invoice number, supplier name, or amount before taking action. Do not approve payments. If an invoice looks unusual, ask Finance to review it. When you use knowledge, cite the document title in your answer. ``` ## Dynamic discovery **Dynamic discovery** controls how much the agent can adapt while you build or chat. Use it carefully: | Mode | Good for | |---|---| | On | Early experimentation, when you are still discovering what the agent needs | | Off | Stable agents used by teammates or shared externally | For production-style agents, turn dynamic behaviour off after setup so the agent stays predictable. ## Test before sharing Return to **Build** and ask realistic questions: - A simple question the agent should answer confidently - A question that requires a document or tool - A question the agent should refuse or escalate If the answer is wrong, adjust **Instructions**, remove unnecessary tools, or add the right [Knowledge](/guides/knowledge). ## Next - [Configuration reference](/guides/agents/configuration-reference) - [Tools, knowledge, and skills](/guides/agents/tools-knowledge-and-skills) - [Chat and share](/guides/agents/chat-and-share) - [AI agents overview](/guides/agents) Source: https://docs.lunnoa.com/guides/agents/create-and-configure --- # Configuration reference > Understand every major area on the agent Configure page and when to use each option. Use this page when you want to understand the full **Configure** surface for an agent. The goal is not to turn every setting on. The goal is to make deliberate choices so the agent is useful, predictable, and safe for the business process it supports. Open an agent from [Agents](https://automate.lunnoa.com/agents), then click **Configure**. ## Configuration map | Area | What it controls | Use it when | |---|---|---| | **Core** | Profile, instructions, AI settings, and dynamic discovery | Every agent | | **Objects** | Business object types and specific object records the agent can access | The agent should read or update structured records | | **Tools** | App actions, built-in actions, workflow actions, and MCP integrations | The agent should do something, not only answer | | **Knowledge** | Knowledge notebooks the agent can search | The agent should answer from documents | | **Skills** | Reusable skill packs you are allowed to use in this workspace | The agent needs packaged expertise or executable capabilities | ## Core: Profile & instructions Open **Profile & instructions** first. | Option | What it does | Citizen developer guidance | |---|---|---| | **Avatar** | Visual identity for the agent | Useful for shared agents, but not required | | **Name** | Label shown in lists, chat, and agent switchers | Use a job-based name, not a person's name | | **Description** | Short explanation of what the agent does | Write who should use it and what business process it supports | | **Instructions** | Behaviour rules sent to the model | Include job, boundaries, escalation rules, source rules, and tone | Good instructions are specific: ```text You help the Finance team review supplier invoice questions. Ask for missing supplier, amount, or invoice number before taking action. Do not approve payments. If approval is needed, ask the user to start the approval workflow. Use the Finance policy notebook for policy questions and say when the notebook does not answer. ``` ## Core: AI settings Open **AI settings** to choose the model connection and tune runtime behaviour. | Option | What it does | Default habit | |---|---|---| | **AI Connection** | Approved provider account the agent uses | Choose the admin-approved connection for the team | | **Model** | Specific model used for replies and reasoning | Use the recommended model unless you know why to change | | **Temperature** | Controls randomness; lower is more focused, higher is more creative | Keep lower for policy, finance, and operations agents | | **Max Tool Roundtrips** | Limits how many tool-use loops the agent can perform for one request | Keep modest; raise only for multi-step research or actions | | **Frequency Penalty** | Reduces repetition of the same phrases | Usually leave at default | | **Presence Penalty** | Encourages the model to introduce new topics | Usually leave at default for business agents | | **Max Retries** | Number of retries when the AI call fails | Use a small number for important shared agents | | **Message Lookback Limit** | How many recent chat messages are sent back as context | Raise for long discovery chats; lower to reduce token usage | | **Task Naming Instructions** | Instructions for naming new conversations/tasks | Use when conversation names should follow a team convention | First choose AI Connection and Model, write instructions, and test. Change sliders only when you see a specific problem, such as too much creativity, too many tool attempts, or long conversations losing context. ## Core: Dynamic discovery **Dynamic discovery** controls whether the agent can help maintain its own build setup while you work. | Option | What it does | Use carefully when | |---|---|---| | **Agent-maintained instructions** | Master mode that lets the agent maintain instruction sections during build work | You are still shaping the agent through conversation | | **Auto-discover workspace actions** | Lets the build kit discover workspace actions | The agent needs to find relevant app/workflow actions | | **Auto-discover MCP servers** | Lets the build kit discover MCP servers | The agent needs to find MCP tools | | **Instruction progress** | Shows whether important instruction sections have content | You want a readiness check for role, task structure, project structure, and rules | For a stable shared agent, review dynamic settings before sharing. If public sharing is blocked, the panel shows the reason. Dynamic discovery turns on **agent builder** platform tools (search/propose actions, MCP, skills, knowledge, instructions, and related helpers). It does not give the agent its own triggers. Those belong on workflows. See [Builder tools](/guides/agents/builder-tools). If **Other** still lists **Search Available Triggers** or **Propose Agent Trigger**, ignore them. They are leftovers and are not used by the agent builder. ## Objects Open **Objects** when the agent should use structured business records, not just free-text documents. | Option | What it does | |---|---| | Search | Finds object types or objects | | Object type switch | Enables tools for a whole type, such as customers, suppliers, or assets | | Pinned object switch | Gives the agent access to a specific record | Use object types for repeatable records. Pin individual objects when the agent should work with a small known set. ## Tools Open **Tools** when the agent needs to take action. Tools can include: - Built-in Automate actions - App actions from connected services - Workflow actions - MCP integrations Each tool increases what the agent can do. Add tools gradually and test with prompts that should and should not use the tool. ## MCP integrations MCP integrations are configured from **Tools**, but require a separate account connection first. | State | Meaning | |---|---| | Not connected | The user still needs to connect the MCP account | | Connected | The account is connected on the MCP page | | Enabled on agent | This specific agent can use the MCP integration | | Default connection | Runtime chooses the user's default account unless another connection is pinned | See [Enable MCP on agents](/guides/mcp/enable-on-agents). ## Knowledge Open **Knowledge** when the agent should answer from notebooks. | Option | What it does | |---|---| | **Search notebooks...** | Finds notebooks by name or description | | Notebook switch | Enables or removes that notebook for the agent | | Enabled count | Shows how many notebooks the agent can search | | **Go to Knowledge** | Opens Knowledge when no notebooks exist | Upload alone is not enough. The notebook must be enabled here. ## Skills Open **Skills** when the workspace has Skills enabled. | Option | What it does | |---|---| | **Search skills...** | Finds available skills | | Type filter | Filters skills by type | | Knowledge skills | Add context and expertise | | Executable skills | Add actions the agent can use | | Skill details | Shows the skill description and metadata before enabling | If Skills are disabled, the panel says **Skills are not enabled in this workspace** and tells you to contact an administrator. ## Recommended configuration order 1. **Profile & instructions** 2. **AI settings** 3. **Knowledge** if the agent answers from documents 4. **Tools** and **MCP integrations** if the agent takes action 5. **Objects** if the agent works with structured records 6. **Skills** if your workspace uses them 7. **Dynamic discovery** review before sharing 8. Test in **Build** ## Related - [Create and configure](/guides/agents/create-and-configure) - [Tools, knowledge, and skills](/guides/agents/tools-knowledge-and-skills) - [Chat and share](/guides/agents/chat-and-share) - [Knowledge](/guides/knowledge) - [MCP](/guides/mcp) Source: https://docs.lunnoa.com/guides/agents/configuration-reference --- # Tools, knowledge, and skills > Give an agent controlled access to actions, documents, MCP integrations, and workspace skills. Agents become useful when they can do more than answer from memory. In Automate, you extend an agent with **Tools**, **Knowledge**, and **Skills** from the **Configure** page. Use the least access that solves the job. A focused agent is easier to test, easier to explain, and safer for teammates to use. ## What each area is for | Area | Use it when | |---|---| | **Tools** | The agent should take an action, call an app, run a workflow, or use an MCP integration | | **Knowledge** | The agent should answer from uploaded documents or saved text | | **Skills** | Reusable capability packs granted to everyone, to your workspace, or to a role you hold here | | **Objects** | The agent should read or update structured business records | This guide focuses on the high-priority setup for tools, knowledge, MCP, and skills. ## Open the configuration areas Go to [Agents](https://automate.lunnoa.com/agents), then open the agent you want to configure. Click **Configure**. Use the side areas on the configuration map: **Tools**, **Knowledge**, or **Skills**. ## Tools **Tools** are actions the agent can call. Some tools are built into Automate. Others come from apps, workflows, or MCP servers. Before you enable a tool, ask: - What exact job should the agent use this tool for? - Should the agent ask the user before taking the action? - Does the tool need a connection owned by the user or workspace? - What would a safe failure look like? Add tools gradually. Test each one with a prompt that should use it and a prompt that should not use it. ## MCP integrations MCP integrations appear under **Tools** as **MCP Integrations**. They let an agent use tools from an external MCP server. There are two layers: | Layer | Where it happens | |---|---| | Connect your account to an MCP server | [MCP](/guides/mcp) under **Connect** | | Enable that MCP server on an agent | Agent **Configure → Tools → MCP Integrations** | A user can connect an MCP account and still not have it enabled on a specific agent. Link the MCP integration in the agent's **Tools** area before expecting the agent to use it. When you enable an MCP integration, choose the connection if Automate asks. Use **Default** only when your team has agreed which connection should be used. ## Knowledge **Knowledge** gives the agent documents or saved text to search. Uploading files to a notebook is not enough by itself; the notebook must also be enabled on the agent. Create the notebook under [Knowledge](/guides/knowledge), then add text or files. In the agent, go to **Configure → Knowledge**. Use **Search notebooks...** when there are many notebooks. Turn on the switch for the notebook. The footer shows how many notebooks are enabled. Return to **Build** and ask a question that should be answered from the notebook. If the answer is vague, improve the document or add clearer instructions. More documents do not automatically make an agent better. Start with the documents that match the agent's job, then add more only when tests show a gap. ## Skills **Skills** are reusable capability packs. A skill is available when a SuperAdmin has granted it to everyone, to your workspace, or to a role you hold in that workspace. If none of those grants match you, the Skills area may show that they are unavailable. When Skills are available: - Add only skills that match the agent's purpose. - Keep instructions clear about when the skill should be used. - Test a prompt that should trigger the skill and one that should not. If you are unsure whether a skill is safe for a shared agent, ask an administrator before enabling it. ## A safe access checklist Before you share an agent, check: | Question | Why it matters | |---|---| | Does the agent have only the tools it needs? | Reduces accidental actions | | Are knowledge notebooks narrow and current? | Improves answer quality | | Are app and MCP accounts connected? | Prevents tool failures during chat | | Do instructions say when to ask a human? | Keeps business decisions controlled | | Have you tested success and refusal examples? | Confirms the agent's boundaries | ## Related - [Create and configure](/guides/agents/create-and-configure) - [MCP](/guides/mcp) - [Knowledge](/guides/knowledge) - [Apps](/guides/integrations) - [Chat and share](/guides/agents/chat-and-share) Source: https://docs.lunnoa.com/guides/agents/tools-knowledge-and-skills --- # Agent builder and workflow builder tools > What each Build with AI assistant can do, and why triggers belong on workflows rather than agents. Automate has two Build with AI assistants. They look similar in chat, but they use **different tools** for different jobs. | Assistant | Where you use it | Job | |---|---|---| | **Agent builder** | Agent **Build** chat while you configure an agent | Shape the agent: instructions, actions, MCP, skills, knowledge, drive, starters | | **Workflow builder** | Workflow canvas **Build with AI** panel | Shape the workflow: trigger, steps, field values, and draft agents for Message Agent | They do not share the same tool list. Enabling a platform tool on an agent does not give those tools to the workflow builder, and the reverse is also true. Agents do not have their own triggers. When something should run automatically (schedule, webhook, or app event), build a [workflow](/guides/workflows/triggers) with that trigger and a **Message Agent** step. The agent builder will point you to Workflows instead of attaching a trigger on the agent. ## Side-by-side | Capability | Agent builder | Workflow builder | |---|---|---| | Place or change a **trigger** | No | Yes | | Add or rearrange **workflow steps** | No | Yes | | Draft or update **agent instructions** | Yes | No (can create a draft agent, then you finish it on the agent) | | Discover and propose **actions / MCP / skills / knowledge** for the agent | Yes | No | | List workspace apps, connections, triggers, actions, and agents | Via discovery tools for the agent | Yes, to choose what to put on the canvas | | Create a **draft agent** for Message Agent | No | Yes | ## Workflow builder tools Used in [Chat to workflow](/guides/workflows/chat-to-workflow). These tools edit the canvas and workspace resources. They are **not** the checkboxes under agent AI settings. ### Discovery and planning | Kind of tool | What it does | |---|---| | List workspace resources | Shows apps, connections, **triggers**, actions, and agents you can reuse | | Graph summary | Summarises the current canvas before editing existing nodes | | Recommend apps | Suggests apps for a described step, preferring ones you already connected | | Build recurring schedule values | Turns a schedule description into Recurring Schedule field values | ### Canvas edits | Kind of tool | What it does | |---|---| | Set trigger | Places or replaces the workflow trigger type | | Append / insert / replace step | Adds or changes action nodes on the graph | | Add placeholder | Adds a named step when the process is clear but the app action is not | | Update node | Changes a node's display name or description | | Configure node | Sets field values on a trigger or action (for example schedule times) | | Update workflow | Updates the workflow name or description | ### Agent handoff | Kind of tool | What it does | |---|---| | Create draft agent | Creates an agent in the workspace (name, description, instructions), then you wire **Message Agent** and finish tools/knowledge on the agent | For schedules: the builder sets the Recurring Schedule **trigger type** first, then configures start time and recurrence with the schedule helper and configure-node tools. It does not use the old agent-trigger platform tools. ## Agent builder tools Used while you chat with an agent in **Build** mode. These are the **platform tools** under **Configure → AI settings** (and related dynamic discovery switches). They help the assistant maintain the agent. They do **not** edit a workflow canvas. ### Actions and apps | Tool (UI name) | What it does | |---|---| | Search Available Actions | Finds workflow-app actions the agent does not have yet | | List Available Actions | Lists actions for a specific app | ### MCP | Tool (UI name) | What it does | |---|---| | Search Available MCP Servers | Finds MCP integrations the user can access and the agent does not have attached | ### Skills | Tool (UI name) | What it does | |---|---| | Search Available Skills | Finds skills you can use that are not yet enabled on the agent | | Propose Skill Attachment | Proposes enabling a skill (you apply it in chat) | ### Knowledge | Tool (UI name) | What it does | |---|---| | Search Attached Knowledge | Searches notebooks already linked to the agent | | Propose Knowledge Attachment | Proposes linking a notebook | ### Instructions and starters | Tool (UI name) | What it does | |---|---| | Propose Agent Instructions | Proposes a full instruction document after guided discovery | | Propose Instruction Addition | Appends a rule to one instruction section | | Propose Instruction Section Update | Replaces one instruction section body | | Propose Suggested Prompts | Proposes welcome starter prompts for end users | ### Drive and memory | Tool (UI name) | What it does | |---|---| | Propose Drive Mount | Proposes a Google Drive or OneDrive working folder | | Drive save / list / read / share tools | Work with files after a drive is mounted | | Remember Fact / Recall Relevant Memories | Store and search memories when memory is enabled | Many of these turn on automatically when **Agent-maintained instructions** (dynamic discovery) is on. Details: [Configuration reference](/guides/agents/configuration-reference). ### Not used anymore on the agent builder | Tool (UI name) | Status | |---|---| | Search Available Triggers | Removed. Ignore if it still appears under **Other** | | Propose Agent Trigger | Removed. Ignore if it still appears under **Other** | Those entries may linger under **Other → Additional platform tools** as leftovers. They do nothing useful for agent build chat. Triggers belong on [workflows](/guides/workflows/triggers). ## How the two builders work together 1. Use the **workflow builder** when the process needs a trigger and a sequence of steps. 2. If a step needs a reusable agent with tools or knowledge, the workflow builder can create a **draft agent** and place **Message Agent**. 3. Open that agent and use the **agent builder** to finish instructions, tools, MCP, skills, and knowledge. 4. Keep the trigger on the workflow. Do not look for an agent-level trigger. ## Related - [Chat to workflow](/guides/workflows/chat-to-workflow) - [Triggers](/guides/workflows/triggers) - [Create and configure](/guides/agents/create-and-configure) - [Configuration reference](/guides/agents/configuration-reference) - [Tools, knowledge, and skills](/guides/agents/tools-knowledge-and-skills) Source: https://docs.lunnoa.com/guides/agents/builder-tools --- # Chat and share > Test an agent in the Build tab, review conversations, and share access safely. Use the **Build** tab to chat with an agent. Editors see **Build** because they can use the chat while improving the agent. View-only users may see the same area as **Chat**. Before you rely on the agent, complete [Create and configure](/guides/agents/create-and-configure), especially **AI Connection**, **Model**, and **Instructions**. ## Chat with an agent Go to [Agents](https://automate.lunnoa.com/agents) and open the agent. Click **Build**. If you only have view access, the tab may be labelled **Chat**. Type a question or task in the message box, then send it. Start with a simple test before asking for a complex business action. Check whether the agent followed instructions, used the right knowledge, and asked for missing information instead of guessing. ## Test like a citizen developer Use three types of prompts before sharing: | Test | Example | |---|---| | Normal success | “Summarise the refund policy for a customer who bought last week.” | | Missing information | “Send this to Finance.” The agent should ask what “this” is or which Finance channel to use. | | Boundary | “Approve this payment for me.” A safe finance agent should refuse or ask for human approval if not allowed. | When a test fails, change one thing at a time: instructions, knowledge, or tool access. Then test again. ## When the agent uses tools If the agent has tools, apps, or MCP integrations, it may need account access before it can finish a task. | Symptom | What to do | |---|---| | The agent says a connection is missing | Connect the app under [Apps](/guides/integrations) or the MCP account under [MCP](/guides/mcp) | | The agent picked the wrong tool | Remove unnecessary tools or make instructions more specific | | The tool failed | Reconnect the app, check required fields, then retry | | The action is sensitive | Add instructions that require confirmation before using the tool | ## Review conversations Past agent conversations appear under **Conversations** in the Observability section. Use them to understand what happened after a teammate used an agent. Reviewing conversations helps you answer: - What did the user ask? - Which tools or knowledge did the agent use? - Did the agent get stuck because access was missing? - Should the agent instructions be clearer? ## Share safely Use **Sharing** when you want other people to use the agent. Before sharing: 1. Turn off experimental or dynamic setup behaviour unless your team intentionally uses it. 2. Check instructions for private information or internal-only notes. 3. Confirm tools and knowledge are safe for the audience. 4. Test with a user who is not the creator, because their app and MCP connections may differ. A shared agent may be visible to another user, but tools can still fail if that user does not have the required app or MCP connection. ## Troubleshooting | Problem | Steps to try | |---|---| | Agent does not answer | Open **Configure → AI settings** and select **AI Connection** and **Model** | | No AI connections are available | Ask an administrator to grant access to an AI connection | | Agent ignores documents | Enable the right notebook under **Configure → Knowledge** and improve instructions | | Tool fails | Reconnect the app or MCP account, then test again | | No Configure tab | Ask for edit access to the agent | | Cannot share safely | Remove risky tools or make a separate agent for the public audience | ## Related - [Create and configure](/guides/agents/create-and-configure) - [Tools, knowledge, and skills](/guides/agents/tools-knowledge-and-skills) - [Apps](/guides/integrations) - [MCP](/guides/mcp) - [Knowledge](/guides/knowledge) Source: https://docs.lunnoa.com/guides/agents/chat-and-share --- # Apps > Connect external services so workflows and agents can read, write, and take actions with your accounts. Apps are the services Automate can work with, such as email, calendars, CRMs, storage, and business systems. You connect an app once, then use that connection in workflow steps or agent tools. Open [Apps](https://automate.lunnoa.com/apps) under **Connect**. Use **Apps** when you need a normal business service connection. Use [MCP](/guides/mcp) when an agent needs tools from an MCP server. ## In this guide | Topic | Start here | |---|---| | Connect your own account to an app | [Connect an app account](/guides/integrations/connect-an-app-account) | | Understand admin-provided accounts | [Managed connections](/guides/integrations/managed-connections) | | Connect MCP accounts for agents | [MCP](/guides/mcp) | ## What an app connection does An app connection lets Automate call an external service with permission. For example: - A workflow can read a new email, create a ticket, or update a spreadsheet. - An agent can use a tool that searches a CRM or sends a message. - A template or imported workflow can ask you to reconnect apps before it runs. The connection belongs to an app, but each workflow step or agent tool still decides how it is used. ## Two kinds of access | Access type | What it means | |---|---| | **Connect Your Accounts** | You sign in or provide credentials for your own account | | **Managed Connections** | An administrator has configured the connection and granted it to everyone, to this workspace, or to a role you hold here | Managed connections are useful when a team should share one approved account, such as a support mailbox or company CRM connection. ## When you need an app connection You usually need a connection when: - A workflow step shows **Connection** or **Select a connection**. - An agent tool says an app account is missing. - A template or imported workflow opens with missing app configuration. - Dynamic option lists are empty until you choose a connection. ## Safe connection habits - Use clear connection names, such as `Finance Gmail` or `Salesforce - EU`. - Do not connect personal accounts for shared production workflows unless your team has approved that pattern. - Reconnect an app when a workflow starts failing because the token expired. - Delete old personal connections you no longer use. ## Related - [Connect an app account](/guides/integrations/connect-an-app-account) - [Managed connections](/guides/integrations/managed-connections) - [MCP](/guides/mcp) - [Workflows](/guides/workflows) - [AI agents](/guides/agents) Source: https://docs.lunnoa.com/guides/integrations --- # Connect an app account > Add an OAuth or credential-based app connection for workflows and agents. Use this guide when a workflow step, agent tool, or template asks for an app connection. You connect from the **Apps** page, then select that connection where the workflow or agent needs it. ## Connect your account Go to [Apps](https://automate.lunnoa.com/apps) under **Connect**. Use **Search apps...** or browse **Connect Your Accounts**. Apps show whether they are already connected or ready to connect. Click the app. Automate opens **Your Connections** for that app. Click **Add New Connection**. Fill **Connection Name**. Choose a name that tells teammates what account this is, such as `Marketing HubSpot` or `Support Gmail`. Click **Create**. For OAuth apps, a sign-in or authorisation window opens. Complete the external sign-in, then return to Automate. When Automate shows the connection was created, click **Done**. ## Use the connection After you connect the app: | Place | What to do | |---|---| | Workflow step | Open the node and select the app connection in **Connection** | | Agent tool | Open the agent, go to **Configure → Tools**, and choose the relevant account if the tool asks | | Imported workflow | Open each warning node and select or create a connection | ## Rename and disconnect Open the app's **Your Connections** list to manage existing personal connections. If you delete or disconnect an account, workflows and agents that used it can fail until they are updated. If a workflow runs on a schedule or webhook, disconnecting its app account can break future runs. Open the workflow first and check where the connection is used. ## Empty app list If the Apps page shows **No Apps Available**, your workspace may not have app access configured. Ask an administrator to enable apps or grant access. ## Related - [Apps overview](/guides/integrations) - [Managed connections](/guides/integrations/managed-connections) - [Build workflows](/guides/workflows/build-on-the-canvas) - [Tools, knowledge, and skills](/guides/agents/tools-knowledge-and-skills) Source: https://docs.lunnoa.com/guides/integrations/connect-an-app-account --- # Managed connections > Understand app connections that administrators configure and share for a workspace or team. Managed connections are app accounts configured by an administrator. Instead of every citizen developer connecting the same service separately, an admin can provide a shared connection with the right access and governance. You see them on [Apps](https://automate.lunnoa.com/apps) under **Managed Connections**. ## When managed connections help Managed connections are useful when: - A workflow should use a team account, not one person's personal account. - Access needs to be controlled by administrators. - A production workflow must keep running even if a user leaves. - Multiple workflows need the same approved business system connection. Examples include a support mailbox, a finance system account, or a workspace-approved CRM integration. ## How to use a managed connection Go to [Apps](https://automate.lunnoa.com/apps). Look under **Managed Connections**. These are pre-configured by your administrator. Open the workflow step or agent tool that needs the app. Select the managed connection when the form asks for **Connection**. ## What you can and cannot change | You can usually | You usually cannot | |---|---| | Select the managed connection in allowed workflows or agents | See or change the secret credentials | | Ask an admin to grant access | Delete the shared connection | | Report a broken connection | Change who else can use it | If a managed connection is missing from a workflow field, it may not be granted to this workspace or to a role you hold here. ## Personal vs managed | Question | Personal app connection | Managed connection | |---|---|---| | Who creates it? | You | Administrator | | Best for | Personal tasks, drafts, testing | Shared workflows, team automations, production | | What happens when you leave? | May stop working | Can continue if admin maintains it | | Who controls access? | Mostly you | Administrator | ## Request a managed connection When asking an administrator, include: - App name - Business process or workflow name - Workspace where it will be used - Account that should be connected - Whether it is for testing or production ## Related - [Apps overview](/guides/integrations) - [Connect an app account](/guides/integrations/connect-an-app-account) - [Build workflows](/guides/workflows/build-on-the-canvas) - [Adminspace overview](/guides/adminspace) Source: https://docs.lunnoa.com/guides/integrations/managed-connections --- # MCP > Connect MCP tool accounts and enable them on agents that need external tools. MCP connections let agents use tools from Model Context Protocol servers. Use MCP when a tool server gives the agent capabilities that are not covered by normal Apps. Open [MCP](https://automate.lunnoa.com/connections/mcp) under **Connect**. First connect your MCP account on the MCP page. Then enable that MCP integration on a specific agent under **Configure → Tools**. ## In this guide | Topic | Start here | |---|---| | Connect or reconnect your MCP account | [Connect MCP accounts](/guides/mcp/connect-accounts) | | Give an agent access to an MCP integration | [Enable MCP on agents](/guides/mcp/enable-on-agents) | ## MCP vs Apps | Use | Go to | |---|---| | Connect Gmail, HubSpot, Slack, Salesforce, or another business app | [Apps](/guides/integrations) | | Connect a tool server that exposes agent tools through MCP | [MCP](/guides/mcp) | | Configure which MCP tools an agent may use | [Enable MCP on agents](/guides/mcp/enable-on-agents) | ## Who controls availability Administrators grant each MCP server to everyone, to a workspace, or to a role. You see a server when one of those grants matches you in the workspace you are using. If you see **No MCP servers are available**, ask a SuperAdmin to grant the server. Once a server is available, users can connect their own accounts where the server supports per-user connection. Some custom MCP servers may use shared admin credentials instead. ## Related - [Connect MCP accounts](/guides/mcp/connect-accounts) - [Enable MCP on agents](/guides/mcp/enable-on-agents) - [Tools, knowledge, and skills](/guides/agents/tools-knowledge-and-skills) - [Apps](/guides/integrations) Source: https://docs.lunnoa.com/guides/mcp --- # Connect MCP accounts > Sign in to MCP tool servers so agents can use the right external account. Connect your MCP account before you enable an MCP integration on an agent. The account connection proves who the tool should act as when the agent uses it. Open [MCP Connections](https://automate.lunnoa.com/connections/mcp). ## Connect a new account Go to [MCP](https://automate.lunnoa.com/connections/mcp) under **Connect**. Use **Search integrations or connections...** or filter by **Not connected**. Click **Connect new account** for the server. In **New connection**, enter **Name**. Use a clear label such as `Personal`, `Work`, or `Client A`. Click **Continue**. Complete the external **Connect** step if a popup opens, then return to Automate. After the connection succeeds, the MCP page shows the server as connected. ## Manage an MCP connection Open the row menu to manage existing MCP connections. | Action | Use it when | |---|---| | **Re-connect** | The account expired or the tool server asks for authorisation again | | **Rename** | The label no longer tells users which account this is | | **Set as default** | This should be the default connection when an agent asks which account to use | | **Delete** | You no longer want this MCP account available | ## Why naming matters Agents can have more than one possible MCP connection. Clear names help builders pick the right account later in **Configure → Tools → MCP Integrations**. Good names: - `Work Gmail MCP` - `Client A Notion` - `Personal testing` Avoid names like `new`, `test`, or `main` once the connection is used in a shared agent. ## If Connect new account is missing Some custom MCP servers use shared admin credentials. Those servers may not show **Connect new account** on the MCP page. Ask a SuperAdmin how access is managed for that server. ## Related - [MCP overview](/guides/mcp) - [Enable MCP on agents](/guides/mcp/enable-on-agents) - [Tools, knowledge, and skills](/guides/agents/tools-knowledge-and-skills) Source: https://docs.lunnoa.com/guides/mcp/connect-accounts --- # Enable MCP on agents > Link an MCP integration to an agent and choose which account the agent should use. After you connect an MCP account, enable the integration on the agent that needs it. This second step is important: connected MCP accounts are not automatically available to every agent. ## Enable an MCP integration Go to [Agents](https://automate.lunnoa.com/agents), open the agent, then click **Configure**. Select **Tools** on the configuration map. In the Tools panel, find **MCP Integrations**. If the server is not connected, follow the prompt to connect it. If it is connected, choose the connection the agent should use. Turn on the integration for the agent, then click **Done**. ## Test the MCP tool Return to **Build** and send a prompt that should use the MCP integration. Test both: - A request that should use the MCP tool - A request that should not use the MCP tool If the agent overuses the MCP tool, tighten its instructions. If it never uses the tool, confirm it is enabled and the connection is selected. ## Common issues | Problem | What to check | |---|---| | Agent says the account is missing | Connect the MCP account under [MCP](/guides/mcp/connect-accounts) | | MCP server is not listed | Ask a SuperAdmin to grant the MCP server to this workspace or to a role you hold here | | Wrong account is used | Change the selected connection in **Configure → Tools → MCP Integrations** | | User cannot use a shared agent's MCP tool | That user may need their own MCP connection | ## Governance tips - Give shared agents only the MCP servers they need. - Use instructions that say when the agent should use the tool. - Avoid enabling broad external tools on agents shared outside the team. - Test with a non-owner user before relying on the agent in a process. ## Related - [MCP overview](/guides/mcp) - [Connect MCP accounts](/guides/mcp/connect-accounts) - [Tools, knowledge, and skills](/guides/agents/tools-knowledge-and-skills) - [Chat and share](/guides/agents/chat-and-share) Source: https://docs.lunnoa.com/guides/mcp/enable-on-agents --- # Approvals > Review pending workflow approval requests, approve or reject them, and understand how approval steps resume executions. Approvals are human decision points inside workflows. A workflow can pause at a **Request Approval** step, ask eligible people to decide, then continue based on the outcome. Open [Approvals](https://automate.lunnoa.com/approvals) under **Work**. The inbox shows requests that came from a workflow's **Flow Control → Request Approval** action. To build the approval step itself, see [Flow Control](/guides/workflows/flow-control). ## What you see The Approvals page has two tabs: | Tab | Purpose | |---|---| | **Pending** | Requests waiting for your decision | | **Done** | Requests you already approved or rejected | Each row can show: | Column | Meaning | |---|---| | **Title** | The approval request title from the workflow step | | **Workflow** | The workflow that created the request | | **Run #** | The execution run waiting for the decision | | **Status** | Whether the request is pending or already decided | | **Approvals** | How many approvals have been received, out of how many are required | | **Your decision** | Your recorded decision, when you have made one | | **Updated** | Last activity time | ## Decide on an approval Go to [Approvals](https://automate.lunnoa.com/approvals). On **Pending**, open the request you need to review. Automate opens a detail sheet. Read the title, instructions, workflow, run number, and any data shown by the workflow. If the context is not enough, do not guess; ask the workflow owner or reject with a useful comment. Fill **Comment (optional)** when the reason should be visible later. Comments help teammates understand why a request moved forward or stopped. Click **Approve** or **Reject**. Automate records the decision. The execution resumes when enough people have approved, or immediately when someone rejects. ## Who can decide The workflow builder chooses the approvers: specific people, workspace roles, or both. Set how many separate approvals are required. One means any single eligible person is enough. Someone who started the run can approve it when they are one of those people. If Automate says **Waiting for an eligible approver. You cannot decide on this request**, you can view the request but you are not one of the people allowed to decide it. ## What happens after a decision | Decision | Typical result | |---|---| | **Approve** | The workflow continues on the approved path once enough people have approved | | **Reject** | The workflow follows the rejected path | The toast says **Approved — execution resuming** or **Rejected — execution resuming**. ## For workflow builders Build approval steps from the workflow canvas: 1. Open a workflow. 2. Add **Flow Control → Request Approval**. 3. Set the title, instructions, approvers, and how many approvals are required. 4. Test the workflow with a small group before using it in production. Use clear titles and instructions. Approvers should not need to open five other systems to understand what they are approving. ## Related - [Flow Control](/guides/workflows/flow-control): create Request Approval steps - [Monitor executions](/guides/workflows/monitor-executions): see runs waiting for input - [Workflows](/guides/workflows) Source: https://docs.lunnoa.com/guides/approvals --- # Knowledge > Create notebooks of documents and text that AI agents can search when answering questions. Knowledge notebooks store documents and text that agents can search. Use them when an agent should answer from policies, manuals, FAQs, customer notes, or other internal material. Open [Knowledge](https://automate.lunnoa.com/knowledge) under **Data**. Adding documents to a notebook does not automatically make every agent use them. Create the notebook, add data, then enable that notebook on the agent. ## In this guide | Topic | Start here | |---|---| | Create a notebook and add text or files | [Create and upload](/guides/knowledge/create-and-upload) | | Enable notebooks on an agent and test answers | [Use with agents](/guides/knowledge/use-with-agents) | ## When to use Knowledge Use Knowledge when the agent should answer from source material that changes or is too detailed to put into instructions. Good examples: - HR policy documents - Product support FAQs - Process manuals - Contract templates and guidance notes - Internal knowledge base exports Avoid using Knowledge for secrets, passwords, API keys, or anything that should be handled as a protected credential. ## Notebook design Citizen developers get better results when notebooks are focused: | Better | Harder for agents | |---|---| | `HR leave policy` | `All HR files` | | `Support refund FAQ` | `Customer documents` | | `Supplier onboarding manual` | `Operations shared drive` | Name notebooks by the business topic, not by file format. Agents and teammates need to recognise what the notebook contains. ## How agents use notebooks When a notebook is enabled on an agent, the agent can search it during chat or tool use. Instructions still matter. Tell the agent when to use the notebook and how to cite or explain information from it. Example instruction: ```text Use the HR leave policy notebook when users ask about holidays, sickness, or unpaid leave. If the notebook does not answer the question, say that the policy does not cover it and suggest contacting HR. ``` ## Related - [Create and upload](/guides/knowledge/create-and-upload) - [Use with agents](/guides/knowledge/use-with-agents) - [AI agents](/guides/agents) - [Tools, knowledge, and skills](/guides/agents/tools-knowledge-and-skills) Source: https://docs.lunnoa.com/guides/knowledge --- # Create and upload > Create a knowledge notebook, add text or files, and prepare it for agents. Create a knowledge notebook when you want agents to search a specific set of business information. A notebook can contain direct text and uploaded files. ## Create a notebook Go to [Knowledge](https://automate.lunnoa.com/knowledge) under **Data**. Click **New Knowledge Notebook**. Empty workspaces may show **Create Knowledge Notebook** instead. In **New Knowledge**, enter **Knowledge Notebook Name** and **Description**. Click **Create**. Automate creates the notebook and opens it. ## Add data Inside a notebook, click **Add Data**. | Option | Use it when | |---|---| | **Enter Text** | You want to paste a policy, FAQ, notes, or a short reference section | | **Upload File** | You have a document file the agent should search | In the notebook, click **Add Data**. Select **Enter Text** or **Upload File**. Paste the text or choose the file. Use clear titles so future builders know what the item contains. ## Wait for processing Uploaded files may take time before all parts are searchable. If an agent cannot answer from a new file immediately, wait for processing to finish, then test again. ## Improve the source material Knowledge works best when the source is clear: - Use descriptive headings. - Split very large mixed documents into smaller topic-specific files. - Remove obsolete information. - Avoid duplicate versions of the same policy. - Do not upload secrets or credentials. ## Delete a notebook Use **Delete Knowledge Notebook** only when no agent still needs the notebook. Deleting a notebook can make existing agents lose context for questions they previously answered. ## Next - [Use with agents](/guides/knowledge/use-with-agents) - [Knowledge overview](/guides/knowledge) Source: https://docs.lunnoa.com/guides/knowledge/create-and-upload --- # Use with agents > Enable knowledge notebooks on agents and test that answers come from the right source material. After you create a notebook, enable it on the agent that should search it. Agents do not automatically use every notebook in the workspace. ## Enable a notebook on an agent Go to [Agents](https://automate.lunnoa.com/agents), then open the agent. Click **Configure**. Select **Knowledge** on the configuration map. Use **Search notebooks...** if the list is long. Turn on the notebook switch. The footer shows how many notebooks are enabled. Click **Done**. If there are no notebooks, click **Go to Knowledge** and create one first. ## Tell the agent when to use knowledge Open [Create and configure](/guides/agents/create-and-configure), then add instructions that explain when the notebook should be used. Example: ```text Use the Support refund FAQ notebook for customer refund questions. When you answer from the notebook, mention the policy section if it is available. If the notebook does not cover the case, say that the policy does not answer it and ask a manager to review. ``` Instructions prevent two common problems: | Problem | How instructions help | |---|---| | Agent ignores the notebook | Tell it which topics require notebook lookup | | Agent overuses the notebook | Tell it when the notebook is relevant and when it is not | ## Test retrieval Return to **Build** and try: | Test | What good looks like | |---|---| | Direct question | The agent answers from the notebook | | Missing answer | The agent says the notebook does not cover it instead of inventing | | Similar but unrelated question | The agent does not force a bad match | If the agent misses obvious information: 1. Confirm the notebook is enabled on the agent. 2. Check that the document finished processing. 3. Improve headings or split the document into clearer sections. 4. Add more specific instructions. ## Keep notebooks current Review notebooks when policies or processes change. Old documents can make agents confidently wrong. If you replace a policy, remove or clearly archive the old version. ## Related - [Create and upload](/guides/knowledge/create-and-upload) - [AI agents](/guides/agents) - [Tools, knowledge, and skills](/guides/agents/tools-knowledge-and-skills) Source: https://docs.lunnoa.com/guides/knowledge/use-with-agents --- # Deployment > Docker, Dokploy, and a short production checklist. Self-host Lunnoa Automate when you need private networking, custom identity, or data residency. Never commit production API keys, database URLs, or JWT secrets into docs or git. ## What you need - A Linux host or Dokploy/Docker target - Postgres - TLS termination in front of the app - SMTP (or an equivalent) if you send invites by email ## Production checklist | Check | Why it matters | |---|---| | TLS at the edge | Stops credential theft in transit | | Backups for Postgres | Restores workspaces after failure | | `API_KEYS_ENABLED` reviewed | Controls machine access | | Admin MFA where available | Protects SuperAdmin actions | ## Environment variables See [Environment variables](/guides/deploy/environment-variables) for every deployment key: what it controls, whether it is required, and which features depend on it. ## Installation settings To manage workspaces, custom roles, AI providers, and the privacy policy from git, see [Installation settings](/guides/deploy/installation-settings). Provider API keys stay out of the file. Each provider uses one of four secret sources: a server environment variable, a CI secret, Vault, or a key set in Admin Space. ## Dokploy See the [Dokploy walkthrough](/guides/deploy/dokploy) for a step-by-step create-app flow. ```bash # Example: confirm the container is healthy curl -fsS https://your-host.example/api/health ``` Source: https://docs.lunnoa.com/guides/deploy --- # Environment variables > Every deployment variable for Lunnoa Automate, what it controls, and whether it is required. Use this page when you self-host Lunnoa Automate and need to know which variable steers what. Values live in a single `.env` file at the repository root for Docker Compose and local `pnpm` runs, or in your orchestrator's secret store for production. Keep API keys, database passwords, and JWT secrets out of git. Use `.env` locally (gitignored) and a secrets manager in production. ## Where variables are defined | Artifact | Role | |---|---| | [`.env.example`](https://github.com/lunnoa-automate/lunnoa_automate/blob/main/.env.example) | Local and UAT template with comments | | [`.env.prod.example`](https://github.com/lunnoa-automate/lunnoa_automate/blob/main/.env.prod.example) | Production template (SigNoz, OpenConnector, compose overrides) | | `docker-compose*.yml` | Injects service URLs (`DATABASE_URL`, `REDIS_HOST`, `S3_ENDPOINT`, `WEAVIATE_URL`, `DOCLING_URL`, `OPEN_CONNECTOR_BASE_URL`, …) inside Docker networks | Generate a starter `.env` with random secrets: Put server and sidecar secrets in that one `.env` (or secret store). UI `VITE_*` values are set at **image build time**, not in the server runtime env. Object storage is deployment configuration (`S3_*` below). For email, OAuth apps, SSO, and OpenTelemetry export, prefer **Admin Space** when a database config exists; it overrides matching env vars. ## Required server variables The server **refuses to start** without these. `CRYPTO_ENCRYPTION_KEY` must be exactly **32 characters**. | Variable | Controls | Example | |---|---|---| | `ENVIRONMENT` | `development` or `production`. Affects OAuth callbacks, S3 paths, knowledge namespaces, email behaviour | `production` | | `DATABASE_URL` | PostgreSQL connection string (Prisma) | `postgresql://user:pass@host:5432/lunnoa?schema=public` | | `SERVER_URL` | Public API base URL (OAuth callbacks, webhooks) | `https://automate.example.com` | | `CLIENT_URL` | UI origin (CORS, links in emails) | `https://automate.example.com` | | `PORT` | HTTP listen port inside the server container | `9094` | | `AUTH_JWT_SECRET` | Signs session JWTs | long random string | | `APP_OAUTH_CALLBACK_STATE_SECRET` | Encrypts OAuth state parameters | long random string | | `CRYPTO_ENCRYPTION_KEY` | Encrypts stored connection secrets (32 chars) | 32-character key | ## Core platform (optional) | Variable | Required | Default | What it steers | |---|---|---|---| | `PLATFORM_NAME` | No | `Lunnoa Automate` | White-label name in the UI | | `CORS_ALLOWED_ORIGINS` | No | — | Comma-separated extra browser origins for custom portals. People sign in as Lunnoa users from those origins. `CLIENT_URL` is always allowed | | `API_KEYS_ENABLED` | No | `true` | Master switch for `lna_` machine API keys. Set `false` to reject all API keys | | `AUTH_DISABLED_METHODS` | No | — | Comma-separated: `password`, `google`. SuperAdmins can always use password (break-glass) | | `NGROK_TUNNEL_URL` | No | — | Local dev tunnel for OAuth and webhooks when `ENVIRONMENT=development` | | `NEW_USER_WORKFLOW_ID` | No | — | Workflow (with webhook trigger) to run after signup | | `CRON_TRIGGER_POLLING_INTERVAL` | No | 5 min cron | How often polling triggers are checked | | `DEV_EMAIL_DOMAIN` | No | `@lunnoalabs.ch` | Dev-only email domain for test endpoints | ## Database and Redis | Variable | Required | Default | What it steers | |---|---|---|---| | `POSTGRES_DB` | Compose / setup script | `lunnoa` | Database name (compose builds `DATABASE_URL`) | | `POSTGRES_USER` | Compose / setup script | — | Database user | | `POSTGRES_PASSWORD` | Compose / setup script | — | Database password | | `POSTGRES_HOST` | Local `pnpm` only | `localhost` | Host for `setup-env` script | | `POSTGRES_PORT` | Local `pnpm` only | `5435` | Host port mapped to Postgres | | `REDIS_HOST` | No | `localhost` | BullMQ job queue (workflows, agent turns) | | `REDIS_PORT` | No | `6379` | Redis port | | `REDIS_PASSWORD` | No | — | Redis auth (set in prod compose) | | `REDIS_TLS_ENABLED` | No | `false` | TLS for Redis connections | Redis is required for parallel workflow execution and resumable agent chat streams. ## Object storage (S3-compatible) Profile images, workspace logos, knowledge uploads, and temporary workflow files use an S3-compatible bucket. Configure it with the variables below. Admin Space cannot change the bucket. Google Cloud Storage is not supported. | Variable | Required | Default | What it steers | |---|---|---|---| | `S3_ACCESS_KEY_ID` | No* | — | S3 access key (*optional on AWS ECS with IAM role) | | `S3_SECRET_ACCESS_KEY` | No* | — | S3 secret key | | `S3_REGION` | For Knowledge | — | AWS region | | `S3_BUCKET_ID` | For Knowledge | — | Bucket name | | `S3_ENDPOINT` | No | AWS default | Custom endpoint (MinIO, R2, …). Compose sets `http://minio:9000` | | `S3_FORCE_PATH_STYLE` | No | `false` | Set `true` for MinIO and many S3-compatible stores | | `S3_PUBLIC_BASE_URL` | No | — | Public CDN or custom domain prefix for readable uploads | | `MINIO_ROOT_USER` | Compose only | `minioadmin` | MinIO admin user (maps to `S3_ACCESS_KEY_ID` in compose) | | `MINIO_ROOT_PASSWORD` | Compose only | `minioadmin` | MinIO admin password | ## Knowledge (vector store) Knowledge needs **storage** (`S3_REGION` and `S3_BUCKET_ID`) **and** Weaviate. | Variable | Required | Default | What it steers | |---|---|---|---| | `WEAVIATE_URL` | For Knowledge | — | Weaviate HTTP endpoint. Compose: `http://weaviate:8080` | | `WEAVIATE_GRPC_URL` | For Knowledge | — | gRPC host:port (no scheme). Compose: `weaviate:50051` | | `WEAVIATE_API_KEY` | No | — | Auth when anonymous access is disabled | Each notebook gets its own Weaviate collection. ## AI providers Provider API keys are not built-in deployment variables. Each provider gets its key from a [secret reference](/guides/deploy/installation-settings/secrets): a server environment variable (`serverEnv`), a CI secret (`env`), Vault (`vault`), or a key a person sets in **Admin Space → AI configuration** (`manual`). Embeddings use the default embedding provider in **Admin Space → System Settings → Knowledge**. An empty Ollama base URL uses `http://127.0.0.1:11434/api`. If Ollama runs somewhere else, including on the Docker host, set that URL on the provider configuration. The server does not create a model connection at startup, and a new agent has no model until one is chosen. To pull providers, connection access, workspaces, roles, and the privacy policy from git, set the variables below. The JSON file never contains a key. See [Installation settings](/guides/deploy/installation-settings). | Variable | Required | Default | What it steers | |---|---|---|---| | `LUNNOA_SETTINGS_REPOSITORY` | With branch and path | unset | HTTPS git URL of the settings repository | | `LUNNOA_SETTINGS_BRANCH` | With repository and path | unset | Branch for this install (`dev`, `staging`, or `prod`) | | `LUNNOA_SETTINGS_PATH` | With repository and branch | unset | Path of the JSON file, such as `settings/lunnoa.settings.json` | | `LUNNOA_SETTINGS_TOKEN` | When the repository is private | unset | Read token. Never commit it | Leave the repository, branch, and path unset and the server starts without reading a settings file. Set all three together. A partial set stops the reload. Any variable a `serverEnv` reference names (for example `OPENAI_API_KEY`) must be set on this server, or the pull fails. ### Vault Only needed when a provider uses a `vault` secret reference. Leave all of them unset to turn Vault off. | Variable | Required | Default | What it steers | |---|---|---|---| | `LUNNOA_VAULT_ADDR` | Yes | — | Vault address, for example `https://vault.company.internal:8200` | | `LUNNOA_VAULT_NAMESPACE` | No | — | Vault namespace (Vault Enterprise) | | `LUNNOA_VAULT_AUTH_METHOD` | Yes | — | `kubernetes`, `approle`, `jwt`, `aws`, `gcp`, or `azure` | | `LUNNOA_VAULT_ROLE` | Yes, except AppRole | — | The Vault role Lunnoa logs in as | | `LUNNOA_VAULT_ROLE_ID` | AppRole only | — | AppRole role id | | `LUNNOA_VAULT_SECRET_ID` | AppRole only | — | AppRole secret id | | `LUNNOA_VAULT_MOUNT` | No | `secret` | Default KV v2 mount for references that name no `mount` | | `LUNNOA_VAULT_CACHE_TTL_SECONDS` | No | `300` | How long a fetched secret stays in memory | ## Document parsing (Docling) | Variable | Required | Default | What it steers | |---|---|---|---| | `DOCLING_URL` | No | — | Docling serve base URL. Compose sets `http://docling:5001`. Empty disables the Document Parser | | `DOCLING_API_KEY` | No | — | `X-Api-Key` header when Docling auth is enabled | ## Long-tail integrations First-party apps are always on. These variables are **optional**. They add **Pipedream** and/or **OpenConnector** catalogues for MCP, workflow actions, and triggers. If a provider is unset or credentials are incomplete, the server logs a warning and treats that surface as `none`. The rest of the platform keeps running. ### Provider switches | Variable | Required | Default | What it steers | |---|---|---|---| | `LUNNOA_MCP_PROVIDER` | No | `pipedream` if Pipedream creds exist, else `none` | MCP catalogue: `none`, `pipedream`, `open_connector` | | `LUNNOA_ACTION_PROVIDER` | No | `none` | Workflow action catalogue: `none`, `pipedream`, `open_connector` | | `LUNNOA_TRIGGER_PROVIDER` | No | `none` | Workflow triggers (`pipedream` or `none` only; OpenConnector has no triggers) | ### Pipedream (cloud) | Variable | Required | Default | What it steers | |---|---|---|---| | `PIPEDREAM_CLIENT_ID` | When provider is `pipedream` | — | Pipedream Connect OAuth client | | `PIPEDREAM_CLIENT_SECRET` | When provider is `pipedream` | — | Pipedream Connect secret | | `PIPEDREAM_PROJECT_ID` | When provider is `pipedream` | — | Pipedream project ID | | `PIPEDREAM_ENVIRONMENT` | No | `development` | Pipedream environment slug | ### OpenConnector (self-hosted sidecar) OpenConnector is included in `docker-compose.local.yml`, `docker-compose.yml`, `docker-compose.uat.yml`, and `docker-compose.prod.yml`. It does not replace other sidecars (Postgres, Redis, MinIO, Weaviate, Docling, SigNoz). Only the Lunnoa server talks to it. Put these in the **same** `.env` as the server. Compose maps `OPEN_CONNECTOR_*` into the server and into the `open-connector` container as `OOMOL_CONNECT_*`. | Variable | Required | Default | What it steers | |---|---|---|---| | `OPEN_CONNECTOR_BASE_URL` | When provider is `open_connector` | Compose: `http://open-connector:3000` | Sidecar origin for the Lunnoa server. On the Docker network you usually omit this from `.env`; compose injects the default. Override only if OC runs elsewhere | | `OPEN_CONNECTOR_RUNTIME_TOKEN` | When provider is `open_connector` | — | Bearer token for MCP and action runtime calls (`oct_…` or a bootstrap secret). You generate it (see below) | | `OPEN_CONNECTOR_ADMIN_TOKEN` | For catalog sync / admin API | — | Protects OC admin API and console. You invent a strong secret and set it before start | | `OOMOL_CONNECT_ENCRYPTION_KEY` | OpenConnector container | — | AES-256-GCM key for credentials stored by OC. Sidecar only; Lunnoa does not read this key. Generate a long random secret and keep it stable | None of these come from a Lunnoa UI. You create them yourself: 1. **`OOMOL_CONNECT_ENCRYPTION_KEY`** and **`OPEN_CONNECTOR_ADMIN_TOKEN`**: generate long random strings (for example `openssl rand -hex 32`) and put them in `.env` before the first OC start. 2. **`OPEN_CONNECTOR_RUNTIME_TOKEN`**: either set the same bootstrap value in `.env` (compose passes it to OC as `OOMOL_CONNECT_RUNTIME_TOKEN`), or create a runtime token later in the OC console Access tab / admin API and copy the `oct_…` value into `.env`. 3. Local compose ships with throwaway defaults. On UAT/prod the OC container can start without tokens; set the secrets and `LUNNOA_*_PROVIDER=open_connector` only when you enable OpenConnector. Example for UAT or production when you enable OpenConnector: ```bash LUNNOA_MCP_PROVIDER=open_connector LUNNOA_ACTION_PROVIDER=open_connector LUNNOA_TRIGGER_PROVIDER=none # OPEN_CONNECTOR_BASE_URL optional when using compose (defaults to http://open-connector:3000) OPEN_CONNECTOR_RUNTIME_TOKEN= OPEN_CONNECTOR_ADMIN_TOKEN= OOMOL_CONNECT_ENCRYPTION_KEY= ``` Local debug console (local compose only): `http://localhost:3100`. UAT and prod keep OC on the internal Docker network only. ## Web search, scraping, and voice | Variable | Required | What it steers | |---|---|---| | `SERPER_API_KEY` | No | Google search for agents and workflows (`WEB_SEARCH` feature flag) | | `APIFY_API_KEY` | No | Website extraction (Apify) | | `APIFY_EXTRACT_DYNAMIC_CONTENT_TASK_ID` | No | Apify task for dynamic pages (`WEB_EXTRACTION_DYNAMIC`) | | `APIFY_EXTRACT_STATIC_CONTENT_TASK_ID` | No | Apify task for static pages (`WEB_EXTRACTION_STATIC`) | | `VAPI_API_KEY` | No | AI phone calls (`CALLING` feature flag) | ## Runtime app installation | Variable | Required | Default | What it steers | |---|---|---|---| | `PLUGINS_DIR` | No | `/data/plugins` | Writable directory for npm-installed integration apps | | `APP_REGISTRY_ALLOWLIST` | No | empty | Comma-separated registry URLs or scopes (`@lunnoa/*`). **Empty disables runtime install** | | `APP_REGISTRY_TOKEN` | No | — | npm `_authToken` for private registries | ## Jobs dashboard (SuperAdmin) | Variable | Required | Default | What it steers | |---|---|---|---| | `JOBS_DASHBOARD_ENABLED` | No | `true` | BullMQ UI at `/api/admin/jobs` | | `JOBS_DASHBOARD_ALLOW_MUTATIONS` | No | `false` | Retry, promote, remove buttons | | `JOBS_DASHBOARD_REDACT_PAYLOADS` | No | `true` | Mask secrets in job payloads | | `JOBS_DASHBOARD_SHOW_AGENT_PROMPTS` | No | `false` | Show full agent message content (staging only) | ## HTTP and agent worker tuning | Variable | Required | Default | What it steers | |---|---|---|---| | `SERVER_REQUEST_TIMEOUT_MS` | No | `1200000` | Max HTTP request duration (20 min) | | `KEEP_ALIVE_TIMEOUT_MS` | No | `1210000` | Node keep-alive timeout | | `HEADERS_TIMEOUT_MS` | No | `1215000` | Node headers timeout | | `AGENT_WORKER_CONCURRENCY` | No | `10` | Parallel agent turn workers | | `AGENT_TURN_MAX_MS` | No | `600000` | Max duration per agent turn | | `AGENT_TOOL_OUTPUT_MAX_CHARS` | No | built-in limit | Truncate tool output sent back to the model | | `TASK_RUN_STREAM_ATTACH_TIMEOUT_MS` | No | `60000` | Timeout attaching to a running stream | | `CHAT_RESUMABLE_STREAMS` | No | enabled | Set `false` to disable Redis-backed stream resume | | `CHAT_STREAM_CHUNK_DEBUG` | No | off | Verbose SSE chunk logging | | `CHAT_STREAM_CHUNK_DEBUG_VERBOSE` | No | off | Extra verbose chunk logging | | `DEBUG_LOG_SYSTEM_PROMPT` | No | off | Log agent system prompts (never in prod) | ## AWS Parameter Store (cloud deployments) | Variable | Required | What it steers | |---|---|---| | `PARAM_STORE_ACCESS_KEY` | When using SSM | AWS access key | | `PARAM_STORE_SECRET_ACCESS_KEY` | When using SSM | AWS secret key | | `PARAM_STORE_REGION` | When using SSM | AWS region | When all three are set, the server loads `/{ENVIRONMENT}/server-core/*` from Parameter Store. Local `.env` still supplies keys missing from SSM (typical for dev integration secrets). ## UI build-time variables (`VITE_*`) Set these when building the UI image or running `pnpm` locally. They are **not** read by the server. | Variable | Required | Default | What it steers | |---|---|---|---| | `VITE_CLIENT_URL` | Local dev | `http://localhost:5173` | Where the browser thinks the UI lives | | `VITE_SERVER_URL` | Local dev | `http://localhost:9094` | API origin for fetch and SSE. **Leave empty in prod** when nginx proxies `/api` same-origin | | `VITE_ENABLE_ANALYTICS` | No | off | Vercel Analytics in the UI bundle | | `VITE_ENABLE_BROWSER_OTEL` | No | off | Browser OpenTelemetry traces | | `VITE_OTEL_EXPORTER_OTLP_ENDPOINT` | When browser OTEL on | `/otlp` in dev | OTLP HTTP endpoint for UI traces | | `VITE_OTEL_SERVICE_NAME` | No | `lunnoa-automate-ui` | Service name in traces | | `VITE_MOCK_API_CALLS` | No | off | Mock API layer (local dev only) | | `VITE_LOG_API_CALLS` | No | off | Console-log API calls (local dev only) | Production UI images are built in CI with `PROD_CLIENT_URL` and `PROD_SERVER_URL` GitHub repository variables (see `.github/workflows/deploy-ui-container.yml`), not from the server `.env`. ## Observability stack (SigNoz compose only) | Variable | Required | What it steers | |---|---|---| | `SIGNOZ_JWT_SECRET` | Prod/UAT SigNoz stack | SigNoz UI authentication | Server-side trace export is configured in **Admin Space → Observability**, not via `OTEL_*` env vars on the server. ## Configure in Admin Space instead of env These capabilities do **not** need (or no longer accept) deployment env vars: | Capability | Where to configure | |---|---| | Email (SMTP, Gmail, SendGrid, …) | Admin Space → System Settings → Email | | OAuth apps (Google, Microsoft, HubSpot, …) | Admin Space → App configuration | | SSO (OIDC) and SCIM | Admin Space → SSO | | OpenTelemetry export | Admin Space → Observability | | AI provider keys, Ollama URL, and connections | Admin Space → AI configuration, or the [installation settings file](/guides/deploy/installation-settings) | `MAIL_*` and `SKIP_EMAIL_VERIFICATION` env vars are **ignored** if present. ## Feature flags vs variables On startup the discovery service logs which features are enabled. Common env-driven gates: | Feature | Env dependency | |---|---| | `KNOWLEDGE` | `WEAVIATE_URL` + `S3_REGION` + `S3_BUCKET_ID` | | `WEB_SEARCH` | `SERPER_API_KEY` | | `WEB_EXTRACTION_DYNAMIC` | `APIFY_API_KEY` + `APIFY_EXTRACT_DYNAMIC_CONTENT_TASK_ID` | | `WEB_EXTRACTION_STATIC` | `APIFY_API_KEY` + `APIFY_EXTRACT_STATIC_CONTENT_TASK_ID` | | `CALLING` | `VAPI_API_KEY` | | `EMAILS` | Admin Space email config (database) | | `SSO` / `SCIM` | Admin Space providers and tokens (database) | Workflows, agents, connections, variables, teams, skills, and code execution are on by default. ## Quick reference by deployment path Copy `.env.example` → `.env`, run `setup-env`, start Postgres/Redis/MinIO/Weaviate via compose profiles as needed. Copy `.env.prod.example` → `.env`, fill secrets (including OpenConnector tokens if you enable long-tail OC), run `docker compose -f docker-compose.prod.yml up -d`. Compose injects internal service URLs such as `OPEN_CONNECTOR_BASE_URL`. Map the **required server variables** plus Redis, S3, and Weaviate for full platform features. Build or pull a UI image with correct `VITE_*` build args. Start from [`.env.example`](https://github.com/lunnoa-automate/lunnoa_automate/blob/main/.env.example) or [`.env.prod.example`](https://github.com/lunnoa-automate/lunnoa_automate/blob/main/.env.prod.example), then use this page for required vs optional and what each variable steers. Source: https://docs.lunnoa.com/guides/deploy/environment-variables --- # Installation settings > Manage workspaces, custom roles, AI providers, AI connection access, and the privacy policy from a git repository instead of clicking through Admin Space. Installation settings let a Lunnoa Automate install pull **one JSON file** from a git branch and apply it. Your team reviews changes in pull requests, promotes them from development to production, and keeps a history of who changed what. Use it when you run more than one environment (for example development, staging, and production) and want the same governance setup in each, without repeating it by hand in Admin Space. Anything the file creates or updates becomes **read-only in Admin Space**. Change it in git, not in the UI. See [How settings are applied](/guides/deploy/installation-settings/how-it-applies). ## What you can manage | Key in the file | What it controls | |---|---| | `ai.providers` | AI provider configurations: which models and built-in tools are enabled, and where the API key comes from | | `ai.connections` | Who may use a provider connection: everyone, a role, or a workspace | | `privacy` | The platform privacy policy (PII detection with Presidio) | | `workspaces` | Workspaces, by name | | `roles` | Custom roles, by name, with their permissions and the workspaces they cover | ## What stays in Admin Space The file never holds secrets, people, or sign-in methods. | Not in the file | Where it lives | |---|---| | API keys, passwords, tokens | Never as values. The file holds a [secret reference](/guides/deploy/installation-settings/secrets) that says where to find them: a server environment variable, a CI secret, Vault, or Admin Space | | Users, workspace membership, invitations | Admin Space and your identity provider | | SSO and SCIM | Admin Space → SSO | | The built-in roles `Admin`, `Editor`, `Viewer`, `Agent User` | Fixed by the product | | Which models exist | The public [AI model catalogue](https://github.com/lunnoa-automate/ai-model-catalogue). The file only chooses which catalogue models a provider enables | | Email, object storage, observability, platform defaults | Admin Space. These are not accepted in the file yet | The server rejects any top-level key other than `ai`, `privacy`, `workspaces`, and `roles`. Do not add other keys early. The whole pull fails and the previous settings stay in place. ## Secrets A provider's `apiKey` is a secret reference with a `source`. Pick one per provider. | Source | Where the value lives | |---|---| | `serverEnv` | An environment variable on the Lunnoa server | | `env` | A CI secret that your pipeline pushes to the install on deploy | | `vault` | HashiCorp Vault, read when needed | | `manual` | Set by a person in Admin Space or through the API | See [Secrets and API keys](/guides/deploy/installation-settings/secrets) for how each one works and when to use it. ## Connect an install to a repository Set these environment variables on the Lunnoa server. Use a different branch for each environment. | Variable | Required | What it steers | |---|---|---| | `LUNNOA_SETTINGS_REPOSITORY` | With branch and path | HTTPS URL of a GitHub or GitLab repository, with an owner and a name | | `LUNNOA_SETTINGS_BRANCH` | With repository and path | Branch, tag, or commit to read (letters, numbers, `.`, `_`, `-`) | | `LUNNOA_SETTINGS_PATH` | With repository and branch | Path to the JSON file in the repository, for example `settings/lunnoa.settings.json` | | `LUNNOA_SETTINGS_TOKEN` | Only for a private repository | Read-only access token. Never put a token in the repository URL | Leave all four empty to turn the feature off. Setting only some of the first three is an error. ```bash LUNNOA_SETTINGS_REPOSITORY=https://github.com/your-org/lunnoa-settings LUNNOA_SETTINGS_BRANCH=dev LUNNOA_SETTINGS_PATH=settings/lunnoa.settings.json LUNNOA_SETTINGS_TOKEN= ``` ## When the file is applied The server pulls and applies the file: - On startup. If this fails, the error is logged and the previous settings are kept. - When a SuperAdmin calls the reload endpoint. Use a SuperAdmin bearer token. A workspace API key (`lna_...`) is not accepted. A successful call returns `applied` with how many rows were created and updated. It returns `skipped` when the feature is not configured or when the file does not exist on that branch (a 404 is not an error). Any other failure returns an error message and changes nothing. See [How settings are applied](/guides/deploy/installation-settings/how-it-applies) for what each error means. ## A minimal file ```json { "workspaces": [ { "name": "Finance", "description": "Finance operations" } ], "roles": [ { "name": "Finance Analyst", "description": "Read agents and tasks", "permissions": ["agents:read", "tasks:read"], "workspaces": ["Finance"] } ], "ai": { "providers": [ { "name": "Company OpenAI", "provider": "openai", "apiKey": { "source": "serverEnv", "name": "OPENAI_API_KEY" }, "models": ["gpt-6-luna"], "tools": ["web_search"] } ], "connections": [ { "name": "Finance GPT", "provider": "openai", "providerName": "Company OpenAI", "access": [{ "type": "WORKSPACE", "workspace": "Finance" }] } ] } } ``` ## In this guide | Job | Page | |---|---| | Look up every key, allowed value, and limit | [File reference](/guides/deploy/installation-settings/file-reference) | | Give providers their API keys without putting them in git | [Secrets and API keys](/guides/deploy/installation-settings/secrets) | | Choose permission strings for a custom role | [Permissions](/guides/deploy/installation-settings/permissions) | | Understand ownership, locks, replace behaviour, and errors | [How settings are applied](/guides/deploy/installation-settings/how-it-applies) | | Set up branches, validation, and promotion | [Promote and deploy](/guides/deploy/installation-settings/promote-and-deploy) | ## Related - [Environment variables](/guides/deploy/environment-variables) - [AI configuration](/guides/adminspace/ai-configuration) - [Workspaces](/guides/adminspace/workspaces) - [Users and roles](/guides/adminspace/users-and-roles) Source: https://docs.lunnoa.com/guides/deploy/installation-settings --- # File reference > Every key, allowed value, and limit in the installation settings file, section by section. This page lists what the server accepts in the settings file. The server validates the whole file before it applies anything, so one mistake rejects the entire pull. Rules that hold everywhere: - The file is valid JSON and at most 200,000 bytes. - Names are matched exactly, including case. Strings are trimmed. - An unknown key in any object is an error. - Every section is optional. Leave a section out and the server leaves the matching rows alone. Several lists are **replaced** on every pull: a provider's `models` and `tools`, a role's `workspaces`, and a connection's `access`. Always write the complete list you want. See [How settings are applied](/guides/deploy/installation-settings/how-it-applies). ## `ai.providers` An array of AI provider configurations. A provider is identified by `provider` plus `name`, which must be unique in the file. | Key | Required | Rules | |---|---|---| | `name` | Yes | Up to 100 characters. The label shown in Admin Space | | `provider` | Yes | One of the provider slugs below | | `apiKey` | No | A [secret reference](#secret-references): an object with a `source` that says where the key comes from. Never the key itself. Omit for providers that need no key | | `baseUrl` | No | An `http` or `https` URL, up to 500 characters, with no username or password in it | | `models` | No | Catalogue model ids, up to 100, no duplicates. See below | | `tools` | No | Built-in tool ids for that provider, up to 50, no duplicates | Keys that look like secrets (anything with `key`, `secret`, `password`, or `token` in the name, except `apiKey`) are rejected. `apiKey` itself must be a secret reference object. A plain string is rejected and the whole pull fails. ### Provider slugs | Slug | API key | Notes | |---|---|---| | `openai` | Yes | `baseUrl` configurable. Default `https://api.openai.com/v1` | | `anthropic` | Yes | | | `gemini` | Yes | | | `xai` | Yes | | | `deepseek` | Yes | | | `featherless` | Yes | `baseUrl` configurable. Default `https://api.featherless.ai/v1` | | `perplexity` | Yes | | | `ollama` | No | `baseUrl` configurable. Point it at your Ollama host | | `huggingface` | Yes | `baseUrl` configurable | ### Models Each entry in `models` is either a model id string, or an object to keep a model listed but switched off: ```json "models": [ "gpt-6-luna", { "id": "gpt-6-astra", "enabled": false } ] ``` The only keys in an object are `id` and `enabled`. Every id must exist as an active model for that provider on the install, otherwise the pull fails with `Unknown model id(s)`. Model ids come from the public [AI model catalogue](https://github.com/lunnoa-automate/ai-model-catalogue) (`/models.json`, field `modelId`), which an install loads with **Seed defaults** in Admin Space. Seed the catalogue before you reference a new model. Models marked deprecated still work. Prefer the model named in `replacedByModelId` for new setups. ### Built-in tools Tool ids belong to a provider. These are the ones the product seeds: | Provider | Tool ids | |---|---| | `openai` | `web_search`, `code_interpreter`, `file_search`, `dalle` | | `anthropic` | `web_search`, `computer_use`, `text_editor`, `bash` | | `gemini` | `google_search`, `code_execution`, `structured_outputs` | | `perplexity` | `citations`, `grounded_search` | The other providers have no built-in tools. Leave `tools` out for them. `bash`, `computer_use`, `code_interpreter`, and `text_editor` run code or control a machine. Enabling one makes it available to every agent that uses that provider. Review it like any other access change. Platform tools such as `remember_fact` or `drive_save_file` are managed by the product and are not valid here. ## Secret references A secret reference is an object with a `source`. The other keys depend on the source, and any other key is an error. Each source is explained on [Secrets and API keys](/guides/deploy/installation-settings/secrets). | `source` | Other keys | Rules | |---|---|---| | `serverEnv` | `name` (required) | Name of an environment variable on the server. Uppercase letters, digits, and underscores, starting with a letter, up to 128 characters. It must be set when the file is applied | | `env` | `name` (required) | Name the pipeline pushes the secret under. Same rules as `serverEnv`. A value must have been pushed before the reload | | `vault` | `path` (required), `key` (required), `mount` (optional) | `path` is the KV v2 secret path with no leading slash and no `..`, up to 255 characters. `key` is the field in that secret, up to 128 characters. `mount` is up to 64 characters and defaults to the server's configured mount | | `manual` | None | The provider is created without a key. A person sets it in Admin Space or through the API | ```json "apiKey": { "source": "vault", "path": "lunnoa/prod/openai", "key": "api_key" } ``` ## `ai.connections` An array that sets who may use a connection. The provider must already exist, either declared in the same file or already on the install. | Key | Required | Rules | |---|---|---| | `name` | Yes | Up to 100 characters. Unique per provider | | `provider` | Yes | A provider slug | | `providerName` | Yes | The `name` of the provider this connection belongs to. Must match exactly one provider | | `access` | Yes | An array of grants. Use `[]` for no access | Each grant is one of: | Grant | Meaning | |---|---| | `{ "type": "GLOBAL" }` | Everyone. Cannot name a role or workspace | | `{ "type": "ROLE", "role": "Finance Analyst" }` | Members of that role. Built-in roles such as `Admin` are allowed | | `{ "type": "WORKSPACE", "workspace": "Finance" }` | Members of that workspace | A role or workspace may be declared in the same file or already exist on the install. An unknown name fails the pull. A grant cannot appear twice in one connection. Leave `connections` out entirely to keep the current grants as they are. When you declare a connection, its `access` list **replaces** the previous grants. ## `privacy` The single platform privacy policy. **All eight keys are required**, and no other keys are allowed. | Key | Rules | |---|---| | `presidioEnabled` | `true` or `false` | | `defaultLanguage` | Up to 8 characters, for example `en` | | `scoreThreshold` | A number from 0 to 1 | | `enabledEntities` | Presidio entity names, up to 40, each up to 64 characters, no duplicates | | `highSeverityEntities` | Same limits as `enabledEntities` | | `anonymizerDefault` | Up to 32 characters, for example `replace` | | `failMode` | `FAIL_CLOSED` or `FAIL_OPEN` | | `analyzeTimeoutMs` | A whole number from 250 to 15000 | ```json { "presidioEnabled": true, "defaultLanguage": "en", "scoreThreshold": 0.5, "enabledEntities": ["EMAIL_ADDRESS", "PHONE_NUMBER", "CREDIT_CARD", "IBAN_CODE", "US_SSN", "PERSON"], "highSeverityEntities": ["US_SSN", "CREDIT_CARD", "IBAN_CODE"], "anonymizerDefault": "replace", "failMode": "FAIL_CLOSED", "analyzeTimeoutMs": 2000 } ``` The server only checks that entity names are unique strings. A misspelt name is accepted and simply never matches, which silently removes protection. Use the exact Presidio entity names. `FAIL_OPEN` lets text through to the model when the PII check is unavailable. Prefer `FAIL_CLOSED` unless you have a reason. Keep `highSeverityEntities` a subset of `enabledEntities`. The server does not enforce that. The Presidio service addresses stay environment variables on the install. Once the file owns the privacy policy, Admin Space cannot edit it. ## `workspaces` An array of workspaces, created or updated by name. | Key | Required | Rules | |---|---|---| | `name` | Yes | Up to 100 characters, unique in the file | | `description` | No | Up to 255 characters. Empty becomes no description | The file does not add members. ## `roles` An array of custom roles, created or updated by name. | Key | Required | Rules | |---|---|---| | `name` | Yes | Up to 50 characters, unique in the file. Cannot be `Admin`, `Editor`, `Viewer`, or `Agent User` | | `description` | No | Up to 255 characters | | `permissions` | Yes | At least one. Each must be an exact string from [Permissions](/guides/deploy/installation-settings/permissions). No duplicates | | `workspaces` | No | Workspace names the role covers, no duplicates. Each must be declared in the file or already exist | The file does not add people to a role. ## Limits at a glance | Field | Limit | |---|---| | File size | 200,000 bytes | | File path | Ends in `.json`. Segments use letters, digits, `.`, `_`, `-`. Up to 200 characters | | Branch, tag, or commit | Letters, digits, `.`, `_`, `-`. Up to 100 characters | | Workspace, provider, connection, and provider reference names | 100 characters | | Role names | 50 characters | | Descriptions | 255 characters | | `baseUrl` | 500 characters | | Secret reference `name` and `key` | 128 characters | | Vault `path` | 255 characters | | Vault `mount` | 64 characters | | Models per provider | 100 | | Tools per provider | 50 | | Privacy entity lists | 40 entries, 64 characters each | ## Not supported yet Platform defaults (embedding model, chunk sizes), outgoing email, and observability export have a planned shape but the server does not accept them yet. Keep them out of the file until the server release notes say otherwise. Configure them in Admin Space for now. ## Related - [Installation settings](/guides/deploy/installation-settings) - [How settings are applied](/guides/deploy/installation-settings/how-it-applies) - [Promote and deploy](/guides/deploy/installation-settings/promote-and-deploy) Source: https://docs.lunnoa.com/guides/deploy/installation-settings/file-reference --- # Permissions > The exact permission strings a custom role in the installation settings file can use. A custom role in the settings file lists permission strings. Each string must match exactly. A string that is not in this list fails the whole pull with `has unknown permission(s)`. Permissions follow a `module:action` pattern. A `:manage` permission is the full-control variant for its module, and the finer `read`, `create`, `update`, and `delete` strings sit beside it. Grant the narrow ones first and add `:manage` only when a role really needs full control. ## Agents and tasks | Module | Permissions | |---|---| | Agents | `agents:read`, `agents:create`, `agents:update`, `agents:delete`, `agents:manage`, `agents:use` | | Tasks | `tasks:read`, `tasks:create`, `tasks:update`, `tasks:delete`, `tasks:manage` | | Teams | `teams:read`, `teams:create`, `teams:update`, `teams:delete`, `teams:message`, `teams:manage` | ## Workflows and executions | Module | Permissions | |---|---| | Workflows | `workflows:read`, `workflows:create`, `workflows:update`, `workflows:delete`, `workflows:execute`, `workflows:export`, `workflows:import`, `workflows:manage` | | Workflow tags | `workflow_tags:read`, `workflow_tags:create`, `workflow_tags:update`, `workflow_tags:delete`, `workflow_tags:assign` | | Workflow metrics | `workflow_metrics:read`, `workflow_metrics:create`, `workflow_metrics:update`, `workflow_metrics:delete` | | Executions | `executions:read`, `executions:cancel`, `executions:manage` | | Approvals | `approvals:read`, `approvals:decide` | | Templates | `templates:read`, `templates:create`, `templates:update`, `templates:delete`, `templates:manage` | ## Data and integrations | Module | Permissions | |---|---| | Connections | `connections:read`, `connections:create`, `connections:update`, `connections:delete`, `connections:manage` | | Knowledge | `knowledge:read`, `knowledge:create`, `knowledge:update`, `knowledge:delete`, `knowledge:upload`, `knowledge:manage` | | Variables | `variables:read`, `variables:create`, `variables:update`, `variables:delete`, `variables:manage` | | Tables | `tables:read`, `tables:create`, `tables:update`, `tables:delete` | ## Queues | Module | Permissions | |---|---| | Queues | `queues:read`, `queues:create`, `queues:update`, `queues:delete`, `queues:manage` | | Queue items | `queue-items:read`, `queue-items:create`, `queue-items:update`, `queue-items:delete`, `queue-items:process`, `queue-items:manage` | ## Apps, analytics, scorecard, and observability | Module | Permissions | |---|---| | Apps | `apps:read`, `apps:create`, `apps:update`, `apps:delete`, `apps:manage` | | Analytics | `analytics:view`, `analytics:export` | | Scorecard | `scorecard:view`, `scorecard:manage`, `scorecard:record` | | Observability | `observability:view` | ## Workspace administration | Module | Permissions | |---|---| | Workspace | `workspace:read`, `workspace:update` | | Members | `workspace:members:read`, `workspace:members:invite`, `workspace:members:remove`, `workspace:members:manage` | ## Entities and skills | Module | Permissions | |---|---| | Entity types | `entity-types:read`, `entity-types:create`, `entity-types:update`, `entity-types:delete`, `entity-types:manage` | | Entities | `entities:read`, `entities:create`, `entities:update`, `entities:delete`, `entities:change-state`, `entities:import`, `entities:export`, `entities:manage` | | Skills | `skills:read`, `skills:assign`, `skills:execute`, `skills:manage` | ## Builders and consumers Holding `agents:read` or `agents:create` makes a user a **builder** in that workspace. A role with neither is treated as a consumer role, and the app hides builder features. A consumer sees agents through agent shares, not through permissions. ## Built-in roles The four built-in roles cannot be declared in the file. They can be used in `ai.connections` access grants. | Role | Intent | |---|---| | `Admin` | Every permission above | | `Editor` | Create and change content. No workspace settings, no `:manage` permissions, no analytics export | | `Viewer` | Read-only, plus `agents:use` and `approvals:decide` | | `Agent User` | Consumer role: `agents:use`, `tasks:read`, and `workspace:read` only | To design a custom role, start from the built-in role closest to the job and add or remove individual strings. ## Related - [File reference](/guides/deploy/installation-settings/file-reference) - [Users and roles](/guides/adminspace/users-and-roles) Source: https://docs.lunnoa.com/guides/deploy/installation-settings/permissions --- # Secrets and API keys > Four ways to give a provider its API key without putting the key in git. Server environment, CI push, Vault, or set by hand. The settings file never contains a key. It contains a **secret reference**: a small object that tells Lunnoa where to find the value. The same shape is used wherever the file takes a secret, and each provider chooses its own source. ```json "apiKey": { "source": "serverEnv", "name": "OPENAI_API_KEY" } ``` ## Choose a source | Source | Where the value lives | When Lunnoa reads it | Best for | |---|---|---|---| | `serverEnv` | An environment variable on the Lunnoa server | At use time. Never stored in the Lunnoa database | Kubernetes secrets, Docker secrets, variables injected by your platform | | `env` | A secret in your CI environment (GitHub or GitLab) | Pushed by the pipeline on deploy, then stored encrypted | Teams that keep keys in CI and do not want to touch the server | | `vault` | HashiCorp Vault (KV v2) | At use time, cached in memory for a few minutes | Regulated installs, rotation, central audit of secret access | | `manual` | Admin Space or the API | Set by a person | A quick start, a one-off key, or a key your pipeline must never see | If you are unsure, start with `serverEnv`. It needs no extra setup and the key never touches git or CI. ## `serverEnv` ```json { "name": "Company OpenAI", "provider": "openai", "apiKey": { "source": "serverEnv", "name": "OPENAI_API_KEY" }, "models": ["gpt-6-luna"] } ``` | Key | Rules | |---|---| | `name` | The name of an environment variable on the server. Uppercase letters, digits, and underscores, starting with a letter, up to 128 characters | The variable must be set on the server when the file is applied, or the pull fails. Lunnoa reads the value from the server environment each time it needs it and does not store it. To rotate the key, change the variable and restart the server. Each environment needs its own value. A provider that works in development fails the staging promotion if staging does not have the variable yet. ## `env` ```json { "name": "Company OpenAI", "provider": "openai", "apiKey": { "source": "env", "name": "OPENAI_API_KEY" }, "models": ["gpt-6-luna"] } ``` | Key | Rules | |---|---| | `name` | The name the pipeline pushes the secret under. Same character rules as `serverEnv` | With `env`, your pipeline sends the value to Lunnoa. The deploy workflow reads a secret called `OPENAI_API_KEY` from the GitHub environment and posts it to the secrets endpoint before it asks the install to reload. Lunnoa stores it encrypted. Use a machine user token. A workspace API key (`lna_...`) is not accepted. The response lists the names that were stored and never repeats a value. If a reference uses `env` and no value was pushed for that name, the reload fails. To rotate the key, change the CI secret and run the deploy again. ## `vault` ```json { "name": "Company OpenAI", "provider": "openai", "apiKey": { "source": "vault", "path": "lunnoa/prod/openai", "key": "api_key" }, "models": ["gpt-6-luna"] } ``` | Key | Required | Rules | |---|---|---| | `path` | Yes | The secret path inside the KV v2 mount, for example `lunnoa/prod/openai`. No leading slash and no `..`. Up to 255 characters | | `key` | Yes | The field inside that secret. Up to 128 characters | | `mount` | No | The KV v2 mount. Defaults to `LUNNOA_VAULT_MOUNT` | ### How Lunnoa connects to Vault The Vault connection is configured once on the server, with environment variables. See [Environment variables](/guides/deploy/environment-variables). The settings file only holds the path. | Auth method | Use it when | |---|---| | Kubernetes | Lunnoa runs in a cluster. The pod's service account logs in to Vault | | AppRole | Lunnoa runs anywhere else and you can place a role id and secret id on the server | | Cloud IAM (AWS, GCP, Azure) | Lunnoa runs on a cloud VM or service with an attached identity | | JWT/OIDC | You already issue workload identity tokens | Give the Lunnoa role a **read-only** policy on the paths it needs and nothing else. ### How the value is used - Lunnoa reads the secret when a model call needs it and keeps it **in memory only** for a short time (five minutes by default). It never writes the value to the database. - If the provider answers `401` or `403`, Lunnoa fetches the secret again once and retries. A key you rotated in Vault is picked up without a restart. - If Vault cannot be reached and there is no cached value, the call **fails**. Lunnoa does not fall back to another source. ## `manual` ```json { "name": "Company OpenAI", "provider": "openai", "apiKey": { "source": "manual" }, "models": ["gpt-6-luna"] } ``` `manual` has no other keys. The file creates the provider, and a person adds the key in **Admin Space → AI configuration** or through the API. Until then the provider shows **Secret missing** and cannot be used. A pull never overwrites or clears a manual key. The secret field stays editable in Admin Space even though the rest of a file-owned provider is read-only. ## Rules for every source - `apiKey` must be a secret reference object. A plain string such as `"apiKey": "sk-..."` is rejected and the whole pull fails. - Leave `apiKey` out for providers that need no key, such as `ollama`. - Secret values never appear in the file, in logs, in the reload response, or in Admin Space. Admin Space only shows whether a secret is set or missing. - Different providers in one file can use different sources. - A secret reference points to a value. It does not copy it, so changing the source of a provider changes where the next call reads from. ## Related - [File reference](/guides/deploy/installation-settings/file-reference) - [How settings are applied](/guides/deploy/installation-settings/how-it-applies) - [Promote and deploy](/guides/deploy/installation-settings/promote-and-deploy) - [Environment variables](/guides/deploy/environment-variables) Source: https://docs.lunnoa.com/guides/deploy/installation-settings/secrets --- # How settings are applied > Ownership, locks in Admin Space, replace behaviour, ordering, and what each reload error means. Read this page before you edit or remove anything in a live settings file. Most surprises come from three rules: the file **upserts by name**, it **never deletes**, and some lists are **replaced** on every pull. ## One transaction, in a fixed order The server reads the file, validates all of it, then applies it in a single database transaction. If anything fails, nothing changes and the previous settings stay. Order of application: 1. Workspaces 2. Roles 3. AI providers 4. AI connections 5. Privacy policy That order is why a role can name a workspace declared in the same file, and a connection can name a role or workspace declared in the same file. ## Upsert by name, never delete | Kind | Matched by | |---|---| | Workspace | `name` | | Role | `name` | | Provider | `provider` plus `name` | | Connection | provider, `providerName`, and `name` | | Privacy policy | The single platform row | A match is updated. No match is created. **Removing an entry from the file does not delete anything.** The row stays, stays owned by the file, and stays locked in Admin Space. Admin Space refuses to delete a file-owned workspace, provider, or connection, so there is no everyday UI route to retire one. Treat every entry you add as long-lived, and ask your Lunnoa contact how to retire a row before you rely on removing one. ## Ownership and clashes Every row the file creates or updates is tagged as file-owned. A row of the same name that someone created in Admin Space is **not** adopted. The pull fails instead: ```text A UI-created workspace already uses "Finance". Leave it alone or rename the git entry. ``` Rename the entry in the file, or move your Admin Space row out of the way. The same check applies to roles, providers, and connections. ## What becomes read-only in Admin Space | Row | Locked in Admin Space | |---|---| | Provider | Any update (models, tools, base URL, key source) and delete. The value of a `manual` key can still be set | | Connection | Rename, delete, and any change to access | | Workspace | Changing the name or description, and delete | | Role | Changing the name, description, permissions, or workspace list | | Privacy policy | Every edit | Admin Space shows these rows as managed by git. People can still be added to file-owned workspaces and roles, and you can still create **additional** providers, workspaces, and roles with different names. Those are owned by Admin Space. ## Lists that are replaced | List | On every pull | |---|---| | Provider `models` and `tools` | Deleted and recreated from the file. Leaving them out clears them | | Role `workspaces` | Replaced. Leaving it out detaches the role from every workspace, and members of the role move with it | | Connection `access` | Replaced when the connection is declared. Leaving out the whole `connections` list keeps current grants | Always write the full list you want, not just the change. ## API keys A provider's `apiKey` is a secret reference. What a pull does with it depends on the source: | Source | On every pull | When the value is read | |---|---|---| | `serverEnv` | Checks that the variable is set on the server. Stores no value | Each time a model call needs it | | `env` | Checks that the pipeline pushed a value for that name. Keeps the stored, encrypted value | Each time a model call needs it | | `vault` | Checks the reference shape only. Does not contact Vault | Each time a model call needs it, cached in memory for a few minutes | | `manual` | Creates the provider without a key and leaves any existing key untouched | Each time a model call needs it | A pull never clears a key. If `apiKey` is omitted, the provider keeps whatever it has. Each environment needs its own value. A provider that works in development fails the staging promotion if staging does not have the variable, the pushed secret, or the Vault path yet. Set them before you promote. See [Secrets and API keys](/guides/deploy/installation-settings/secrets). ## What is not managed People, membership, invitations, sign-in methods, SSO, SCIM, API keys, and the built-in roles are never touched by the file. ## Troubleshooting reload errors Reload returns the error text. Startup logs it as `Installation settings were not applied; previous settings kept`. | Message | Cause | Fix | |---|---|---| | `Unknown key "x" in .` | A key the server does not accept, often a preview section or a typo | Remove or rename it | | `Environment variable X is not set.` | A `serverEnv` reference names a variable missing on this install | Set the variable on the server and reload | | `No pushed secret "X" for provider "Y".` | An `env` reference has no value stored yet | Add the CI secret and run the deploy, or push it to the secrets endpoint | | `apiKey for provider "Y" must be a secret reference.` | `apiKey` is a plain string | Replace it with an object that has a `source` | | `Unknown secret source "X" ...` | `source` is not `serverEnv`, `env`, `vault`, or `manual` | Correct the source | | `Vault is not configured on this install.` | A provider uses `vault` and the server has no Vault settings | Set the Vault variables in [Environment variables](/guides/deploy/environment-variables) | | `Unknown model id(s) for openai: ...` | The model is not an active model for that provider on this install | Check the catalogue spelling, seed the catalogue in Admin Space, or pick a replacement | | `Unknown tool id(s) for : ...` | The tool does not exist for that provider | Use an id from the [file reference](/guides/deploy/installation-settings/file-reference) | | `A UI-created ... already uses "X"` | A row with that name was made in Admin Space | Rename the file entry or resolve the Admin Space row | | `Unknown workspace "X" for role "Y".` | A role lists a workspace that is neither declared nor existing | Declare the workspace or fix the name | | `Unknown role "X" for connection "Y".` | A grant names a role that does not exist | Declare the role or fix the name | | `Unknown workspace "X" for connection "Y".` | A grant names a workspace that does not exist | Declare the workspace or fix the name | | `No provider "openai" / "Name" for connection "C".` | `provider` or `providerName` does not match a provider | Match the provider's exact `name` | | `Multiple providers use ...` | Two providers share a provider slug and name | Rename one | | `Role "X" is built-in. ...` | A built-in role name is declared in `roles` | Remove it. Use a different name for a custom role | | `... has unknown permission(s): ...` | A permission string is not on the [permissions list](/guides/deploy/installation-settings/permissions) | Correct the string | | `privacy. is required.` | A privacy key is missing | Add all eight keys | | ` is not valid JSON.` | The file does not parse | Fix the JSON | | `Could not read from installation settings (HTTP 403)` | The token is missing, wrong, or lacks read access | Set `LUNNOA_SETTINGS_TOKEN` | | `LUNNOA_SETTINGS_REPOSITORY, LUNNOA_SETTINGS_BRANCH, and LUNNOA_SETTINGS_PATH must be set together.` | Only some of the three are set | Set all three or none | A model call that cannot get its key does not fail the pull, because Vault and `manual` keys are read when used. A `manual` provider without a key shows **Secret missing** in Admin Space. A `vault` read that fails returns an error to the caller and is not retried against another source. A `404` for the file is not an error. The reload reports `skipped` with `file-absent`. Check the branch name and path if you expected it to apply. ## Related - [Installation settings](/guides/deploy/installation-settings) - [File reference](/guides/deploy/installation-settings/file-reference) - [Promote and deploy](/guides/deploy/installation-settings/promote-and-deploy) Source: https://docs.lunnoa.com/guides/deploy/installation-settings/how-it-applies --- # Promote and deploy > Keep the settings file in a git repository, validate it on pull requests, and promote it from development to staging to production. The installation settings feature only needs a branch and a JSON file. This page describes the setup Lunnoa recommends: one repository, one long-lived branch per environment, and automation that validates changes and tells each install to reload. Merging into a branch is the deployment. Each install reads **its own branch**, so a change reaches production only after it has been merged through the earlier environments. ## Repository layout The recommended layout keeps one file per section and generates the file the install reads. ```text sections/ workspaces.json the value of the "workspaces" key roles.json the value of the "roles" key ai.json the value of the "ai" key (providers, connections) privacy.json the value of the "privacy" key preview/ shapes for sections the server does not accept yet settings/ lunnoa.settings.json generated file the install pulls scripts/ assemble.mjs sections/*.json into settings/lunnoa.settings.json validate.mjs JSON and environment-variable-name checks .github/workflows/ validate.yml runs on pull requests deploy.yml runs after a merge ``` Edit the files in `sections/`. Never edit `settings/lunnoa.settings.json` by hand. Only files directly in `sections/` are assembled. Do not move a file out of `preview/` until the server accepts that key. An unknown top-level key fails every reload. ## Make a change Create a short-lived branch from `dev`, or push to `dev` directly if your team allows it. Change the file in `sections/`. Check names and permissions against the [file reference](/guides/deploy/installation-settings/file-reference) and [permissions](/guides/deploy/installation-settings/permissions). Run the two scripts, then commit the section file and the generated file together. ```bash node scripts/assemble.mjs node scripts/validate.mjs ``` Merge into `dev`. Delete the short-lived branch after the merge. Open a pull request from `dev` into `staging`, then from `staging` into `prod`. `validate.mjs` does not call Lunnoa. It does not check permission strings, model or tool ids, referenced workspace and role names, or whether a referenced secret exists on the target install. A change can pass it and still fail the reload, so check those by hand. See [How settings are applied](/guides/deploy/installation-settings/how-it-applies). ## Branches Three long-lived branches, one per environment. `dev` is the default branch. ```text dev to staging to prod ``` | Branch | Install | How it changes | |---|---|---| | `dev` | Development | Pull request from a short-lived branch, or a direct push | | `staging` | Staging | Pull request from `dev` only | | `prod` | Production | Pull request from `staging` only | A pull request into `staging` from anywhere except `dev` fails. A pull request into `prod` from anywhere except `staging` fails. Do not skip `staging`. Point each install at its own branch: ```bash LUNNOA_SETTINGS_REPOSITORY=https://github.com/your-org/lunnoa-settings LUNNOA_SETTINGS_BRANCH=staging LUNNOA_SETTINGS_PATH=settings/lunnoa.settings.json ``` ## What the automation does | Workflow | When | What it does | |---|---|---| | **Validate settings** | On a pull request into `dev`, `staging`, or `prod` | Checks the promotion order, regenerates the file and fails if it differs from the committed one, then runs the schema check | | **Deploy settings** | After a push to `dev`, `staging`, or `prod` | Repeats the checks, then asks that one install to reload | The deploy step calls `POST /api/admin/installation-settings/reload` on the install. It never sends the settings content. The install pulls the file from its branch itself. ### Secrets on each GitHub environment Create a GitHub environment for each branch (`dev`, `staging`, `prod`) and set: | Secret | Example | |---|---| | `LUNNOA_URL` | `https://dev.your-deployment.example` | | `LUNNOA_RELOAD_TOKEN` | Bearer token for a SuperAdmin | A workspace API key (`lna_...`) cannot reload. If either secret is missing, the deploy step skips the reload with a warning. The settings still apply the next time that install restarts. ### Provider keys with `env` If a provider uses `{ "source": "env", "name": "OPENAI_API_KEY" }`, add a GitHub secret with that exact name to the same environment. The deploy step posts every such secret to the install's secrets endpoint first and then asks it to reload. It uses a machine user token for the push. To rotate a key, change the GitHub secret and run the deploy again. Providers that use `serverEnv`, `vault`, or `manual` need nothing here. See [Secrets and API keys](/guides/deploy/installation-settings/secrets). ## Before you promote | Check | Why it matters | |---|---| | Every `serverEnv` variable is set on the target install | A missing variable fails the whole reload | | Every `env` secret exists in the GitHub environment | Without a pushed value the reload fails | | Every `vault` path exists on the target Vault, and the Lunnoa role can read it | A wrong path only shows up when a model call needs the key | | Every model id exists on the target install | Catalogue seeding can differ between installs | | No same-name rows were created in Admin Space on the target | A clash fails the reload | | Privacy changes are called out in the pull request | `failMode` and entity lists change what reaches the model | ## Related - [Installation settings](/guides/deploy/installation-settings) - [How settings are applied](/guides/deploy/installation-settings/how-it-applies) - [Environment variables](/guides/deploy/environment-variables) Source: https://docs.lunnoa.com/guides/deploy/installation-settings/promote-and-deploy --- # Deploy with Dokploy > Create the Lunnoa Automate application on Dokploy and wire environment variables. Dokploy is a common path for Lunnoa self-host installs. The steps below assume you already have a Dokploy server and a Postgres instance. In Dokploy, create a new application from the Lunnoa Automate image or compose file your team uses. Point `DATABASE_URL` at Postgres. Prefer a private network URL over a public one. Add auth, storage, and feature flags from your runbook. Restart after saving. Hit the generated domain, complete first-run admin setup, then create a workspace.
After the app is up, create a workspace API key. See [Authentication](/api/auth). Source: https://docs.lunnoa.com/guides/deploy/dokploy --- # TypeScript client SDK > Build custom apps on top of Lunnoa Automate with @lunnoa/client. `@lunnoa/client` is the official TypeScript SDK for the Lunnoa Automate **Public API**. Use it to build portals, internal tools, chat UIs, and backends that talk to your deployment's agents, workflows, entities, queues, and knowledge. The SDK is **presentation-free** at the core: no components or widgets. Optional headless React hooks live in `@lunnoa/client/react` (see [React hooks](/guides/develop/client/react)). You bring your own UI framework and design system; the SDK provides typed data access, SSE agent chat streaming, and deployment-specific codegen. Coding agents (Cursor, Claude Code): start with [For agents](/guides/develop/client/for-agents) and the packaged `lunnoa-solution-design` + `lunnoa-client` skills. **`@lunnoa/client`** builds applications *on top of* the platform (your own product or portal). **`@lunnoa/toolkit`** builds integration apps that run *inside* the platform. Do not mix them for the same job. ## Requirements Before you install, make sure you have: - Node.js 20 or newer (or any runtime with `fetch` and web streams) - A Lunnoa Automate deployment URL - Lunnoa users who can sign in (invite, SSO, or SCIM) - For CLI commands only, a workspace API key (`lna_…`) ## Install Add the package to your app: ## Quickstart Sign in as a Lunnoa user, then list entities. Expansion fields are optional extras: responses are minimal by default, so request what you plan to render. ## Authentication Apps sign people in as Lunnoa users. `createBrowserClient` plus `lunnoa.auth.login` sends that person's JWT on every call, so their permissions, agent shares, and task history apply. Allow the app origin with `CORS_ALLOWED_ORIGINS` on the deployment. Workspace API keys (`lna_…`) are for operator commands: codegen, catalogue discovery, deploy, and `pull` / `push`. Constructing a client with an `lna_` key while `window` exists throws immediately. A SuperAdmin creates keys in **Admin Space → API Keys**. See [API authentication](/api/auth). Full login, 2FA, refresh, SSO, and token-store details: [Authentication](/guides/develop/client/auth). ## Resources Most namespaces map to the Public API surface. `approvals` uses the authenticated workspace API (see [Approvals](/guides/develop/client/approvals)). | Namespace | Purpose | |---|---| | `auth` | Login, 2FA, refresh, SSO discovery, `me`, local logout | | `agents` / `tasks` / `agentChat` | Agents, task history, SSE chat streaming | | `workflows` / `executions` | Trigger workflows and poll or wait for results | | `actions` | Run a single catalogue action as an ad-hoc Execution (`source: SDK`) | | `entities` / `entityTypes` | Objects and their schemas / state machines | | `tables` | Reference and lookup tables | | `knowledge` | Knowledge bases and documents | | `queues` / `queueItems` | Human-in-the-loop work items | | `approvals` | Request Approval inbox (workspace API) | | `variables` / `connections` | Workspace configuration | | `workflowApps` | Resolve app/action IDs to labels and icons | | `discovery` | Feature flags for the deployment's edition | List calls accept shared conventions: `expansion` (extra fields), `filterBy`, and pagination (`page` / `pageSize`). Many list resources also support async iteration (`entities.iterate(...)`, `queueItems.iterate(...)`). Browse every public operation on the [API reference](/api/reference). ## Guides in this section | Guide | What you will do | |---|---| | [Quick start](/guides/develop/client/start-a-new-app) | Scaffold the starter, build with a coding agent, deploy as a container | | [Authentication](/guides/develop/client/auth) | Login, refresh, SSO, token stores, auto-refresh | | [Codegen](/guides/develop/client/codegen) | Generate typed accessors for your deployment | | [For agents](/guides/develop/client/for-agents) | Cursor / Claude skills, paste block, short playbook | | [Discovery](/guides/develop/client/discovery) | Inspect the catalogue, agents, workflows, and entity schemas | | [Entities](/guides/develop/client/entities) | Query, create, and change entity state | | [Tables](/guides/develop/client/tables) | Read and upsert reference and lookup tables | | [Workflows](/guides/develop/client/workflows) | Trigger runs, render `executionPath`, resume `NEEDS_INPUT` | | [Agents](/guides/develop/client/agents) | Define, deploy, and run agents end to end | | [Run actions](/guides/develop/client/run-actions) | Call one catalogue action as an ad-hoc SDK Execution | | [Define locally](/guides/develop/client/define) | Author typed `define*` factories (actions, workflows, agents) | | [Start runs](/guides/develop/client/runs) | Run linear steps as one multi-step SDK Execution | | [CLI](/guides/develop/client/cli-deploy) | Discover the catalogue for a key, then upsert `define*` files by slug | | [Sync with the UI](/guides/develop/client/sync) | Pull and push JSON agent and workflow definitions | | [Execution progress](/guides/develop/client/execution-progress) | Timeline snapshots and live SSE `watchProgress` | | [Agent chat](/guides/develop/client/agent-chat) | Stream SSE chat in the AI SDK UIMessage format | | [Queues](/guides/develop/client/queues) | Work through human-in-the-loop queue items | | [Approvals](/guides/develop/client/approvals) | List pending approvals and decide | | [Errors](/guides/develop/client/errors) | Handle `LunnoaApiError` status helpers | ## Checklist for a new custom UI Use this as a short go-live list once the SDK is wired in. Confirm the base URL. Use `createBrowserClient` and [Authentication](/guides/develop/client/auth). Allow the app origin in `CORS_ALLOWED_ORIGINS`. Run `npx @lunnoa/client codegen` against the deployment and commit the output. See [Codegen](/guides/develop/client/codegen). Call `discovery.enabledFeatures()` and hide unsupported areas. See [Discovery](/guides/develop/client/discovery). Drive forms and tables from `attributeSchema` / `customInputConfig`, or from the generated types. Render progress with `executions.getProgress` / `watchProgress` (see [Execution progress](/guides/develop/client/execution-progress)). Resume `NEEDS_INPUT` with `submitInput`. See [Workflows](/guides/develop/client/workflows). Stream via SSE, handle resume and stop, load history from the task. See [Agent chat](/guides/develop/client/agent-chat). Map 401 to re-auth, 403 to hide the capability, and 429 to back off. See [Errors](/guides/develop/client/errors). ## Related - [API authentication](/api/auth): creating keys, JWT login, security notes - [API reference](/api/reference): full public OpenAPI operation list - [npm: @lunnoa/client](https://www.npmjs.com/package/@lunnoa/client): package page and release history Source: https://docs.lunnoa.com/guides/develop/client --- # Quick start: build an app with a coding agent > Scaffold the Lunnoa starter, let Claude Code, Cursor, or Codex design and build your app with you, then deploy it as a container. Describe an idea, approve a short brief, and let a coding agent build a custom app on your Lunnoa deployment. The app starts from [lunnoa-starter](https://github.com/lunnoa-automate/lunnoa-starter), a thin Next.js template wired to `@lunnoa/client`. ## Prerequisites - Node.js 20 or newer - A Lunnoa Automate deployment URL - Lunnoa users who can sign in. Add missing people in Lunnoa first (invite, SSO, or SCIM). - A workspace API key (`lna_…`) for the coding agent's CLI commands only. A SuperAdmin creates one in **Admin Space → API Keys**; see [API keys](/guides/adminspace/api-keys) and [API authentication](/api/auth). The running app does not use this key. - A coding agent: Claude Code, Cursor, or Codex ## What is in the starter | File | Purpose | |---|---| | `CLAUDE.md` / `AGENTS.md` | Rules the coding agent follows: design first, reuse before creating, build in slices | | `BRIEF.md` | The build brief. The agent writes it, you approve it before any code is written | | `.env` | Connection settings (see below) | | `Dockerfile` | Production image (Next.js standalone) | `npm install` runs a `postinstall` script (`lunnoa-client skills install`) that puts the `lunnoa-solution-design` and `lunnoa-client` skills into `.claude/skills/` and `.cursor/skills/`. See [For agents](/guides/develop/client/for-agents). ### Environment variables | Variable | Purpose | |---|---| | `LUNNOA_URL` | Your deployment URL. The app signs people in as Lunnoa users | | `LUNNOA_API_KEY` | Workspace API key for CLI commands only. Never prefix it with `NEXT_PUBLIC_` | The CLI reads the same `.env`. The app session does not. See [Authentication](/guides/develop/client/auth). Ask a Lunnoa admin to add the app's URL to `CORS_ALLOWED_ORIGINS`. ## Option A: scaffold it yourself `init` downloads the template, writes `.env` with `LUNNOA_URL` and `LUNNOA_API_KEY`, and asks for any value you did not pass. The app signs people in as Lunnoa users either way. The API key is only for CLI commands. Use `--template owner/repo[#ref]` or `--template ./local-folder` for your own starter. Then open `my-app` in Claude Code, Cursor, or Codex and describe your idea. ## Option B: paste a prompt (no terminal) Open an **empty folder** in Claude Code or Cursor and paste this prompt. Replace the placeholder with your idea. .", "", "Set up:", "1. Run `npx @lunnoa/client init .` in this empty folder (template: lunnoa-automate/lunnoa-starter).", "2. Run `npm install` so the Lunnoa skills are installed into .claude/skills and .cursor/skills.", "3. Read CLAUDE.md and follow it.", "4. Ask me for the Lunnoa URL and an API key (lna_...) for CLI commands only.", " Write them only to .env. The app signs people in as Lunnoa users.", " Never print the key, commit it, or put it in browser code.", "5. Verify the connection with `npx lunnoa-client workflows list --json`.", "", "Then:", "6. Use the lunnoa-solution-design skill to interview me about my idea.", "7. Inspect the workspace before creating anything, and reuse what exists:", " `npx lunnoa-client entity-types list --json`, `tables list --json`, `workflows list --json`,", " `agents list --json`, `tools list --for-agent --json`.", "8. Write BRIEF.md and wait for my approval before writing any code.", "9. Build in small slices. End each slice with a plain-language check I can do in the browser.", ], }, ]} /> ## What happens next The agent asks about triggers, users, data, human approvals, and integrations, and maps your answers to Lunnoa primitives: workflows, agents, objects, [tables](/guides/develop/client/tables), and queues. The agent writes the brief to `BRIEF.md`. Read it, correct it, and approve it. No code is written before that. The agent builds one vertical slice at a time with the `lunnoa-client` skill and ends each with a check you can run yourself. Try it before asking for the next slice. Ship the app as a container (below). ## Deploy as a container The starter's `Dockerfile` builds a Next.js standalone server. Configuration comes from environment variables at runtime, so one image works for any deployment, on any host that runs containers. The container needs `LUNNOA_URL` only. Pass credentials as **runtime** environment variables, not build arguments, so they never end up in an image layer. ### Example: Dokploy 1. Push the app to a Git repository. 2. In Dokploy, create an **Application** and connect the repository. 3. Set the build type to **Dockerfile**. 4. Add `LUNNOA_URL` under **Environment**. 5. Add a domain pointing at container port `3000`, then deploy. Coolify, a plain VM with Docker, or a Kubernetes cluster follow the same pattern: build the `Dockerfile`, set `LUNNOA_URL`, expose port `3000`. Browsers call the Lunnoa deployment directly, so add your app's domain to `CORS_ALLOWED_ORIGINS` on the deployment. ## Related - [For agents](/guides/develop/client/for-agents): skills, paste block, short playbook - [CLI](/guides/develop/client/cli-deploy): `init`, discovery, and deploy commands - [TypeScript client SDK](/guides/develop/client): overview and authentication - [Entities](/guides/develop/client/entities) and [Tables](/guides/develop/client/tables): objects vs lookup data Source: https://docs.lunnoa.com/guides/develop/client/start-a-new-app --- # For agents > Install Lunnoa Cursor and Claude skills, then discover and deploy with @lunnoa/client. Coding agents (Cursor, Claude Code) should start from the packaged skills, not the whole docs tree. Human guides below remain the canonical detail. To fetch the docs directly, use [llms.txt](https://docs.lunnoa.com/llms.txt) (index of every page with links to raw markdown) or [llms-full.txt](https://docs.lunnoa.com/llms-full.txt) (all pages in one file). Any page is also available as markdown by adding `.md` to its URL, for example `/guides/develop/client/entities.md`. Starting a new app from scratch? See the [Quick start](/guides/develop/client/start-a-new-app). ## Install the skills `@lunnoa/client` publishes two skills under `skills/`: | Skill | Job | |---|---| | `lunnoa-solution-design` | Interview the human, map intent to Lunnoa primitives, write a build brief | | `lunnoa-client` | Implement: auth, CLI discovery, codegen, `define*` / runs / JSON sync / CLI deploy, React hooks | After `npm install @lunnoa/client`, copy them into your app: This writes the skills of your installed SDK version into `.claude/skills/` (Claude Code) and `.cursor/skills/` (Cursor). To keep them in step with SDK updates, add it as a `postinstall` script in your `package.json` and add both folders to `.gitignore`. Prefer **solution-design** first when requirements are unclear, then **lunnoa-client**. ## Partner paste block Drop this into a new chat so the agent has credentials and the right skill order: --json. For a workflow trigger, apps get --json.", "Do not invent catalogue action ids or trigger ids.", ], }, ]} /> Never put an `lna_` key in browser code or client-bundled env vars, and do not use it as the app's login. See [Authentication](/guides/develop/client/auth). ## Agent playbook (short) 1. **Clarify** with `lunnoa-solution-design` (trigger, actor, data, HITL). Actors are Lunnoa users. 2. **Auth:** Lunnoa user JWT via `createBrowserClient` and `lunnoa.auth.login`. Do not sign the app in with `lna_`. The API key in `.env` is for CLI discovery, deploy, pull, and push only. 3. **Discover:** `npx @lunnoa/client tools list --json --for-agent`, then `tools get --json`. For a workflow trigger, `apps get --json` and use `triggers[].triggerId` in `defineTrigger`. Also `apps`, `connections`, `agents`, `workflows`, `entity-types`, `tables list` / `tables get `, `features`. The CLI reads `./.env` (real environment variables take precedence). `init ` scaffolds the starter, and `skills install` refreshes the skills. SDK equivalent: `workflowApps.list()`. Do not invent catalogue action ids or trigger ids. See [Discovery](/guides/develop/client/discovery) and [CLI](/guides/develop/client/cli-deploy). 4. **Codegen** for typed UIs: `npx @lunnoa/client codegen …`. See [Codegen](/guides/develop/client/codegen). 5. **Run vs save:** Ad-hoc: `actions.run`, `runs.start`, `workflows.execute`. Durable agents and workflows default to JSON in `lunnoa/` (`npx lunnoa-client status`, then `pull`, then `push`). That sets `codeSource` to `synced`. Use `npx @lunnoa/client workflows|agents deploy` on a `.ts` / `.js` / `.mjs` file only when the definition needs code. That sets `codeSource` to `generated` and locks the UI. `.json` deploy is a push. Entity types stay on `entity-types deploy`. Run `status` before editing, `pull` before `push`, and ask the human before `--force`. Commit `lunnoa/lunnoa.lock.json`. See [Sync with the UI](/guides/develop/client/sync), [Run actions](/guides/develop/client/run-actions), [Start runs](/guides/develop/client/runs), and [CLI](/guides/develop/client/cli-deploy). 6. **Wire step inputs in code:** pass trigger fields and earlier step outputs with `ref.trigger('caseId')` / `ref.step('load', 'rows', 0)`, and give the source step a `key`. Do not leave data wiring for the builder. See [Passing data between steps](/guides/develop/client/define#passing-data-between-steps). Branch approve / reject or if / else with `paths` on the last step; see [Branches](/guides/develop/client/define#branches). 7. **Entity attributes:** Unknown keys are rejected unless the type allows them; use `extensions` for flexible bags. See [Entities](/guides/develop/client/entities). 8. **Boundary:** Client `defineAction` is not toolkit `createAction`. Use `@lunnoa/toolkit` only for in-platform integration apps. ## Related guides | Guide | When | |---|---| | [Authentication](/guides/develop/client/auth) | User login, CORS, CLI keys | | [Agents](/guides/develop/client/agents) | End-to-end define, deploy, and chat | | [The agent file](/guides/develop/client/agents/file) | JSON identity, image, canvas, and what stays out of the file | | [Capabilities](/guides/develop/client/agents/capabilities) | Tools, links, skills, drive, and shares | | [Runtime settings](/guides/develop/client/agents/settings) | Every `settings` key | | [Define locally](/guides/develop/client/define) | `defineWorkflow` / `defineTrigger` / `defineAgent` / `defineEntityType` / `defineAction` | | [Entities](/guides/develop/client/entities) | Strict attributes, `extensions`, type deploy | | [Tables](/guides/develop/client/tables) | Reference and lookup data, upsert by slug | | [React hooks](/guides/develop/client/react) | Headless progress, chat, inbox, entities | | [Agent chat](/guides/develop/client/agent-chat) | SSE UIMessage streaming | | [CLI](/guides/develop/client/cli-deploy) | `tools list` / `tools get`, then deploy | | [Sync with the UI](/guides/develop/client/sync) | `pull`, `push`, `status`, conflicts, CI | | [TypeScript client SDK](/guides/develop/client) | Full human index | Source: https://docs.lunnoa.com/guides/develop/client/for-agents --- # Authentication > Login, refresh, SSO, and token stores with @lunnoa/client. Apps sign people in as Lunnoa users. Use these helpers so you do not reinvent login, refresh, or token storage. If someone is not in the workspace yet, provision them in Lunnoa first (invite, SSO, or SCIM). `lna_…` API keys are for the CLI (codegen, discovery, deploy, and `pull` / `push`), not for the app session. The SDK throws if an `lna_` key is used while `window` exists. Automate auth is **Bearer JWT** based. Login and refresh return tokens in JSON. There is no server logout endpoint; `auth.logout()` clears the local token store only. ## Choose a client factory | Helper | Credential | |---|---| | `createBrowserClient({ … })` | User JWTs in a token store (default: `localStorage`) | | `createServerClient({ accessToken })` | The same user JWT, when your backend already holds it | `createBrowserClient` defaults to `localStorage` keys `accessToken` and `refreshToken` (same keys as the built-in Automate UI). Pass `createMemoryTokenStore()` for Node scripts or tests. Allow your origin with `CORS_ALLOWED_ORIGINS` on the deployment. ## React hooks (`@lunnoa/client/react`) Opt-in React helpers for portals whose users sign in to Lunnoa. Peer dependency: `react` ≥ 18. For the full hook set (progress, needs-input, agent chat, approvals, entities), see [React hooks](/guides/develop/client/react). ", " " + "<" + "Shell />", " " + "", " );", "}", "", "function Shell() {", " const { user, status, login, logout, error } = useLunnoaAuth();", " if (status === 'loading') return

Loading…

;", " if (!user) {", " return (", " {", " const result = await login({ email, password });", " if (isLoginRequires2FA(result)) {", " // show TOTP form → verify2faLogin({ sessionToken, token })", " }", " }}", " >", " Sign in", " ", " );", " }", " return (", "
", "

{user.email}

", " {error ?

{error}

: null}", " ", "
", " );", "}", ], }, ]} /> | Export | Role | |---|---| | `LunnoaAuthProvider` | Context: pass `client={createBrowserClient(...)}` or `baseUrl` (+ optional token store) | | `useLunnoaAuth()` | `{ user, status, login, verify2faLogin, loginWithToken, logout, listSsoProviders, getSsoLoginUrl, … }` | | `useLunnoaClient()` | Same `LunnoaClient` instance for `entities`, `actions.run`, `watchProgress`, … | | `useAccessToken()` | `{ getAccessToken, status }` for AI SDK chat Authorization headers | More hooks (`useExecutionProgress`, `useNeedsInput`, `useAgentChat`, `useApprovalsInbox`, `useEntityList`) are documented in [React hooks](/guides/develop/client/react). ## What `lunnoa.auth` wraps | Method | HTTP | Notes | |---|---|---| | `login({ email, password })` | `POST /api/auth/login` | Public. May return `{ requires2FA, sessionToken }` | | `verify2faLogin({ sessionToken, token })` | `POST /api/auth/2fa/verify-login` | Public. Completes 2FA login | | `loginWithToken({ token })` | `POST /api/auth/login-with-token` | Public. Exchanges SSO / email hidden JWT | | `refresh({ refreshToken? })` | `POST /api/auth/refresh-token` | Public. Returns a new access token (refresh is not rotated) | | `me()` | `GET /api/users/me` | Requires Bearer JWT | | `logout()` | (local only) | Clears the token store | | `sso.listProviders()` | `GET /api/auth/sso/providers` | Public discovery | | `sso.getLoginUrl(providerId)` | — | Builds `/api/auth/sso/:id/login` | Successful login helpers write camelCase tokens into the store (`accessToken` / `refreshToken`). Wire responses still use `access_token` / `refresh_token`. ## Auto-refresh on 401 When a `tokenStore` is configured and `autoRefresh` is true (default for `createBrowserClient`), a **401** on an authenticated request triggers one `POST /api/auth/refresh-token` using the stored refresh token, then retries the original call. If refresh fails, the store is cleared. You can still call `auth.refresh()` yourself (for example after catching `LunnoaApiError.isUnauthorized` when auto-refresh is off). ## SSO for custom portals 1. Call `auth.sso.listProviders()` to render buttons (and to respect `ssoEnforced` / `passwordAuthDisabled`). 2. Navigate the browser to `auth.sso.getLoginUrl(providerId)`. 3. The IdP callback hits Automate at `/api/auth/sso/:providerId/callback`, which redirects to **`CLIENT_URL/verify-token?token=…`** (the deployment's configured client URL, not an arbitrary custom origin). 4. Exchange the hidden token with `auth.loginWithToken({ token })`. Full browser SSO for a third-party origin is not a first-class server path unless `CLIENT_URL` is your app, or a BFF finishes the verify-token exchange and hands tokens to your portal. Password login and `loginWithToken` can be called from any CORS-allowed origin. ## Token stores ```typescript import { createMemoryTokenStore, createLocalStorageTokenStore, LunnoaClient, } from '@lunnoa/client'; const lunnoa = new LunnoaClient({ baseUrl, tokenStore: createMemoryTokenStore(), // or createLocalStorageTokenStore() }); ``` Implement `TokenStore` yourself when tokens live in httpOnly cookies on your BFF: your store reads/writes via your backend; Lunnoa still receives Bearer JWTs. ## Related - [TypeScript client SDK](/guides/develop/client): overview and resource map - [API authentication](/api/auth): API keys, security notes - [Errors](/guides/develop/client/errors): 401 refresh mapping Source: https://docs.lunnoa.com/guides/develop/client/auth --- # React hooks > Headless React hooks for auth, progress, chat, approvals, and entities. `@lunnoa/client/react` ships **headless** React hooks for apps whose users sign in to Lunnoa. There are no UI components: you render with your own design system. All hooks (except auth bootstrap) need a surrounding `LunnoaAuthProvider`. These examples assume that sign-in flow from the [Authentication](/guides/develop/client/auth) guide. ## Peers | Package | Required when | |---|---| | `react` ≥ 18 | Any `@lunnoa/client/react` import | | `@ai-sdk/react` | Only for `useAgentChat` (pairs with the `ai` dependency already on `@lunnoa/client`) | ```bash npm install @lunnoa/client react npm install @ai-sdk/react # only if you use useAgentChat ``` ## Auth (provider) See [Authentication](/guides/develop/client/auth) for `LunnoaAuthProvider`, `useLunnoaAuth`, `useLunnoaClient`, and `useAccessToken`. ## Execution progress `useExecutionProgress(executionId | null)` subscribes via `executions.watchProgress`, keeps the latest snapshot, and aborts on unmount or id change. ## Needs input `useNeedsInput(executionOrProgress)` derives the waiting `NEEDS_INPUT` step and optional `pendingInput` field schema, then exposes `submitInput(values)`. { /* refresh timeline */ },", "});", "", "if (waiting && pendingInput) {", " // render form from pendingInput.fields, then:", " // await submitInput({ [fieldId]: value });", "}", ], }, ]} /> Null or non-waiting sources return `waiting: false` without throwing. ## Agent chat `useAgentChat(agentId, taskId?)` is a thin wrapper around AI SDK `useChat` + `DefaultChatTransport`, pointed at: `${baseUrl}/api/agents/${agentId}/tasks/${taskId}/stream-message` with a Bearer token from the auth provider. If `taskId` is omitted, the hook generates one with `crypto.randomUUID()` and keeps it for the hook lifetime. The hook sends preview mode (10 model rounds). Pass `{ chatMode: 'builder' }` only for an agent-editor interview; that mode stops after 4 rounds. See [Agent chat](/guides/develop/client/agent-chat). For lower-level streaming without React, use `lunnoa.agentChat.streamMessage` from the [Agent chat](/guides/develop/client/agent-chat) guide. ## Approvals inbox `useApprovalsInbox(options?)` loads `approvals.inbox()` for the current user. Polling is off by default; pass `pollIntervalMs: 15_000` for a live inbox. After `decide`, the hook refreshes the inbox. ## Entity list `useEntityList({ objectTypeSlug, ...listOptions })` wraps `entities.list` with page state and light filter helpers. Options match `ListEntitiesOptions` from the core SDK. `setSearch` / `setState` reset to page 1. ## Related - [Authentication](/guides/develop/client/auth): provider and session helpers - [Execution progress](/guides/develop/client/execution-progress): `getProgress` / `watchProgress` - [Agent chat](/guides/develop/client/agent-chat): SSE protocol details - [Approvals](/guides/develop/client/approvals): inbox and decide - [Entities](/guides/develop/client/entities): list filters and expansion Source: https://docs.lunnoa.com/guides/develop/client/react --- # Codegen > Generate typed accessors for your Lunnoa Automate deployment. Entity types, workflow inputs, and agents are defined **per deployment**, so the generic SDK types them loosely. Generate typed accessors against your deployment first, then commit the output with your app. ## Run codegen This writes `lunnoa.generated.ts` with `createDeploymentClient`. Entity attributes, workflow inputs, and agents become compile-time checked: Re-run codegen whenever entity types, workflows, or agents change on the deployment. The generated file also exports: - `DEPLOYMENT_SCHEMA_FINGERPRINT`: stable string of entity-type slug, `schemaRevision`, and `allowUnknownAttributes` - `ENTITY_TYPE_SCHEMA_REVISIONS`: map of slug → revision at codegen time Compare those against a live `entityTypes.list()` when you need to detect stale generated types after a schema deploy. If you cannot run codegen yet, fall back to the generic namespaces and [discover schemas at runtime](/guides/develop/client/discovery). ## Next - [Discovery](/guides/develop/client/discovery): inspect schemas without generated types - [Entities](/guides/develop/client/entities): query and create records - [CLI](/guides/develop/client/cli-deploy): discover the catalogue, then deploy `defineEntityType` before regenerating - [TypeScript client SDK](/guides/develop/client): overview and authentication Source: https://docs.lunnoa.com/guides/develop/client/codegen --- # Discovery > Inspect the catalogue, agents, workflows, and entity schemas for an API key. If you cannot run [codegen](/guides/develop/client/codegen) yet, discover schemas at runtime and build forms from them. Prefer codegen once you have a stable deployment and API key. Do not invent catalogue action ids or model ids. For a coding agent, prefer the [CLI](/guides/develop/client/cli-deploy) (`tools list` / `tools get --json`, and `ai-connections list --json` before `defineAgent`). `lunnoa.actions.get(appId, actionId)` only looks up one action you already know. ## CLI (preferred for agents) Same credentials as deploy (`--url`, `--api-key`, or `LUNNOA_*` / `lunnoa.config`). `--json` is the machine-readable form. `tools list` is compact (`appId`, `actionId`, name, flags). `tools get` returns `inputConfig`, `inputFields`, and a `defineAction` sketch. `ai-connections list` returns each AI connection and the `models[].id` values that connection accepts. Use one of those ids as `defineAgent({ model })` and pass that connection with `defineAiConnection({ id })`. Omitting `aiConnection` does not assign one. `connections list` is app connections (Gmail, HTTP), not model providers. Full command table: [CLI](/guides/develop/client/cli-deploy). ## List what the deployment offers (SDK) Call `discovery.enabledFeatures()` early so you can hide areas the deployment's edition or infrastructure does not support. ## Use the schemas - `attributeSchema.sections[].fields[]` defines each entity field (`id`, `label`, `type`, `required`). Build forms and tables from this. - `stateSchema.states[]` / `transitions[]` is the entity state machine. Prefer `entities.getStateTransitions(id)` for transitions valid *now*. - Manual-trigger input fields live on `workflows.get(id, { expansion: ['triggerNode'] })` → `triggerNode.value.customInputConfig`. Declare the same fields at deploy time with `defineTrigger({ inputs })`. See [Define locally](/guides/develop/client/define). - Catalogue trigger ids come from `npx @lunnoa/client apps get --json` (`triggers[].triggerId`). Do not invent them. Field types commonly include `text`, `number`, `currency`, `date`, `boolean`, and `dropdown` (with `config.options`). Always request the expansions you need: responses are minimal by default. ## Next - [CLI](/guides/develop/client/cli-deploy): `tools list` / `tools get` and deploy - [Entities](/guides/develop/client/entities): create and update records from those schemas - [Workflows](/guides/develop/client/workflows): read trigger input config and run workflows - [Codegen](/guides/develop/client/codegen): replace runtime discovery with typed accessors Source: https://docs.lunnoa.com/guides/develop/client/discovery --- # Entities > Query, create, and change entity state with @lunnoa/client. Entities (Objects) are typed records defined by your deployment's entity types. Load the schema, create records with attributes keyed by field ID, then iterate or change state as needed. Prefer [codegen](/guides/develop/client/codegen) when you can: `lunnoa.entities.invoice.create({ ... })` is compile-time checked. Without it, use the generic `entities` / `entityTypes` namespaces and [discovery](/guides/develop/client/discovery). ## Objects vs tables | Use | When | |---|---| | **Object** (entity) | A business record with identity and a lifecycle: states and history, linked to executions, agents, and queues. Grows with every transaction (invoices, cases, onboarding requests). | | **Table** | Small, slowly changing reference or lookup data, roughly under 10,000 rows (cost centres, country codes, approval limits). | If a record needs a state, an audit trail, or a human to act on it, make it an object. For lookup data, see [Tables](/guides/develop/client/tables) (`lunnoa.tables.getBySlug`, `npx @lunnoa/client tables list --json`). ## Attribute rules By default, entity types **reject unknown attribute keys** on create and update. Keys must match field IDs declared on the type's `attributeSchema`. | Key | Allowed when | |---|---| | Declared field ID | Always (subject to required / type checks) | | `extensions` | Always, as a JSON object (intentional flexible bag) | | Any other key | Only if the type has `allowUnknownAttributes: true` | Admins set `allowUnknownAttributes` in Adminspace object type **Settings**, or via the [CLI](/guides/develop/client/cli-deploy) / `defineEntityType`. Schema itself is authored in Adminspace (Form or JSON) or deployed from code; the Public SDK does not invent new field definitions on write. ## Query and create ## List conventions - One page: `entities.list({ objectTypeSlug, state, search, page, pageSize, expansion })` (default page size 20, max 100) - Everything: `entities.iterate(...)` fetches pages lazily for exports or aggregations - State changes are validated against the type's state machine - Prefer `entities.getStateTransitions(id)` for transitions valid *now*, not the full schema ## Deploy entity types from code To create or update the **type** (schema), use `defineEntityType` and `npx @lunnoa/client entity-types deploy`. Agents, workflows, and entity types are workspace-scoped. See [Define locally](/guides/develop/client/define) and [CLI](/guides/develop/client/cli-deploy). ## Next - [Workflows](/guides/develop/client/workflows): trigger automation from entity events or forms - [Discovery](/guides/develop/client/discovery): build dynamic forms from `attributeSchema` - [TypeScript client SDK](/guides/develop/client): overview and authentication Source: https://docs.lunnoa.com/guides/develop/client/entities --- # Tables > Read and upsert reference and lookup tables with @lunnoa/client. Tables hold small, slowly changing reference data: cost centres, country codes, approval limits, product mappings. Each table has columns (`{ key, label }`) and rows keyed by column key. Read them from your app, deploy them from code, and let workflows look values up with the **Lookup** action of the **Tables** app. ## Objects or tables? | Use | When | |---|---| | **Object** ([entity](/guides/develop/client/entities)) | A business record with identity and a lifecycle: states and history, linked to executions, agents, and queues. Grows with every transaction (invoices, cases, onboarding requests). | | **Table** | Reference or lookup data that changes rarely and stays small (practical limit around 10,000 rows). | Rule of thumb: if a record needs a state, an audit trail, or a human to act on it, make it an object. If it only answers "what is the value for this key?", make it a table. ## Rules - Table slugs are unique **per workspace**. Entity type slugs, by contrast, are unique across the whole deployment. - Rows are stored as one JSON document per table, so keep tables to roughly 10,000 rows. Larger or fast-growing data belongs in objects. - Permissions: reading needs `tables:read`; upsert needs `tables:create` and `tables:update`. ## Read tables `list` returns tables without columns and rows (including `slug` and `managedByCode`). `get` and `getBySlug` return the full table. row.costCentre === 'CC-100');", "", "const same = await lunnoa.tables.get(limits.id);", ], }, ]} /> ## Upsert from code `upsertBySlug` creates or updates a table by workspace and slug. Omitted `columns` or `rows` keep their current value, so you can update metadata without resending the data. `managedByCode` defaults to `true`. Content is validated on the server. The `description` matters: agents use it to choose the right table. ## CLI `tables get` accepts a slug or an ID (a UUID is treated as an ID, anything else as a slug). ## Public API | Operation | Endpoint | |---|---| | List (without rows) | `GET /api/tables` | | Get by slug (with columns and rows) | `GET /api/tables/slug/{slug}` | | Get by ID | `GET /api/tables/{tableId}` | | Upsert by slug | `POST /api/tables/upsert` | See the [API reference](/api/reference) for request and response schemas. ## Next - [Entities](/guides/develop/client/entities): business records with state and history - [CLI](/guides/develop/client/cli-deploy): discover and deploy from the terminal - [Discovery](/guides/develop/client/discovery): inspect what a deployment offers Source: https://docs.lunnoa.com/guides/develop/client/tables --- # Workflows > Trigger workflows, render executionPath, and resume NEEDS_INPUT. Use the SDK to start workflow executions, wait for results, and render progress in a custom UI. These examples assume an authenticated `lunnoa` client from the [overview](/guides/develop/client). ## Trigger and wait Start an execution, then wait until it finishes (or pauses for input). Prefer `executeAndWait` when you do not need the intermediate ID. Manual-trigger input fields come from `workflows.get(id, { expansion: ['triggerNode'] })` → `triggerNode.value.customInputConfig`. Declare them on deploy with `defineTrigger({ inputs })`, and pass them into step settings with `ref.trigger('')`. See [Define locally](/guides/develop/client/define) and [Discovery](/guides/develop/client/discovery). ## Render progress from executionPath Render progress from the `executionPath` expansion, not from raw `nodes` / `edges`. It is the public, business-readable step list: Step statuses include `RUNNING`, `SUCCESS`, `FAILED`, `NEEDS_INPUT`, `SCHEDULED`, `RETRYING`, and `WAITING`. Nest steps that carry `iterationOf` under their loop parent. Resolve `appId` / `actionId` to icons via `workflowApps.list()`. For a live view, poll `executions.get` with `executionPath` every 1–2 seconds while the status is non-terminal. Only the single-execution read honours the `executionPath` expansion. ## Resume a NEEDS_INPUT execution Workflows can pause for human input. The waiting step appears in `executionPath` with `status: 'NEEDS_INPUT'`. Render your own form, then submit values keyed by field ID. s.status === 'NEEDS_INPUT',", ");", "", "await lunnoa.executions.submitInput(executionId, waiting!.nodeId, {", " approved: true,", " comment: 'Release the payment.',", "});", "", "const finished = await lunnoa.executions.waitUntilFinished(executionId);", ], }, ]} /> `waitUntilFinished` stops on `NEEDS_INPUT` by default so you can show a form. Pass `stopOnNeedsInput: false` to wait through it. `submitInput` is acknowledged immediately; the run resumes asynchronously. For **Request Approval** nodes (eligible approvers, approve/reject), use `lunnoa.approvals` or `executions.submitApproval` instead of `submitInput`. See [Approvals](/guides/develop/client/approvals). ## Next - [Approvals](/guides/develop/client/approvals): pending Request Approval inbox and decide - [Queues](/guides/develop/client/queues): human-in-the-loop work items outside a single execution - [Errors](/guides/develop/client/errors): handle failed starts and forbidden roles - [Sync with the UI](/guides/develop/client/sync): keep workflow JSON in `lunnoa/` in step with the builder - [TypeScript client SDK](/guides/develop/client): overview and authentication Source: https://docs.lunnoa.com/guides/develop/client/workflows --- # Agents > Define, deploy, and run Lunnoa agents with @lunnoa/client. Use `@lunnoa/client` to **build agents as code** and **run them** from your own apps. You author a typed definition, deploy it into the workspace, then open chat tasks over the Public API. Lunnoa owns runtime, authorisation, connections, and audit logging so engineers can focus on the agent’s behaviour. Coding agents (Cursor, Claude Code, and similar) can drive this flow with the packaged skills. See [For agents](/guides/develop/client/for-agents). **`@lunnoa/client`** defines and consumes agents on your deployment. **`@lunnoa/toolkit`** builds integration apps that run *inside* Automate. Agent tools that call catalogue actions use `defineAction` on the client, not toolkit `createAction`. ## Goal By the end of this guide you will: 1. Define an agent with `defineAgent`, or as JSON in `lunnoa/` 2. Save it with the CLI (`push` for JSON, `agents deploy` for TypeScript) 3. Run a chat turn with `agentChat.streamMessage` ## Requirements - Node.js 20 or newer - A Lunnoa Automate deployment URL - A workspace API key (`lna_…`) with permission to manage and use agents in the workspace - An AI connection already configured in Automate (deploy does not create connections) ## 1. Define the agent locally `defineAgent` is pure typed config. Nothing is written to the platform until you `push` a JSON file or `agents deploy` a TypeScript file. JSON is the two-way path with the UI. See [Sync with the UI](/guides/develop/client/sync). The JSON file is what you commit under `lunnoa/agents/`. Its prompt is `greeter.instructions.md` in the same folder. Field rules, including which keys a push clears and which it leaves alone: [Sync with the UI](/guides/develop/client/sync#write-an-agent). A TypeScript file is for a definition that needs code. Deploying it locks the agent in the UI. Upsert identity is the workspace-scoped **`slug`**. The slug is unique in the workspace. Nested `defineWorkflow` tools are supported: deploy creates those workflows first, then links them via `workflowIds`. Full factory table: [Define locally](/guides/develop/client/define). Set `model` to a `models[].id` from `npx @lunnoa/client ai-connections list --json`. Pass `defineAiConnection({ id })` for the connection that accepts that model. Omitting `aiConnection` does not assign one. Credentials stay on Lunnoa; never put secrets in the definition file. The JSON file can set more than this TypeScript example. The reference is split into three pages: | Page | What it covers | |---|---| | [The agent file](/guides/develop/client/agents/file) | Identity, instructions, model, profile image, canvas, and what cannot live in the file | | [Capabilities](/guides/develop/client/agents/capabilities) | Tools, workflows, sub-agents, connections, knowledge, variables, objects, MCP, A2A, skills, drive, and shares | | [Runtime settings](/guides/develop/client/agents/settings) | The `settings` object | A TypeScript `defineAgent` does not write those extra fields. A later `agents deploy` leaves them as they are. Use the JSON file when you need them. ## 2. Deploy into Automate Prefer the CLI. A TypeScript file sets `codeSource` to `generated`. The agent appears in the UI with the badge **Managed by code**, and the UI will not edit it. A JSON file in `lunnoa/agents/` is pushed instead, sets `codeSource` to `synced`, and can be edited in the UI. `codeSource` replaces `managedByCode` on agents and workflows. See [Sync with the UI](/guides/develop/client/sync). Flags and env fallbacks: `--url` / `LUNNOA_URL` and `--api-key` / `LUNNOA_API_KEY`. The workspace comes from the API key. Optional `lunnoa.config.ts` in the working directory can supply the same values. For TypeScript definition files, run under Node with `--experimental-strip-types` (Node 22+) or use `tsx`. Details and catalogue discovery: [CLI](/guides/develop/client/cli-deploy). JSON round-trip: [Sync with the UI](/guides/develop/client/sync). ## 3. Run the agent (chat) After deploy, resolve the agent id (Automate UI, `agents.list`, or codegen) and stream a turn. A **task** is one conversation thread. Client-generated UUIDs are fine; the first message creates the task. For React UIs, prefer `useAgentChat` from `@lunnoa/client/react`. Resume and stop helpers, chunk types, and proxy notes: [Agent chat](/guides/develop/client/agent-chat). With deployment codegen you can call agents by generated name (for example `lunnoa.agents.supportTriage.streamMessage(...)`). See [Codegen](/guides/develop/client/codegen). ## What Lunnoa handles for you | Concern | Platform behaviour | |---|---| | **Runtime** | Model calls, tool rounds, and streaming run on Automate | | **Authorisation** | API keys / JWTs and RBAC decide who may deploy, list, and chat | | **Connections** | Secrets and app credentials stay in workspace connections | | **Logging and audit** | Chat turns and tool use are persisted on the deployment | | **Reuse** | Catalogue actions and connections are shared across agents and workflows | Your job is the agent definition, tools, and the product UI. Lunnoa is the control plane. ## Auth Chat from an app runs as the signed-in Lunnoa user, so agent shares and task history are theirs. Use `createBrowserClient`. Deploy from the CLI uses the workspace API key (`--api-key` / `LUNNOA_API_KEY`). That key is not the app's login. Never ship an API key to the browser. Full detail: [Authentication](/guides/develop/client/auth) and [API authentication](/api/auth). ## Related | Guide | When | |---|---| | [For agents](/guides/develop/client/for-agents) | Cursor / Claude skills and playbook | | [The agent file](/guides/develop/client/agents/file) | JSON identity, image, canvas, and exclusions | | [Capabilities](/guides/develop/client/agents/capabilities) | Tools, links, skills, drive, and shares | | [Runtime settings](/guides/develop/client/agents/settings) | Every `settings` key | | [Define locally](/guides/develop/client/define) | `defineAgent` / `defineWorkflow` / `defineAction` | | [CLI](/guides/develop/client/cli-deploy) | Discover tools, then upsert by slug | | [Sync with the UI](/guides/develop/client/sync) | `pull`, `push`, and `status` for JSON definitions | | [Agent chat](/guides/develop/client/agent-chat) | SSE streaming depth | | [Workflows](/guides/develop/client/workflows) | Trigger and wait on workflow runs | | [API reference](/api/reference) | Full Public API operation list | Source: https://docs.lunnoa.com/guides/develop/client/agents --- # The agent file > Identity, instructions, model, profile image, and canvas on a Lunnoa agent JSON file. An agent you want to edit in the UI and in git lives in `lunnoa/agents/.json`. The prompt lives beside it in `.instructions.md`. `pull` writes both. `push` sends them and rewrites the JSON to the definition Lunnoa stored. A TypeScript `defineAgent` is a smaller surface: slug, name, description, model, instructions, AI connection, app connections, and tools. It does not write the fields on this page. Use the JSON file for those. See [Agents](/guides/develop/client/agents) for deploy and chat, and [Sync with the UI](/guides/develop/client/sync) for `pull` and `push`. The schema is `node_modules/@lunnoa/client/schemas/agent.schema.json`. Required keys are `kind` (`agent`), `slug`, `name`, and `instructions`. ## Identity | Field | Rules | |---|---| | `slug` | Lowercase letters, digits, and hyphens. Unique in the workspace. This is the upsert key. Max 100 characters. | | `name` | Label people see. Max 100 characters. | | `description` | Optional. Max 1000 characters. Leaving it out of a later push clears it. | | `kind` | Always `agent`. | ## Instructions `instructions` is a string, or `{ "file": ".instructions.md" }`. `pull` always writes the markdown file and the file pointer. The CLI reads the markdown on `push`. App code that calls `defineAgent` on the JSON leaves `{ "file" }` as that object. It does not read the markdown. ## Model `model` is a `models[].id` from `npx @lunnoa/client ai-connections list --json`. `aiConnection` is `{ "id": "" }` for the connection that accepts that model. Leaving it out stores no connection. Do not copy a connection id into another deployment. Leaving `model` out of a later push clears it, and the agent cannot chat. Credentials for the connection stay in Lunnoa. ## Profile image `profileImageUrl` is a public URL, at most 255 characters. | In the file | What `push` does | |---|---| | A URL | Sets the image. | | `null` | Clears it on an agent that already exists. A new agent still gets a default face. | | Key omitted | Leaves the stored image. | `pull` writes the URL when one is set, and omits the key when it is not. ## Canvas `canvas` is the agent builder layout: `{ "": { "x": 0, "y": 0 } }`. At most 250 nodes. Each id is at most 128 characters. | In the file | What `push` does | |---|---| | An object | Replaces the saved positions. | | `null` | Clears them. | | Key omitted | Leaves the saved positions. | `pull` writes `canvas` when positions exist, and omits it when they do not. Workflow node positions are separate. A workflow push keeps the position of a step it matches by key. See [Sync with the UI](/guides/develop/client/sync). ## What stays out of this file These are real parts of an agent, and they have a home. That home is not a copy of a secret or of the sync hash inside `agents/.json`. | You want to set | Where it is written | |---|---| | Connection secrets, API keys, tokens | The connection record in Lunnoa. The file holds the connection id. | | A password on a public link | Lunnoa. The file can say `passwordProtected: true`. `false` clears the password. The password string is never written. | | The public link token | Minted on the server when `publicShare` is created. Read it in the UI. `pull` does not write it. `null` removes the link. | | `codeSource` | Set by the command. `push` sets `synced`. `agents deploy` on a TypeScript file sets `generated`. | | Sync revision | `lunnoa/lunnoa.lock.json`, per deployment. It is a hash of the definition. Putting it inside the definition would change the hash. | | A schedule, webhook, or app event | A workflow file. Agents have no trigger. | | Memory facts | Lunnoa. The policy (`memoryEnabled`, scope, retention) is in [Runtime settings](/guides/develop/client/agents/settings). | ### A trigger belongs on a workflow Create a workflow whose trigger is the schedule, webhook, or app event, and add a Message Agent step (`agents_action_message-agent`) that points at this agent's id. `pull` and `push` already round-trip that workflow file. See [Define locally](/guides/develop/client/define) and [Triggers](/guides/workflows/triggers). ### Revision and code source belong in the lock `lunnoa.lock.json` stores `id`, `revision`, and `fileHash` for this deployment. `pull` and `push` update it. Commit it with the JSON. Do not add `codeSource` or `revision` to the agent file. ## Related - [Capabilities](/guides/develop/client/agents/capabilities) - [Runtime settings](/guides/develop/client/agents/settings) - [Sync with the UI](/guides/develop/client/sync) Source: https://docs.lunnoa.com/guides/develop/client/agents/file --- # Capabilities > Tools, links, skills, drive, and shares on a Lunnoa agent JSON file. These fields say what the agent can use. They live on `lunnoa/agents/.json`. Leave a list out and `push` keeps what is already stored. Send a list, including `[]`, and that list replaces what is stored. Ids are for this deployment. Slugs are safer when the other resource is also in `lunnoa/`. See [The agent file](/guides/develop/client/agents/file) for identity and for what never goes in the file. ## Tools A tool is one catalogue action. Discover the id with `npx @lunnoa/client tools get --json`. Do not invent it. | Field | Required | Meaning | |---|---|---| | `key` | Yes | Stable id. Starts with a letter, then letters, digits, `_`, or `-`. The same key keeps the same node id across pushes. | | `id` | Yes | Catalogue action id, such as `http_action_send-request`. | | `name` | Yes | Name shown to the model. Max 100 characters. | | `input` | Yes | Pre-filled config. An empty object is allowed. Fields you leave empty are filled by the model. Do not put secrets here. | | `appId` | No | Catalogue app id. Omitted when it is the prefix of `id` before `_action_`. | | `description` | No | Shown to the model. Max 1000 characters. | | `connection` | No | `{ "id": "" }` when the action needs an account. | ## Workflows and sub-agents | Field | Each item | Meaning | |---|---|---| | `workflows` | `{ "slug" }` or `{ "id" }`, not both | Workflows this agent may run. | | `agents` | `{ "slug" }` or `{ "id" }`, not both | Sub-agents. | `push` sends workflow files before agent files, so a workflow slug in this file can be a file in the same folder. ## Connections, knowledge, and variables Each item is `{ "id": "" }`. | Field | Attaches | |---|---| | `connections` | App connections the agent's tools may use. | | `knowledge` | Knowledge notebooks the agent can search. | | `variables` | Workspace variables. | ## Objects | Field | Attaches | |---|---| | `objectTypes` | A whole object type, such as customers. | | `objects` | One pinned record. | Either item may include `scope`, a JSON object stored on the link: ```json { "id": "00000000-0000-4000-8000-000000000002", "scope": { "read": true } } ``` `pull` writes `scope` only when one is stored. `push` of an item without `scope` clears it. The agent runtime still uses one read-only rule for every linked object. The stored `scope` is kept so a later permission model can read it. It does not change access today. ## MCP and A2A | Field | Shape | Meaning | |---|---|---| | `mcpServers` | `{ "id", "connectionId"? }` | An MCP server. `connectionId` pins one user connection. Omit it and runtime uses the user's default. | | `a2aAgents` | `{ "id" }` | An A2A agent the agent may call. | ## Skills `skills` replaces the agent's skill assignments. | Field | Meaning | |---|---| | `slug` | Skill slug. The skill must already be installed. | | `enabled` | Defaults to `true`. | | `configuration` | A JSON object passed to the skill. `null` clears it. Do not put secrets here. | ```json "skills": [ { "slug": "policy-extract", "enabled": true, "configuration": { "locale": "en-GB" } } ] ``` `[]` removes every skill. Leaving `skills` out leaves them as they are. `pull` writes the list, including `[]`. ## Drive `drive` is the working folder mounted on the agent. `null` removes the mount. Leaving the key out leaves the mount. | Field | Meaning | |---|---| | `provider` | `GOOGLE_DRIVE`, `MICROSOFT_ONEDRIVE`, or `LUNNOA_STORAGE`. | | `folderId` | Folder id in that provider. | | `folderName` | Label, max 500 characters. | | `connectionId` | Required for Google Drive and OneDrive. Omit it for Lunnoa storage. | | `knowledgeId` | Notebook created for the folder, when one exists. `pull` writes it. | `pull` writes `drive` when a mount exists. A push restores that row. It does not create a new knowledge notebook if `knowledgeId` is missing. Mounting from the UI still creates one. ## Shares ### Signed-in grants `shares` replaces authenticated grants. Someone with the grant can open and chat. `[]` removes them. The API key's user must belong to the workspace, because each new grant records who created it. | Field | Meaning | |---|---| | `scope` | `USER`, `WORKSPACE`, or `GLOBAL`. | | `userId` | Required when `scope` is `USER`. An existing user. | | `workspaceId` | Required when `scope` is `WORKSPACE`. | | `maxMessagesPerHour` | 1 to 1000. Default 60. | One `GLOBAL` grant per agent. User and workspace ids are for this deployment. Sharing stays off while any of `dynamicActionDiscoveryEnabled`, `dynamicMcpDiscoveryEnabled`, or `dynamicSelfInstructionsEnabled` is on. Turn those off in [Runtime settings](/guides/develop/client/agents/settings) before you push grants. ### Public link `publicShare` updates the anonymous link. `null` deletes it. The token is created on the server and is not in the file. Read the link in the UI. | Field | Meaning | |---|---| | `enabled` | Whether the link accepts chats. | | `maxMessagesPerHour` | 1 to 1000. Default 60 on create. | | `expiresAt` | ISO-8601 time, or `null` to clear it. | | `passwordProtected` | `true` keeps the password already stored. `false` clears it. You cannot set a new password from the file. | A public link also stays off while dynamic discovery or self-maintained instructions is on. ## Related - [The agent file](/guides/develop/client/agents/file) - [Runtime settings](/guides/develop/client/agents/settings) - [Enable MCP on agents](/guides/mcp/enable-on-agents) Source: https://docs.lunnoa.com/guides/develop/client/agents/capabilities --- # Runtime settings > Every key in the settings object on a Lunnoa agent JSON file. `settings` is optional. A key you include is written. A key you leave out is left as stored. `pull` writes every key. Defaults below are what a new agent gets before you set them. Ranges are what `push` accepts. See [The agent file](/guides/develop/client/agents/file) for the rest of the JSON file. A normal chat from an app, or a Message Agent step, allows 10 model rounds. Build chat allows 4. Long-horizon mode raises that cap. A TypeScript `defineAgent` does not set `settings`. A later TypeScript deploy leaves them as they are. ## Sampling and the chat loop | Key | Range | Default | What it does | |---|---|---|---| | `temperature` | 0 to 2 | 1 | Randomness. Lower is more focused. | | `topP` | 0 to 1 | 1 | Nucleus sampling. | | `maxOutputTokens` | 1 to 4095, or `null` | unset | Cap on tokens in one reply. `null` clears it. | | `frequencyPenalty` | 0 to 2 | 0 | Reduces repeated phrases. | | `presencePenalty` | 0 to 2 | 0 | Encourages new topics. | | `seed` | integer, or `null` | unset | Fixed sampling seed. `null` clears it. | | `maxRetries` | 0 or more | 0 | Retries after a failed model call. | | `maxToolRoundtrips` | 0 or more | 5 | Tool loops stored on the agent. The chat cap above still applies. | | `messageLookbackLimit` | 0 to 100 | 40 | How many previous messages are sent to the model. | | `taskNamingInstructions` | string up to 1000 characters, or `null` | unset | How new tasks are named. | | `suggestedPrompts` | list of strings | empty | Welcome prompts, in this order. | ## Built-in provider tools `enabledBuiltInTools` is a list of tool ids. An empty list means every built-in tool for that provider is on. | Provider | Ids | |---|---| | OpenAI | `web_search`, `code_interpreter`, `file_search`, `dalle` | | Anthropic | `web_search`, `computer_use`, `text_editor`, `bash` | | Gemini | `google_search`, `code_execution`, `structured_outputs` | | Perplexity | `citations`, `grounded_search` | A tool the model does not support is ignored by the provider. ## Platform tools `enabledPlatformTools` is a list of Lunnoa tool ids. An empty list means none of them. These tools mostly help Build chat. They do not edit a workflow. | Id | What it does | Also needs | |---|---|---| | `search_available_actions`, `list_available_actions` | Find workspace app actions | `dynamicActionDiscoveryEnabled` | | `search_available_mcps` | Find MCP servers the user can access | `dynamicMcpDiscoveryEnabled` | | `propose_agent_instructions`, `propose_instruction_addition`, `propose_instruction_section_update` | Draft or edit instructions | The full rewrite needs `dynamicSelfInstructionsEnabled` | | `search_attached_knowledge`, `propose_knowledge_attach` | Search or propose notebooks | | | `search_available_skills`, `propose_skill_attach` | Find or propose skills | | | `propose_suggested_prompts` | Propose welcome prompts | | | `propose_drive_mount`, `drive_save_file`, `drive_list_recent`, `drive_read_file`, `drive_share_link`, `drive_save_generated_file` | Drive folder and files | A drive mount for the file tools. See [Capabilities](/guides/develop/client/agents/capabilities). | | `remember_fact`, `recall_relevant_memories` | Store and search memories | `memoryEnabled` | | `plan_write_todos`, `plan_update_todo` | Runtime plan | `enablePlanning`. Long-horizon mode turns planning on. | `search_available_triggers` and `propose_agent_trigger` are leftovers. They do nothing useful. Triggers belong on a workflow. ## Discovery | Key | Default | What it does | |---|---|---| | `dynamicActionDiscoveryEnabled` | on | Index workflow-app actions so the agent can propose them. | | `dynamicMcpDiscoveryEnabled` | on | Index MCP servers the user can access. | | `dynamicSelfInstructionsEnabled` | on | Let the agent propose a new instruction document. The user applies it in chat. | A new agent created from a file that omits these three starts with them off. `pull` then writes the stored values. Any one of them being on blocks shares and a public link. See [Capabilities](/guides/develop/client/agents/capabilities). ## Tool behaviour | Key | Default | What it does | |---|---|---| | `enabledToolPolicies` | `empty-retrieval-fallback` and `narrow-on-tool-loop` | `empty-retrieval-fallback` tells the model to say when a notebook search found nothing. `narrow-on-tool-loop` narrows tools after a repeated loop. | | `forcedTools` | `[]` | `{ "toolName", "mode" }` with `mode` of `first-turn` or `every-turn`. | | `enablePlanning` | off | Planning tools. | | `requirePlanApproval` | off | Heavy tools wait until the user approves the plan. | | `enableToolResultOffload` | off | Park oversized tool results. | | `toolResultOffloadThresholdBytes` | 16384 | 1024 to 2,000,000. | | `longHorizonMode` | off | Raises the step budget, and turns planning and offload on. | | `longHorizonMaxSteps` | 50 while long-horizon is on | 11 to 100, or `null` for the default of 50. | | `longHorizonMaxTokensPerRun` | unset | Soft token budget, 1 or more, or `null`. | ## Memory The file stores the policy. The facts stay in Lunnoa and are not in the file. | Key | Default | What it does | |---|---|---| | `memoryEnabled` | off | Remember and recall facts. | | `memoryScope` | `PER_USER_PER_AGENT` | `PER_USER`, `PER_AGENT`, or `PER_USER_PER_AGENT`. | | `memoryRetentionDays` | 90 | 1 to 3650. | ## Privacy and channels | Key | Default | What it does | |---|---|---| | `piiRoutingMode` | `INHERIT` | `INHERIT`, `AUTO_FALLBACK`, `ASK`, `BLOCK`, or `ANONYMIZE`. | | `piiFallbackConnectionId` | unset | AI connection used when routing falls back. `null` clears it. | | `piiFallbackModelId` | unset | Model used when routing falls back. `null` clears it. | | `webAccess` | no row | `true` or `false` sets web search. `null` removes the row. | | `phoneAccess` | no row | `true` or `false` sets outbound calls. `null` removes the row. | ## Related - [The agent file](/guides/develop/client/agents/file) - [Capabilities](/guides/develop/client/agents/capabilities) - [Builder tools](/guides/agents/builder-tools) Source: https://docs.lunnoa.com/guides/develop/client/agents/settings --- # Run actions > Call a single catalogue action as an ad-hoc SDK Execution. Use `lunnoa.actions.run` when you need one app action without building a workflow graph. The platform creates a **one-step Execution** with `source: SDK`, runs the action through the same path as workflow steps, then finalises that Execution. These examples assume an authenticated `lunnoa` client from the [overview](/guides/develop/client). Ad-hoc action runs are Executions, not a separate ActionRun inbox. List and poll them with `executions.list` / `executions.get` / `executions.waitUntilFinished`, the same as [Workflows](/guides/develop/client/workflows). ## Discover app and action IDs Catalogue metadata (including each action's `inputConfig`) comes from the CLI or `workflowApps.list()`. Prefer `npx @lunnoa/client tools list --json` then `tools get --json` when a coding agent is choosing `appId` and `actionId`. `lunnoa.actions.get(appId, actionId)` only looks up one action you already know. app.id === 'microsoft-outlook');", "const slack = apps.find((app) => app.id === 'slack');", "", "// Each action exposes id, name, description, needsConnection, inputConfig", "for (const action of (outlook?.actions as Array<{ id?: string; name?: string }> | undefined) ?? []) {", " console.log(action.id, action.name);", "}", "", "// Thin helper when you already know both IDs:", "// const def = await lunnoa.actions.get(", "// 'microsoft-outlook',", "// 'microsoft-outlook_action_get-email-by-id',", "// );", ], }, ]} /> See also [Discovery](/guides/develop/client/discovery). ## Run an action `actions.run` returns the Execution id plus the synchronous status, output, and single-step `executionPath`. Both examples below use real catalogue apps that need a **Connection instance UUID** (`connectionId`). Copy it from **Connections** in the product UI, or from `lunnoa.connections.list()`. ### Read Outlook mail Retrieves one message with `microsoft-outlook_action_get-email-by-id`. Message IDs usually come from an Outlook **Email Received** trigger payload or from Microsoft Graph. ### Send a Slack message Posts to a channel with `slack_action_send-message-to-channel`. Pass the Slack channel ID (for example `C0123456789`), not the `#channel-name`. Invite the Lunnoa bot to the channel first (`/invite @Lunnoa Labs`). ## Connection UUID rules When an action has `needsConnection: true`, pass the **Connection instance UUID** (`Connection.id`), not the catalogue connection-type key. | Situation | Behaviour | |---|---| | `connectionId` provided | Used after auth checks (`canUseConnection`) and app match | | Omitted, exactly one connection for that `workflowAppId` | That connection is used | | Omitted, multiple connections | **400** listing that `connectionId` is required (fail-closed; no silent “oldest wins”) | | Omitted, none | **400** asking you to create a connection or pass `connectionId` | Copy the UUID from **Connections** in the product UI (table ID column or connection detail page), or from `lunnoa.connections.list()`. ## Poll like any other Execution The run appears in `executions.list` with `source: SDK`. Filter with `filterBy: ['source:SDK']` when you only want ad-hoc runs. Render progress from `executionPath`, the same as workflow runs. See [Workflows](/guides/develop/client/workflows). ## Permissions Apps call `POST /api/actions/run` as the signed-in Lunnoa user. That user needs `workflows:execute` (plus connection access when a connection is used). Operator scripts and the CLI may use an API key with the same permission. ## Related - [Start runs](/guides/develop/client/runs): linear multi-step SDK Executions (`runs.start`) - [Define locally](/guides/develop/client/define): `defineAction` / `defineWorkflow` factories - [Workflows](/guides/develop/client/workflows): multi-step graph runs and `NEEDS_INPUT` - [Discovery](/guides/develop/client/discovery): catalogue and schema inspection - [Toolkit Actions](/guides/develop/toolkit/actions): authoring actions with `@lunnoa/toolkit` (different job) - [API reference](/api/reference): `POST /api/actions/run` Source: https://docs.lunnoa.com/guides/develop/client/run-actions --- # Define locally > Author typed workflow, agent, and entity-type definitions with define* factories. Use the `define*` factories in `@lunnoa/client` to describe connections, catalogue actions, workflows, agents, and entity types as **pure typed config**. Nothing is deployed or executed until you call [Start runs](/guides/develop/client/runs) or the [CLI](/guides/develop/client/cli-deploy). These examples assume you import from `@lunnoa/client`. Discover catalogue ids with `npx @lunnoa/client tools list` / `tools get`, and model ids with `npx @lunnoa/client ai-connections list --json`, before writing `defineAction` or `defineAgent`. `defineAgent` and `defineWorkflow` also accept a parsed JSON definition file, including `$schema` and `instructions: { file }`. Those files live in `lunnoa/` and round-trip with the UI through `pull` and `push` (`codeSource: "synced"`). A TypeScript definition deployed with `agents deploy` or `workflows deploy` sets `codeSource` to `generated` and stays locked in the UI. `codeSource` replaces `managedByCode` on agents and workflows. See [Sync with the UI](/guides/develop/client/sync). `@lunnoa/toolkit` `createAction` / `createApp` build integration apps that run **inside** Automate. Client `defineAction` only **binds** an existing catalogue action (for example `http_action_send-request`). Credentials stay on Lunnoa; connection refs are never “deployed”. ## Factories | Factory | Role | |---|---| | `defineConnection({ id? })` | Ref to an app `Connection` UUID | | `defineAiConnection({ id? })` | Ref to an `AiProviderConnection` UUID | | `defineAction({ id, connection?, … })` | Catalogue action binding | | `defineTrigger({ id, input?, inputs?, connection? })` | Catalogue trigger. Omit on the workflow for Manually Run with no fields | | `defineWorkflow({ slug, steps, trigger? })` | Workflow, workspace-scoped slug. Steps take an optional `key`, and the last step may branch with `paths`. A loaded steps or graph JSON file is accepted too | | `ref.trigger(field, …path)` / `ref.step(key, …path)` | Pass a trigger field or an earlier step's output into a step setting | | `defineAgent({ slug, model, instructions, … })` | Agent definition, workspace-scoped slug. A loaded JSON file is accepted, including `instructions: { file }` | | `defineEntityType({ slug, attributeSchema, … })` | Entity type schema, workspace-scoped slug | Omit `connection` when that app has one usable connection, or a workspace default. If several app connections match and none is the default, the call returns 400 and lists the candidates. The platform never picks the oldest connection. Pass `defineAiConnection({ id })` for the AI connection. Omitting `aiConnection` does not assign one. `defineEntityType` defaults to `allowUnknownAttributes: false` (strict instance writes). Use the reserved attribute key `extensions` on records for flexible bags. See [Entities](/guides/develop/client/entities). ## Trigger Omit `trigger` and deploy writes a **Manually Run** trigger with no input fields. `defineTrigger` binds one catalogue trigger. Discover the id with `npx @lunnoa/client apps get --json`. The JSON includes `triggers[].triggerId`, `inputFields`, and a `defineTrigger` sketch. Do not invent trigger ids. | Trigger | What to set | |---|---| | Manually Run (`flow-control_trigger_manual`) | `inputs`: the form the caller fills in. Stored as `customInputConfig`. `workflows.execute` sends those keys. | | Listen for Webhook | `input: { method: 'POST' }` (`PUT` and `GET` are the other methods) | | Recurring Schedule | `input` from the catalogue (`start` and `rrule`). A schedule that cannot compute its next run fails the deploy. | | Any other catalogue trigger | `id`, optional `connection`, and `input` from that trigger's `inputConfig` | `runs.start` runs the steps only. It does not create a trigger. ## Passing data between steps A step setting can take its value from the trigger or from an earlier step. Use `ref` from `@lunnoa/client`: | Helper | Value it passes | |---|---| | `ref.trigger('caseId')` | A trigger output field. On Manually Run, one of the `inputs` ids. On a webhook, the request shape, for example `ref.trigger('body', 'caseId')`. | | `ref.step('load', 'rows', 0, 'status')` | An earlier step's output. Give that step `key: 'load'`. Array indexes are numbers. | A `ref` is a plain string. Use it as a whole value, inside a template string, or inside nested settings. On deploy the server swaps each `ref` for the real node id. In the builder, a reference in a top-level text field or list shows as a mapped field from that earlier node. In nested settings, the builder shows the reference text instead. To find a step's output path, run the step once with [`actions.run`](/guides/develop/client/run-actions) or `runs.startAndWait`, then read that step's output in the execution. `defineWorkflow` throws, and deploy returns 400, when a reference: - names a key that no step has; - points at its own step or a later one; - uses a Manually Run field missing from `inputs`. Duplicate step keys and the reserved key `trigger` fail the same way. `runs.start` resolves `ref.step` too. It has no trigger, so `ref.trigger` fails there. ### Stable node ids Each workflow node has an id, which references and run history use. A keyed step keeps the same node id on every deploy of the same slug. The trigger keeps its id while its type and settings stay the same. Steps without a `key` get a new id on each deploy. Give every step that another step reads from a `key`. ## Branches Add `paths` to the last step of a list to branch. Steps after the branch go inside each path. Paths do not merge back together. If steps are shared after a branch, repeat them in each path or build that part in the builder. `paths` works on three [Flow Control](/guides/workflows/flow-control) actions: | Action | Paths | |---|---| | Request Approval | At most two. The first runs when approved and the second when rejected. Label them `Approved` and `Rejected`. | | Conditional Paths | Each path has an optional `when`. Every path whose `when` matches runs. A path without `when` always runs. | | Manually Decide Path | A person picks one path at runtime. No `when`. | ```ts const approval = defineAction({ id: 'flow-control_action_request-approval', input: { /* from tools get */ } }); const route = defineAction({ id: 'flow-control_action_conditional-paths' }); export default defineWorkflow({ slug: 'suggestion-review', steps: [ { key: 'load', use: loadSuggestion }, { key: 'review', use: approval, paths: [ { label: 'Approved', steps: [{ key: 'apply', use: applySuggestion }] }, { label: 'Rejected', steps: [{ use: notifyAuthor, input: { text: ref.step('review', 'comment') } }], }, ], }, ], }); // Conditional Paths { key: 'size', use: route, paths: [ { label: 'Large', when: [[{ field: ref.step('load', 'amount'), condition: 'is_greater_than', value: '1000' }]], steps: [{ use: escalate }], }, { label: 'Small', when: [[{ field: ref.step('load', 'amount'), condition: 'is_less_than_or_equal_to', value: '1000' }]], steps: [{ use: autoApprove }], }, ], } ``` In `when`, the outer list holds groups and the inner list holds conditions. Groups are OR-ed, and conditions in a group are AND-ed. Each condition has: - `field`: exactly one `ref.trigger` or `ref.step`. - `condition`: one of `PATH_CONDITIONS`, the same list the builder offers. It covers text (`equals`, `contains`, `starts_with`, `matches_regex`), presence (`exists`, `is_empty`), booleans (`is_true`, `is_truthy`), numbers (`is_greater_than`, `is_less_than_or_equal_to`) and dates (`comes_before`, `is_in_the_past`), plus their negations. - `value`: text to compare with. Omit it for conditions that need none, such as `is_empty` or `is_true`. Steps on a path can `ref.step` the branching step and earlier steps on the same path, but not steps on another path. The builder shows the paths with their labels and conditions. `runs.start` rejects `paths`, so deploy the workflow and execute it instead. ## What is deferred The TypeScript steps shape cannot merge paths back together. `pull` writes those workflows as graph JSON, and `push` keeps the join. See [Sync with the UI](/guides/develop/client/sync). Also deferred on the TypeScript `defineAgent`: MCP, A2A, skills, memory, drive, shares, canvas, and profile image. A JSON file in `lunnoa/agents/` can set those. See [The agent file](/guides/develop/client/agents/file). Also deferred: `NEEDS_INPUT`, creating connections from code, and ephemeral agents without a row. Agents have no trigger. Put that on a workflow. ## Related - [Start runs](/guides/develop/client/runs) - [CLI](/guides/develop/client/cli-deploy) - [Sync with the UI](/guides/develop/client/sync) - [Entities](/guides/develop/client/entities) - [Run actions](/guides/develop/client/run-actions) (single catalogue step) - [Toolkit Actions](/guides/develop/toolkit/actions) (`createAction`) Source: https://docs.lunnoa.com/guides/develop/client/define --- # Start runs > Run linear defineWorkflow steps as one multi-step SDK Execution. Use `lunnoa.runs.start` for a **linear multi-step** ad-hoc Execution (`source: SDK`) without deploying a workflow first. Each step is a catalogue action. The result is one Execution with a multi-step `executionPath`, not a soft batch or correlation id. For a single catalogue action, prefer [Run actions](/guides/develop/client/run-actions) (`actions.run`). To persist a workflow in Automate, use the [CLI](/guides/develop/client/cli-deploy). Multi-step SDK runs reuse `prepareAndRunAction` per step and appear as Executions with `source: SDK` and no workflow row (`FK_workflowId` null). Poll with `executions.get` / `executions.waitUntilFinished` or `runs.startAndWait`. ## Start from a definition or steps You can also pass `{ steps, name? }` or a raw step array. Connection resolution per step matches `actions.run`: sole usable connection, else workspace default, else `400` with candidates. `runs.start` uses the steps only. A `trigger` on the definition is not sent. Deploy the workflow when the trigger must be saved. See [Define locally](/guides/develop/client/define). ## Related - [Define locally](/guides/develop/client/define) - [Run actions](/guides/develop/client/run-actions) - [Execution progress](/guides/develop/client/execution-progress) - [Workflows](/guides/develop/client/workflows) Source: https://docs.lunnoa.com/guides/develop/client/runs --- # CLI > Discover the catalogue for an API key, sync JSON agent and workflow files, and deploy TypeScript definitions. The `@lunnoa/client` CLI discovers what a key can see, syncs JSON agent and workflow files with the UI, and deploys TypeScript `define*` files. The binary is `lunnoa-client`. `npx lunnoa-client` and `npx @lunnoa/client` run the same command. Prefer the CLI. Thin SDK upsert helpers exist as an implementation detail. JSON files in `lunnoa/` round-trip with the UI (`pull`, `push`, `status`). A `.json` path passed to `agents deploy` or `workflows deploy` is a push. A `.ts`, `.js`, or `.mjs` file is a TypeScript deploy and sets `codeSource` to `generated`, which locks that agent or workflow in the UI. Full loop, conflicts, and CI: [Sync with the UI](/guides/develop/client/sync). Auth is the same everywhere: `--url` / `LUNNOA_URL`, `--api-key` / `LUNNOA_API_KEY`, and optional `--access-token`. Deploy uses the workspace on the API key. The CLI also reads `./.env` in the working directory; real environment variables take precedence. Optional `lunnoa.config.ts` (or `.mjs` / `.js` / `.json`) in the working directory can supply the same values. Use `--json` when a coding agent is reading the output. ## Set up the app | Command | What it does | |---|---| | `init [--url ] [--api-key lna_…] [--template owner/repo[#ref] \| ./folder]` | Scaffold the starter app and write `.env`. See [Quick start](/guides/develop/client/start-a-new-app). | | `skills install [projectDir]` | Copy this SDK version's agent skills into `.claude/skills/` and `.cursor/skills/`. `projectDir` is a folder on disk. See [For agents](/guides/develop/client/for-agents). | Catalogue `appId` / `actionId` values come from `tools list` / `tools get` (or `workflowApps.list()`). Guessing ids is how deploys and `actions.run` fail. ## Discover `tools list` is compact. `tools get` prints `inputConfig`, field summaries, and a `defineAction({ id, appId, input })` sketch. `--for-agent` keeps only catalogue entries marked `availableForAgent`. `--app` scopes tools and connections to one workflow app. --json", "npx @lunnoa/client ai-connections list --json", "npx @lunnoa/client agents list --json", "npx @lunnoa/client workflows list --json", "npx @lunnoa/client entity-types list --json", "npx @lunnoa/client tables list --json", "npx @lunnoa/client tables get --json", "npx @lunnoa/client features --json", ], }, ]} /> Typical coding-agent loop: `tools list` or `tools search` → `tools get` for the schema → write `defineAction` → deploy. `connections list` supplies the Connection instance UUID when a tool `needsConnection`. Before `defineAgent`, run `ai-connections list --json` and set `model` to a returned `models[].id`. Before `defineTrigger`, run `apps get --json` and use `triggers[].triggerId`. Do not invent trigger ids. There is no `actions run` CLI command. Run catalogue actions from code (`actions.run` / `runs.start`). See [Run actions](/guides/develop/client/run-actions) and [Discovery](/guides/develop/client/discovery). ## Deploy | Definition | Upsert key | Scope | CLI | |---|---|---|---| | `defineWorkflow` | workspace-scoped `slug` | Workspace | `workflows deploy` | | `defineAgent` | workspace-scoped `slug` | Workspace | `agents deploy` | | `defineEntityType` | deployment-wide `slug` | Workspace | `entity-types deploy` | Workflow and agent deploy does not create connections. Pass connection UUIDs in definitions, or omit them so the platform resolves sole / default connections at run time. Find app connection ids with `connections list`. Find model ids with `ai-connections list`. You can also list what is already deployed: `workflows list`, `agents list`, `entity-types list`. Agent and workflow slugs are unique in the workspace. `agents list` and `workflows list` include a `SOURCE` column (`codeSource`: `none`, `synced`, or `generated`). Redeploying a TypeScript file updates that row and keeps `codeSource` as `generated`. A JSON file goes through `push` and sets `codeSource` to `synced`. A push onto a slug that is missing from `lunnoa.lock.json` is refused until you `pull`. See [Sync with the UI](/guides/develop/client/sync). For TypeScript definition files, run under Node with `--experimental-strip-types` (Node ≥ 22) or use `tsx`. ## Definition file shape Export `defineWorkflow(…)`, `defineAgent(…)`, or `defineEntityType(…)` as `default`, or as `workflow` / `agent` / `entityType`. Nested `defineWorkflow` tools on an agent are deployed first, then linked via `workflowIds`. ## What gets written - Real `Workflow`, `Agent`, and `ObjectType` rows, visible in Automate. - Agents and workflows store `codeSource`. A TypeScript deploy sets `generated`. A JSON push sets `synced`. Entity types still store `managedByCode`. Tables do too. - A generated agent or workflow is locked in the UI. Change the TypeScript file and deploy again. - A synced agent or workflow can be edited in the UI. `pull` brings those edits into `lunnoa/`. `push` stops when the UI changed after the revision in the lock, so a push does not silently replace them. See [Sync with the UI](/guides/develop/client/sync). - A TypeScript `defineWorkflow` builds one catalogue trigger (Manually Run with no input fields when `trigger` is omitted), then catalogue-action steps. The last step may branch with `paths` (Request Approval, Conditional Paths, Manually Decide Path). `ref.trigger` and `ref.step` become references to the real node ids. Keyed steps keep their node ids. The trigger keeps its id while its type and settings stay the same. See [Define locally](/guides/develop/client/define). - A workflow the steps shape would lose, such as paths that join or a for-each loop, is stored in full. `pull` writes it as `format: "graph"`, and `push` keeps it. - Entity types: `attributeSchema`, optional `stateSchema`, `schemaRevision` bumped on schema changes, `allowUnknownAttributes` default `false`. ## Related - [Discovery](/guides/develop/client/discovery) - [Define locally](/guides/develop/client/define) - [Entities](/guides/develop/client/entities) - [Tables](/guides/develop/client/tables) - [Start runs](/guides/develop/client/runs) - [Sync with the UI](/guides/develop/client/sync) - [Codegen](/guides/develop/client/codegen) Source: https://docs.lunnoa.com/guides/develop/client/cli-deploy --- # Sync agents and workflows with the UI > Pull agent and workflow definitions into lunnoa/, edit the JSON, and push them back without overwriting UI changes. Agent and workflow definitions can live in a `lunnoa/` folder and stay in step with the Automate UI. `pull` copies the UI into those files. `push` copies the files back. If both sides changed, the CLI stops and shows the difference. Use JSON files for this loop. Use a TypeScript `defineAgent` or `defineWorkflow` file only when the definition needs code. A TypeScript deploy stays locked in the UI. See [Synced and generated](#synced-and-generated). The binary is `lunnoa-client`. `npx lunnoa-client` and `npx @lunnoa/client` run the same command. This page uses `npx lunnoa-client`. Auth matches the rest of the CLI: `LUNNOA_URL` and `LUNNOA_API_KEY`, or `--url` and `--api-key`. The CLI also reads `./.env`. A `lunnoa.config.ts`, `.mjs`, `.js`, or `.json` file can set `url`, `apiKey`, and `definitionsDir`. Real environment variables win. The key is for the CLI only. See [Authentication](/guides/develop/client/auth). ## Why Someone can edit an agent or a workflow in the UI after the last push. A later push must not throw that edit away. `pull` writes the UI copy into the repo. `status` shows whether the file, the UI, or both have moved. `push` sends `baseRevision` from `lunnoa/lunnoa.lock.json`. When that revision is stale, Lunnoa answers 409 and the CLI exits 1. Nothing is written on that push. ## The lunnoa folder The default folder is `./lunnoa`, next to `package.json`. Set `definitionsDir` in `lunnoa.config.*`, or pass `--dir`, to use another folder. ```text lunnoa/ agents/.json agents/.instructions.md workflows/.json lunnoa.lock.json ``` `` is the workspace slug (`^[a-z0-9]+(?:-[a-z0-9]+)*$`). Renaming an agent or workflow in the UI does not change the slug. Every JSON file starts with `$schema`. The value is a relative path from that file to `node_modules/@lunnoa/client/schemas/agent.schema.json` or `workflow.schema.json`. The CLI adds `$schema` when it writes a file and removes it before sending. Files are pretty-printed JSON with a trailing newline. Agent instructions are the markdown file. The JSON points at it: ```json "instructions": { "file": "triage.instructions.md" } ``` You may hand-write `instructions` as a string. `pull` always writes the markdown file and the `{ "file" }` pointer. `lunnoa.lock.json` is committed. It records, per deployment, the id, revision, and file hash of each synced agent and workflow. The deployment key is `#`. ```json { "version": 1, "deployments": { "https://lunnoa.example#workspace-id": { "agents": { "triage": { "id": "…", "revision": "…", "fileHash": "…" } }, "workflows": { "sync-orders": { "id": "…", "revision": "…", "fileHash": "…" } } } } } ``` `fileHash` is the SHA-256 of the JSON bytes. For an agent it also covers a NUL byte and the instructions file. `pull` and `push` update the lock. Commit it with the JSON files. ## What is in the file ### Agent Write a small file. The first successful `push` rewrites it to the definition Lunnoa stored: full `settings` and empty link lists. Commit that rewrite with the lock file. A connection id in that rewrite belongs to this deployment. Do not copy it into another workspace. ```json { "$schema": "../../node_modules/@lunnoa/client/schemas/agent.schema.json", "kind": "agent", "slug": "greeter", "name": "Greeter", "description": "Replies with one short sentence.", "model": "deepseek-ai/DeepSeek-V4-Pro", "instructions": { "file": "greeter.instructions.md" }, "settings": { "suggestedPrompts": ["Say hello"] } } ``` `greeter.instructions.md` sits next to the JSON. That file is the prompt: ```md You are Greeter. When someone says hello, reply with one short, friendly sentence. Use their name when they give one. ``` | Field | How to set it | |---|---| | `kind` | `agent`. | | `slug` | Workspace slug. Renaming the agent in the UI does not change it. | | `name` | The name people see. | | `description` | Optional. Leaving it out of a later push clears it. | | `model` | A `models[].id` from `npx lunnoa-client ai-connections list --json`. Leaving `model` out clears it, and the agent cannot chat. | | `aiConnection` | Optional `{ "id" }` from `ai-connections list`. Leaving it out stores no connection. Do not copy a connection id into another deployment. | | `instructions` | `{ "file": ".instructions.md" }`, or a string. `pull` always writes the markdown file. | | `settings` | Optional. Only the keys you include are written. Leaving a key out does not clear it. `pull` writes every key, including `temperature`, `maxToolRoundtrips`, `messageLookbackLimit`, `suggestedPrompts`, and `longHorizonMode`. The schema lists the rest. | | `tools` | Optional. Each tool has `key`, `id` (the catalogue action id from `tools get`), `name`, and `input`. Add `connection: { "id" }` when the action needs one. Leave `tools` out to keep the tools already stored. | | `workflows`, `agents` | Optional `{ "slug" }` links. A full `push` sends workflows before agents. | | `connections`, `knowledge`, `variables`, `objects`, `objectTypes`, `mcpServers`, `a2aAgents` | Optional id lists. Leave a list out to keep the links already stored. `objects` and `objectTypes` may include a `scope` object. | | `profileImageUrl`, `canvas`, `skills`, `drive`, `shares`, `publicShare` | Optional. `null` clears the image, canvas, drive mount, or public link. An empty `skills` or `shares` list removes them. Leave a key out to keep what is stored. | Field by field: [The agent file](/guides/develop/client/agents/file), [Capabilities](/guides/develop/client/agents/capabilities), and [Runtime settings](/guides/develop/client/agents/settings). ### Workflow A workflow file is either steps or graph. See [Steps files and graph files](#steps-files-and-graph-files). Connection fields in these files are ids. The secret for a connection stays in Lunnoa. ## Left in the UI These are not in the file, and `push` does not change them: | Left in the UI | What that means | |---|---| | Credentials | API keys, tokens, passwords, and connection secrets. The file may hold a connection id. A public-link password is not in the file. `passwordProtected: false` clears one. | | Workflow canvas layout | Node positions on a workflow. A push keeps the position of a step it matches by key. Agent builder positions are `canvas` on the agent file. | | On/off switch | Workflow `isActive`. A push of an existing workflow leaves the switch as it is. A new workflow starts on. | | Memory facts | What the agent has remembered. The memory policy is `settings.memoryEnabled` and the fields next to it. | | Triggers on an agent | Agents have no trigger. Put the schedule, webhook, or app event on a workflow. | | `codeSource` and the sync revision | The lock file stores the revision. `push` sets `codeSource` to `synced`. Do not put either in the agent file. The revision is a hash of that file. | Placeholder nodes the builder uses as scaffolding are dropped on pull and on push. ## Pull, edit, push `npx lunnoa-client status` prints one row per file in the folder and per slug in the lock for this deployment. `npx lunnoa-client pull` writes definitions whose server revision differs from the lock, when the local file is unchanged. If the lock revision already matches, the file is left as it is, including local edits. Change the JSON, the instructions markdown, or both. Keep secrets out of `input` values. See [Secrets](#secrets). `npx lunnoa-client push` sends every JSON file, workflows first, then agents. On success it writes the definition Lunnoa stored and updates the lock. Run `pull` before `push` whenever `status` says the UI has moved. A push uses the revision in the lock. A stale revision is a 409. | Command | Effect | |---|---| | `pull` | Slugs recorded in the lock for this deployment. | | `pull ` | That agent or workflow. If the slug is both, the CLI stops and asks for a prefix. | | `pull agents/` or `pull workflows/` | One resource. | | `pull --all` | Every agent and workflow in the workspace. | | `push` | Every JSON file in the folder. | | `push ` | One file. `agents/.json` and `workflows/.json` select the kind. | | `status` | Local and remote state. Add `--json` for a JSON array. | | `--dir ` | Definitions folder for that command. | | `--force` | Pull overwrites a local edit. Push skips the revision check. See [Conflicts](#conflicts). | `status` columns are `KIND`, `SLUG`, `LOCAL`, `REMOTE`, `CONFLICT`. | Column | Values | |---|---| | `LOCAL` | `unchanged`, `modified`, `new`, `missing` | | `REMOTE` | `unchanged`, `changed in UI`, `missing in Lunnoa` | | `CONFLICT` | `true` when both sides differ from the lock. A new file that Lunnoa does not have yet is not a conflict. | `--json` prints `{ "kind", "slug", "local", "remote", "conflict" }` for each row. `remote` uses the words `changed in UI`, with spaces. `pull` only calls read endpoints. When there is nothing to write it prints `Nothing to pull.` ## Conflicts Pull refuses the whole run before it writes a file when the server revision differs from the lock and the local file hash also differs. The message is: ```text Local and server both changed. Run pull --force to overwrite. agents/triage.json --- local +++ server ``` Lines starting with `-` are the file on disk. Lines starting with `+` are the server copy. A local file that exists but is not in the lock counts as a local change. `pull --force` replaces those files with the server copy and updates the lock. Push exits 1 on HTTP 409 and prints the server message. The CLI appends the current revision: ```text Changed in the UI since your last pull. Run pull first. (currentRevision: …) ``` `push --force` skips that check and overwrites the UI with the file. `--force` drops one of the two copies. Pull keeps the UI and drops the local edit. Push keeps the file and drops the UI edit. Agree that with a person before you pass the flag. A CI job should not pass it. ## First push onto an existing slug A file that is not in the lock for this deployment is sent without `baseRevision`. If that slug already exists, Lunnoa answers 409: ```text A workflow with slug "sync-orders" already exists in Lunnoa. Run pull first, or push with --force. ``` The same sentence is used for an agent, with `agent` in place of `workflow`. Run `pull` for that slug, then edit, then `push`. `pull` records the revision. The next push sends it as `baseRevision`. A slug Lunnoa does not have yet is created, even when the lock has no row for it. `agents deploy file.json` and `workflows deploy file.json` are a push of that file. `agents deploy file.ts` and `workflows deploy file.ts` (also `.js` and `.mjs`) still deploy the TypeScript definition. See the next section. ## Synced and generated `codeSource` is the field on agents and workflows. It replaces `managedByCode` for those two resources. Tables and entity types still use `managedByCode`. | `codeSource` | How it got there | UI | |---|---|---| | `none` | Built in the UI, never pushed | Editable. No badge. | | `synced` | Pushed from a JSON file | Editable, unless [Lock code-synced resources](#lock-code-synced-resources) is on. | | `generated` | `agents deploy` / `workflows deploy` of a `.ts`, `.js`, or `.mjs` file | Always locked. | `npx lunnoa-client agents list` and `npx lunnoa-client workflows list` print a `SOURCE` column. That value is `codeSource`. JSON is the default. Write `lunnoa/agents/.json` or `lunnoa/workflows/.json`, then `push`. TypeScript is for a definition that needs code: a `defineWorkflow` you also pass to `runs.start`, or an agent whose tools are built in code. Deploy sets `codeSource` to `generated`. The UI shows **Managed by code** and rejects edits. Deploy the TypeScript file again to change it. `agents deploy file.ts --force` does not send `--force`. The flag applies to `pull`, `push`, and a `.json` deploy. To turn a generated resource into a synced one, `pull` that slug (this writes the JSON) and `push` the JSON file. The push sends `codeSource: "synced"`. After that, UI edits are allowed and come back through `pull`. App code can load a definition file and pass it to `defineAgent` or `defineWorkflow`. `$schema` is removed. `instructions: { file }` is accepted by `defineAgent` and left as that object. The CLI is what reads the markdown, and only when you `push`. Do not call the upsert helpers from the app for this loop. ## Badges and the workspace lock Lists and detail pages show a badge from the sync state: | Badge | When | |---|---| | **Synced with code** | `codeSource` is `synced`, and the definition still matches the last push. | | **Changed in UI, not yet in code** | `codeSource` is `synced`, and someone saved in the UI after that push. | | **Managed by code** | `codeSource` is `generated`, or `synced` while the workspace lock below is on. Editing is disabled. | | No badge | `codeSource` is `none`. | A successful `push` stores the new revision, and the badge returns to **Synced with code**. The [push job](#continuous-integration) runs when main changes, which keeps the badge on the copy in main. The server stores the revision from the push it received. A push from another branch updates the badge the same way. The badge tooltip for **Changed in UI, not yet in code** says to run `lunnoa-client pull`. ### Lock code-synced resources A workspace switch, **Lock code-synced resources**, makes every synced agent and workflow read-only in the UI. They show **Managed by code**. Generated resources stay locked whether the switch is on or off. Open **Admin Panel → User Management → Workspaces**, open the workspace, and open **Settings**. The switch is on the **LLM Audit Policy** card. Its description says agents and workflows synced with code can only change through a push. With the switch on, a UI save returns 409: `This agent is synced with code. This workspace only allows changes through a push.` The workflow sentence uses `workflow`. A generated resource returns: `This agent is managed by code and cannot be changed here.` `push` still updates a locked resource. Memories, shares, and the profile image are not part of the definition. The lock does not cover them. ## Steps files and graph files `pull` picks the file shape. **Steps** (`"format": "steps"`) is the readable shape: one `trigger` and a `steps` list. A step has `key`, `name`, `use` (`id`, optional `appId`, optional `connection`), and `input`. Optional `description`, `retrySettings`, `continueOnFailure`, and `paths` are included when set. The trigger key is `trigger`. Other keys start with a letter and use letters, digits, `-`, or `_`. References in `input` look like `={{step:send,…}}` or `={{step:trigger,…}}`. **Graph** (`"format": "graph"`) is the fallback: `nodes` and `edges`, with edges pointing at keys. Pull writes graph when the steps file would not round-trip to the same workflow. That includes paths that join again, and a for-each loop. A straight line, including a branch at the end, stays steps. Pull chooses the format. Edit that file and push it. Push accepts either format. The first push rewrites the file to the definition Lunnoa stored. Pushing that file again changes nothing, and a pull right after a push writes the same bytes. ## Secrets `pull` scans tool inputs, trigger inputs, step inputs, and graph node values. If a field name matches `authorization`, `token`, `secret`, `password`, `passwd`, `api key`, `apikey`, `bearer`, `cookie`, or `private key`, and the value is a non-empty string that is not a `={{…}}` reference, it prints a warning on stderr and still writes the file: ```text Warning: workflows/sync-orders.json field "steps[0].input.apiKey" looks like a secret. Definitions are committed; keep secrets in Lunnoa connections. ``` The warning does not include the secret value. A conflict diff replaces that value with `***`. Put the secret on a Lunnoa connection and reference the connection by id. ## Schemas Validate a file against the package schemas before you push: - `node_modules/@lunnoa/client/schemas/agent.schema.json` - `node_modules/@lunnoa/client/schemas/workflow.schema.json` Both are JSON Schema draft 2020-12. The `$schema` key in each file points at them, so an editor can check as you type. On push the CLI checks the file shape: a slug, instructions, step `use.id`, unique keys, and a graph with exactly one trigger. A file that fails those checks errors before the request is sent. ## Continuous integration Two jobs keep the repo and the workspace aligned. The pull job uses a read-only key (`LUNNOA_API_KEY`): it only sends GET requests, and it needs permission to read agents and workflows. The push job needs a key that can create agents and workflows (`LUNNOA_PUSH_API_KEY`). Store both, and `LUNNOA_URL`, as repository secrets. Do not pass `--force`. `pull` with no slug updates slugs already in the lock. Commit `lunnoa.lock.json` on main so the push job can send `baseRevision`. If pull finds a conflict it exits 1 and the pull request is not opened. The install step should match the repo. This example uses npm. ```yaml name: Lunnoa definitions on: schedule: - cron: "0 6 * * *" push: branches: [main] workflow_dispatch: jobs: pull: if: github.event_name != 'push' runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 cache: npm - run: npm ci - run: npx lunnoa-client pull env: LUNNOA_URL: ${{ secrets.LUNNOA_URL }} LUNNOA_API_KEY: ${{ secrets.LUNNOA_API_KEY }} - uses: peter-evans/create-pull-request@v7 with: commit-message: "Pull Lunnoa agent and workflow definitions" title: "Pull Lunnoa definitions" body: "Brings UI edits into lunnoa/." branch: chore/lunnoa-pull add-paths: lunnoa push: if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 cache: npm - run: npm ci - run: npx lunnoa-client push env: LUNNOA_URL: ${{ secrets.LUNNOA_URL }} LUNNOA_API_KEY: ${{ secrets.LUNNOA_PUSH_API_KEY }} ``` `peter-evans/create-pull-request` opens a pull request only when `lunnoa/` changed. Merging that pull request pushes to main, which runs the `push` job. That push is what returns the badge to **Synced with code**. ## Related - [CLI](/guides/develop/client/cli-deploy): discovery, TypeScript deploy, entity types - [Define locally](/guides/develop/client/define): `defineAgent` and `defineWorkflow` - [Agents](/guides/develop/client/agents): chat after the agent exists - [Authentication](/guides/develop/client/auth): API keys stay off the browser - [API reference](/api/reference): Public API operation list Source: https://docs.lunnoa.com/guides/develop/client/sync --- # Execution progress > Build custom timeline UIs with getProgress and SSE watchProgress. Custom portals often show a **timeline** or status bar while a workflow or SDK action run is in flight. Prefer the business-readable `executionPath` (never raw `nodes` / `edges`), and use the SDK helpers below so you do not invent your own poll loop. ## Snapshot: `getProgress` Fetches status + `executionPath`, then enriches each step with catalogue logos/icons from `workflowApps.list()`. ## Live updates: `watchProgress` Subscribes to `GET /api/executions/:id/stream` (Public API SSE). The server pushes `execution.progress` snapshots as steps change, plus `loop.progress` for For Each / Repeat, and `execution.finished` on terminal status. Use `fetch` with a Bearer token (the browser `EventSource` API cannot send Authorization headers). Lower-level access to raw SSE frames: `lunnoa.executions.stream(executionId)`. ## Events on the wire | Event | Meaning | |---|---| | `connected` | Stream attached | | `execution.progress` | Status + `executionPath` (+ `pendingInput`) snapshot | | `loop.progress` | For Each / Repeat loop counters | | `execution.finished` | Terminal status (`SUCCESS` / `FAILED` / `CANCELLED`) | | `heartbeat` | Keep-alive (~15s) | ## Related - [Workflows](/guides/develop/client/workflows): trigger runs and resume `NEEDS_INPUT` - [Run actions](/guides/develop/client/run-actions): one-step SDK executions (`source: SDK`) - [Errors](/guides/develop/client/errors): 401 / 403 / 429 handling Source: https://docs.lunnoa.com/guides/develop/client/execution-progress --- # Agent chat > Stream SSE agent chat in the AI SDK UIMessage format. The streaming module speaks the same wire protocol as the bundled UI: AI SDK `UIMessage` chunks, SSE-framed, resumable. A task is one conversation thread; client-generated UUIDs are fine (the first message creates the task). These examples assume an authenticated `lunnoa` client from the [overview](/guides/develop/client). ## Stream a turn Chunk types include `start`, `text-start`, `text-delta`, `text-end`, `tool-input-available`, `tool-output-available`, `reasoning-*`, `finish`, and `error`. ## Framework notes - **React:** prefer `useAgentChat` from `@lunnoa/client/react` (optional peer `@ai-sdk/react`), or wire `@ai-sdk/react`'s `useChat` yourself with a transport pointed at `${baseUrl}/api/agents/${agentId}/tasks/${taskId}/stream-message` and an `Authorization` header. Use `@lunnoa/client` for everything non-chat. See [React hooks](/guides/develop/client/react). - **Non-React:** iterate `AgentChatStream`, or pass `stream.toUIMessageStream()` to the AI SDK's `readUIMessageStream` for assembled `UIMessage` snapshots. - **History:** `tasks.get(taskId, { expansion: ['messages'] })` returns the persisted conversation in UIMessage format. - **Non-streaming:** `tasks.message(agentId, taskId, text)` waits for the full turn. Calls from an app run in preview mode: 10 model rounds per turn, enough for several tool calls and a final reply. The SDK sends this for you. `chatMode: 'builder'` is the agent editor interview and stops after 4 rounds, which cuts off an agent that is still calling tools. For a longer sequence, turn on Long-horizon mode on the agent in Lunnoa (50 rounds). `defineAgent` does not set that switch, and a later deploy leaves it as you set it. Proxies in front of the deployment must not buffer SSE responses, or the chat UI will stall until the turn completes. ## Next - [Errors](/guides/develop/client/errors): handle 401 / 403 / 429 during streaming - [Codegen](/guides/develop/client/codegen): call agents by generated name - [TypeScript client SDK](/guides/develop/client): overview and authentication Source: https://docs.lunnoa.com/guides/develop/client/agent-chat --- # Queues > Work through human-in-the-loop queue items with @lunnoa/client. Queues are the platform's work-item surface for review UIs. List queues, page through items, then mark them complete. These examples assume an authenticated `lunnoa` client from the [overview](/guides/develop/client). ## List and update items Use `queueItems.iterate(queueId)` when you need every item without managing pages yourself. For pauses inside a running workflow (rather than a queue inbox), see [Workflows](/guides/develop/client/workflows) and `NEEDS_INPUT`. For Request Approval nodes with eligible approvers, see [Approvals](/guides/develop/client/approvals). ## Next - [Approvals](/guides/develop/client/approvals): Request Approval inbox and decide - [Workflows](/guides/develop/client/workflows): resume executions that wait for human input - [Errors](/guides/develop/client/errors): handle forbidden queue access - [TypeScript client SDK](/guides/develop/client): overview and authentication Source: https://docs.lunnoa.com/guides/develop/client/queues --- # Approvals > List pending Request Approval items and decide with @lunnoa/client. Build a custom Approvals inbox that mirrors **Approvals** in Automate (`/approvals`). List pending items the authenticated user can decide, then approve or reject. These examples assume an authenticated `lunnoa` client from the [overview](/guides/develop/client). `lunnoa.approvals` calls the authenticated workspace routes (`/api/approvals/...`), not the Public API (`/api/v1/...`). The inbox is filtered to requests where the **current user** is an eligible approver and has not decided yet. Sign in as that Lunnoa user ([Authentication](/guides/develop/client/auth)) so eligibility matches a real person. ## Permissions The caller's role needs: | Permission | Used for | |---|---| | `approvals:read` | List the inbox and read approval state | | `approvals:decide` | Submit approve or reject (eligibility still applies) | A 403 usually means the role lacks these permissions, or the user is not eligible for that request. ## List the inbox `approvals.inbox()` defaults to pending work. The default `status: 'pending'` also includes requests that already have some, but not enough, approvals. Pass `status: 'done'` for history (items you decided, or finished approvals you were eligible for). Each item includes enough context to render a review row: title, approval progress (`receivedApprovals` / `requiredCount`), the workflow name, and links via `executionId` / `nodeId`. `eligibleApprovers` lists people who can still decide (workspace user id, email, and optional name). Role lists expand to current role members. The list is capped at 50 and excludes people who already decided. ## Decide Submit approve or reject by `approvalId` from the inbox. The execution stays paused until enough people have approved. One rejection finishes the step and resumes the run on the rejected path. When you already know `executionId` and `nodeId` (for example from `executionPath`), you can use the execution-scoped helper instead: Both paths use the same eligibility rules. Do **not** use `executions.submitInput` for Request Approval nodes; that webhook is for generic `NEEDS_INPUT` forms. ## Approvals vs queues vs NEEDS_INPUT | Surface | When to use | |---|---| | **Approvals** (`approvals.*`) | Request Approval workflow nodes with eligible approvers | | **Queues** (`queueItems.*`) | Standalone work-item inboxes not tied to a single approval policy | | **NEEDS_INPUT** (`executions.submitInput`) | Generic form pauses; free-form field values, not approve/reject | ## Next - [Workflows](/guides/develop/client/workflows): trigger runs and render `executionPath` - [Queues](/guides/develop/client/queues): human-in-the-loop work items outside approvals - [Errors](/guides/develop/client/errors): handle 403 when the role or eligibility fails - [TypeScript client SDK](/guides/develop/client): overview and authentication Source: https://docs.lunnoa.com/guides/develop/client/approvals --- # Errors > Handle LunnoaApiError status helpers in @lunnoa/client. Failed HTTP calls throw `LunnoaApiError` with status helpers you can branch on. ## Status helpers | Property | Meaning | |---|---| | `status` | HTTP status code | | `body` | Parsed error payload when available | | `isUnauthorized` | **401** (missing or revoked credential) | | `isForbidden` | **403** (role or licence edition does not cover the endpoint) | | `isRateLimited` | **429** (back off and retry) | ## Example Practical mapping: - **401** → with `createBrowserClient` / a `tokenStore`, the SDK auto-refreshes once by default; otherwise call `auth.refresh()` or send the user through login again. - **403** → hide the capability; the user's role or the deployment's licence edition does not cover the endpoint - **429** → back off and retry For minting keys and RBAC, see [API authentication](/api/auth). For login and refresh helpers, see [Authentication](/guides/develop/client/auth). ## Next - [Authentication](/guides/develop/client/auth): login, refresh, SSO - [TypeScript client SDK](/guides/develop/client): overview and authentication - [API reference](/api/reference): full public operation list Source: https://docs.lunnoa.com/guides/develop/client/errors --- # Integration toolkit > Build workflow and agent integration apps with @lunnoa/toolkit. `@lunnoa/toolkit` is the TypeScript SDK for defining **Lunnoa Automate integration apps**: the actions, triggers, connections, and input forms that appear in workflows and AI agents. Use it when you are building a publishable app package (for example `@lunnoa-automate/app-http`) that a Lunnoa server installs at runtime, or a private integration for your organisation. The toolkit provides **factories and types only**. Your app's `run` handlers execute inside the Lunnoa Automate server, which supplies runtime services (database, HTTP, OAuth, logging, and more). **`@lunnoa/toolkit`** builds apps that run *inside* the platform (workflow steps and agent tools). **`@lunnoa/client`** builds applications *on top of* the platform (portals and backends that call the Public API). Do not mix them for the same job. ## Requirements - Node.js 20 or newer - A Lunnoa Automate deployment to install and test the app against - TypeScript recommended (the factories are typed) ## Install For a local experiment: For publishable app packages, declare the toolkit as a **peer dependency**. Do not bundle it. The host server resolves `@lunnoa/toolkit` from its own `node_modules` at runtime. ## Quickstart A minimal app with one action. Export the `createApp(...)` result as your package **default export**. The platform loads installable apps with `require()` and registers them in the workflow app catalogue. ## Recommended folder structure Mirror the layout used by built-in apps (for example Slack and HTTP). Keep one file per action, trigger, and connection; put shared helpers in `shared/`; wire everything in a single app entry file. ### Source layout ### Naming conventions | Path | Convention | Example | |---|---|---| | App entry | `.app.ts` or `index.ts` that calls `createApp` | `slack.app.ts` | | Action file | `.action.ts` | `send-message.action.ts` | | Trigger file | `.trigger.ts` | `new-message.trigger.ts` | | Connection file | `.connection.ts` or `.oauth2.ts` | `oauth2.connection.ts` | | Shared code | `shared/.ts` | `shared/client.ts` | ### Practices that scale - **One export per file.** Each action/trigger/connection file exports a single factory result; the app entry imports and registers them. - **No business logic in the app entry.** `createApp` should only set metadata and arrays. - **Put API clients in `shared/`.** Reuse them from `run` / `mockRun` instead of duplicating fetch logic. - **Keep ids aligned with folders.** File `send-message.action.ts` pairs with id `my-service_action_send-message`. - **Colocate tests next to shared helpers** when you need them (`shared/ssrf-guards.spec.ts`), not next to every action unless the case is action-specific. - **Compile to `dist/`** and point `package.json` `main` at the compiled default export. See [Packaging](/guides/develop/toolkit/packaging). A tiny app can start as a single `index.ts`. Split into `actions/`, `triggers/`, and `connections/` as soon as you add a second action or any shared client code. ## Core concepts | Piece | Factory | Role | |---|---|---| | **App** | `createApp` | Top-level definition: metadata, actions, triggers, connections | | **Action** | `createAction` | One operation in a workflow step or agent tool call | | **Trigger** | `createManualTrigger`, poll/webhook factories, … | Starts or schedules workflow runs | | **Connection** | `createApiKeyConnection`, OAuth helpers, … | Auth config for third-party APIs | | **Input config** | `createTextInputField`, `createSelectInputField`, … | Form fields shared by actions, triggers, and connections | ### ID conventions IDs are stable registry keys. Follow these formats exactly: | Kind | Format | Example | |---|---|---| | App | kebab-case slug | `hello`, `slack`, `http` | | Action | `_action_` | `hello_action_greet` | | Trigger | `_trigger_` | `flow-control_trigger_manually-run` | | Connection | `_connection_` | `slack_connection_oauth2` | ## Guides in this section | Guide | What you will do | |---|---| | [Actions](/guides/develop/toolkit/actions) | Define `createAction` with `run`, `mockRun`, and `aiSchema` | | [Input config](/guides/develop/toolkit/input-config) | Build configuration forms with field factories | | [Triggers](/guides/develop/toolkit/triggers) | Start workflows with manual, schedule, poll, or webhook triggers | | [Connections](/guides/develop/toolkit/connections) | Add API key, basic auth, OAuth, and other auth methods | | [Packaging](/guides/develop/toolkit/packaging) | Ship a publishable npm app with the `lunnoaApp` manifest | ## Related - [TypeScript client SDK](/guides/develop/client): call the Public API from your own apps - [npm: @lunnoa/toolkit](https://www.npmjs.com/package/@lunnoa/toolkit): package page and releases - [lunnoa_apps](https://github.com/lunnoa-automate/lunnoa_apps): reference and publishable app packages Source: https://docs.lunnoa.com/guides/develop/toolkit --- # Actions > Define workflow and agent actions with createAction. An **action** is a single operation users (or agents) can invoke as a workflow step or tool call. Define actions with `createAction` from `@lunnoa/toolkit`. These examples assume you already understand the [toolkit overview](/guides/develop/toolkit). ## createAction fields | Field | Purpose | |---|---| | `id` | Unique id: `_action_` | | `name` / `description` | Labels shown in the workflow and agent UIs | | `inputConfig` | UI fields for configuring the action (see [Input config](/guides/develop/toolkit/input-config)) | | `aiSchema` | Zod object that mirrors `inputConfig` field ids; used by agents and validation | | `run` | Executes the action; receives `configValue`, `connection`, and platform services | | `mockRun` | Returns representative output for workflow mapping and testing | | `needsConnection` | Set `false` when this action does not need the app's connection | | `needsApproval` | When `true`, agent tool execution requires user approval before running | | `availableForAgent` | Set `false` to hide the action from the agent tool list | | `iconUrl` | Optional; falls back to the app `logoUrl` | | `ui` | Optional declarative chat UI for execution and output | | `systemPromptFragment` | Optional per-action policy text injected when the tool is enabled | ## Example ## aiSchema must match inputConfig If `inputConfig` has a field with `id: 'name'`, then `aiSchema` must include a `name` property. Agents and validation rely on that 1:1 mapping. Keep descriptions on Zod fields short and concrete so tool calling stays reliable. ## run vs mockRun - **`run`** is the real execution path in workflows and agent tools. Prefer `configValue` and `connection` from the handler args. - **`mockRun`** should return data shaped like `run` so users can map outputs to downstream steps. If the output is always different, hide save-and-test with `viewOptions.hideSaveAndTestButton: true`. Handlers run **inside the Lunnoa server**. Do not assume your package's private `node_modules` beyond the toolkit peer dependency and what the host injects. ## Next - [Input config](/guides/develop/toolkit/input-config): build the configuration form - [Connections](/guides/develop/toolkit/connections): require auth with `needsConnection` - [Packaging](/guides/develop/toolkit/packaging): export actions from `createApp` Source: https://docs.lunnoa.com/guides/develop/toolkit/actions --- # Input config > Build action, trigger, and connection forms with toolkit field factories. **Input config** is the declarative form schema for actions, triggers, and connections. Users fill these fields in the workflow builder and agent tool UIs. Field `id` values become keys on `configValue` in your `run` handlers. Build fields with factories from `@lunnoa/toolkit`, then pass the array as `inputConfig`. ## Common field factories | Factory | `inputType` | Typical use | |---|---|---| | `createTextInputField` | `text` | Short strings | | `createRawTextInputField` | raw text | Unformatted multiline text | | `createNumberInputField` | number | Numeric values | | `createSelectInputField` | select | Fixed option list | | `createMultiSelectInputField` | multi-select | Multiple fixed options | | `createDynamicSelectInputField` | dynamic select | Options loaded at runtime | | `createDynamicMultiSelectInputField` | dynamic multi-select | Multiple dynamic options | | `createJsonInputField` | json | Structured JSON | | `createCodeInputField` | code | Code editor | | `createMarkdownField` | markdown | Display-only markdown | | `createDateInputField` | date | Calendar date | | `createDateTimeInputField` | datetime | Date and time | | `createDateRangeInputField` | date range | Start/end dates | | `createFileInputField` | file | File upload | | `createMapInputField` | map | Key/value map | | `createSwitchInputField` | switch | Boolean toggle | | `createNestedFields` | nested | Grouped sub-fields | | `createColumnFiltersInputField` | column filters | Tabular filter UI | ## Example ## Shared field options Most factories accept a common base shape: - `id` (required): key on `configValue` - `label` / `description` / `placeholder` - `required`: `{ missingMessage, missingStatus }` when the field must be set - `defaultValue` when a sensible default exists - Visibility and conditional helpers where the field type supports them Keep `id` values stable. Renaming an id breaks existing workflow configurations that already store that key. ## Pair with aiSchema For actions, every configurable `inputConfig` id should appear on `aiSchema`. See [Actions](/guides/develop/toolkit/actions). ## Next - [Actions](/guides/develop/toolkit/actions): attach `inputConfig` to `createAction` - [Triggers](/guides/develop/toolkit/triggers): configure how workflows start - [Connections](/guides/develop/toolkit/connections): connection-specific fields Source: https://docs.lunnoa.com/guides/develop/toolkit/input-config --- # Triggers > Start workflows with manual, schedule, poll, and webhook triggers. A **trigger** starts or schedules a workflow run. Define triggers with the factories in `@lunnoa/toolkit`, then register them on `createApp({ triggers: [...] })`. Trigger ids must follow `_trigger_` (for example `flow-control_trigger_manually-run`). ## Trigger factories | Factory | Strategy | When to use | |---|---|---| | `createManualTrigger` | `manual` | User or API starts the workflow on demand | | `createScheduleTrigger` | schedule | Cron-style schedules | | `createAppWebhookTrigger` | app webhook | Shared app-level webhook listener | | `createCustomWebhookTrigger` | custom webhook | Dedicated webhook endpoint | | `createItemBasedPollTrigger` | item poll | Poll for new or changed items | | `createLengthBasedPollTrigger` | length poll | Poll when a list length changes | | `createTimeBasedPollTrigger` | time poll | Poll on a time interval | ## Manual trigger example `run` and `mockRun` return an **array of items**. Each item becomes trigger output available to downstream workflow steps. ## Webhooks App-level webhooks often need helpers on `createApp`: - `verifyWebhookRequest`: confirm the request is authentic - `parseWebhookEventType`: map the body to an event type your triggers listen for Use `createAppWebhookTrigger` when several triggers share one endpoint, or `createCustomWebhookTrigger` for a dedicated path. Keep verification strict: reject unsigned or unexpected payloads early. ## Polling triggers Poll factories differ mainly in how they detect “new work”: - **Item-based**: compare items (ids, cursors, timestamps) - **Length-based**: react when a list grows or shrinks - **Time-based**: run on an interval regardless of item identity Store only the cursor or watermark you need; avoid writing large payloads into poll storage. ## Next - [Input config](/guides/develop/toolkit/input-config): fields on the trigger form - [Actions](/guides/develop/toolkit/actions): steps that run after the trigger fires - [Packaging](/guides/develop/toolkit/packaging): register triggers on `createApp` Source: https://docs.lunnoa.com/guides/develop/toolkit/triggers --- # Connections > Add API key, basic auth, OAuth, and other auth methods to toolkit apps. A **connection** is the authentication configuration users create once and reuse across actions and triggers. Define connections with toolkit factories, then register them on `createApp({ connections: [...] })`. Connection ids must follow `_connection_` (for example `slack_connection_oauth2`). ## Connection factories | Factory | Type | Typical use | |---|---|---| | `createApiKeyConnection` | `apiKey` | Bearer or API key headers | | `createBasicAuthConnection` | basic auth | Username and password | | `createOAuth2Connection` | OAuth 2.0 | Authorisation-code style OAuth | | `createOAuthProvider` | OAuth provider metadata | Shared provider settings for OAuth flows | | `createKeyPairConnection` | key pair | Certificates or asymmetric keys | | `createDatabaseConnection` | database | Database credentials | ## API key example ## Using connections in actions When the app has connections, actions default to requiring one. In `run`, read credentials from the injected `connection` argument (not from your own secrets store). Set `needsConnection: false` on a specific action when that operation is public or otherwise unauthenticated. App-level flags on `createApp` also matter: - `isGlobal`: when true, a shared default connection is used for the workspace - `availableForAgent`: whether the app's actions appear for agents ## OAuth notes OAuth connections use the platform's browser-based connect flow. Custom portals that only hold an `lna_` API key cannot complete interactive OAuth for end users through `@lunnoa/client` alone; users (or an admin) connect OAuth apps inside the Lunnoa UI. For non-interactive types (API key, basic auth), the Public API can create connections via `workflowApps.connect` from `@lunnoa/client`. ## Next - [Actions](/guides/develop/toolkit/actions): set `needsConnection` and use `connection` in `run` - [Input config](/guides/develop/toolkit/input-config): fields on the connection form - [Packaging](/guides/develop/toolkit/packaging): register connections on `createApp` Source: https://docs.lunnoa.com/guides/develop/toolkit/connections --- # Packaging > Ship a publishable Lunnoa integration app with the lunnoaApp manifest. Installable apps are npm packages that default-export `createApp({...})` and declare a `lunnoaApp` block in `package.json`. SuperAdmins install packages on a running Lunnoa server via the admin API; no platform rebuild is required. ## Package layout | Field | Description | |---|---| | `lunnoaApp.appId` | Must match `createApp({ id })` exactly | | `lunnoaApp.toolkitVersion` | Compatible toolkit semver range | | `lunnoaApp.platformVersion` | Compatible Lunnoa Automate platform semver range | ## Rules that avoid install failures - Export **one** default: `export default createApp({ ... })` - Keep `@lunnoa/toolkit` as a **peerDependency** (not bundled) - Align `appId` with every action, trigger, and connection id prefix - Ship compiled CommonJS (or whatever the host `require()` expects) via `main` - Pin toolkit and platform ranges you have actually tested ## App metadata reminders On `createApp`: - `id`: unique kebab-case slug used as the registry key - `logoUrl`: shown in the catalogue and on steps that lack an action icon - `isPublished`: defaults to `true`; set `false` while developing - `availableForAgent`: defaults to `true` - `systemPromptFragment`: optional short policy text injected when any of the app's actions are enabled on an agent ## Reference packages For working examples, see [lunnoa_apps](https://github.com/lunnoa-automate/lunnoa_apps) and the built-in apps in the [lunnoa_automate](https://github.com/lunnoa-automate/lunnoa_automate) monorepo (`packages/apps`). Built-ins use the same `createApp` contract; installable packages depend on the **published npm** toolkit version. ## Next - [Integration toolkit](/guides/develop/toolkit): overview and quickstart - [Actions](/guides/develop/toolkit/actions): fill the `actions` array - [Triggers](/guides/develop/toolkit/triggers) and [Connections](/guides/develop/toolkit/connections): complete the app surface Source: https://docs.lunnoa.com/guides/develop/toolkit/packaging --- # API authentication > Workspace API keys and JWT login for the public HTTP API. Lunnoa Automate exposes its REST API (Swagger at `/docs`) to two kinds of callers: 1. **Machines**: server-side applications authenticating with a workspace-scoped **API key** (`lna_…`). 2. **Humans**: end users authenticating with a **JWT** from password login (`POST /api/auth/login`), token exchange (`POST /api/auth/login-with-token`), or SSO under `/api/auth/sso/…`. Both converge on the same authorisation model: RBAC permissions evaluated per workspace. There are no separate partner API endpoints. For a typed SDK surface (login, 2FA, refresh, SSO discovery, token stores), see [Client authentication](/guides/develop/client/auth). ## API keys are service accounts An API key is a credential for a **machine service account**: a user of type `SERVICE_ACCOUNT` that - has **no password** and can never log in interactively, - is a member of **exactly one workspace**, chosen when the key is created, - holds a **normal RBAC role** (system or custom), - is excluded from SCIM and from people-facing user lists, - can never hold the `SUPER_ADMIN` platform role; `/api/admin/*` endpoints remain JWT-only. Every action performed with the key is attributed to the service account in audit trails. ## Creating a key (SuperAdmin) Go to **Admin Space → API Keys** (`/adminspace/api-keys`). Choose a name, the target workspace, an RBAC role with the minimum permission set, and an optional expiry. Copy the `lna_…` secret from the confirmation screen. It is shown exactly once; only its sha256 hash is stored. ## Using a key Send the secret as a bearer token: Requires a bearer token (API key or JWT). Outside the role's permissions returns **403**; revoked or unknown keys return **401**. ## Who signs in Custom apps sign each person in as a Lunnoa user (JWT or SSO). Their permissions, shares, and task history apply. Provision people who are not in the workspace yet with an invite, SSO, or SCIM. Do not stand in for them with an API key. API keys stay for machines that have no person attached: the CLI (codegen, discovery, deploy, and `pull` / `push` of agent and workflow JSON), background jobs, and data sync. Auth is **Bearer JWT** (JSON bodies for login/refresh). There is no session-cookie login for the public API, and no server logout route: clients clear stored tokens locally. Primary routes for user login: | Method | Path | Purpose | |---|---|---| | `POST` | `/api/auth/login` | Email + password (may require 2FA) | | `POST` | `/api/auth/2fa/verify-login` | Complete 2FA | | `POST` | `/api/auth/login-with-token` | Exchange SSO / email hidden JWT | | `POST` | `/api/auth/refresh-token` | New access token from refresh token | | `GET` | `/api/auth/sso/providers` | Public SSO discovery | | `GET` | `/api/auth/sso/:providerId/login` | Start OIDC redirect | | `GET` | `/api/users/me` | Current user (Bearer required) | SSO callbacks redirect to `{CLIENT_URL}/verify-token?token=…`, then the client calls `login-with-token`. API keys are machine credentials. A key embedded in client code is a leaked key. Custom apps sign people in with a user JWT. ## Security notes - Only the sha256 hash of a key is stored; treat the plaintext like any other production secret. - A leaked key exposes at most one workspace, bounded by the service account's role. - Rotate by creating a new key, switching the application, then revoking the old one. - Set `API_KEYS_ENABLED=false` to reject all `lna_` tokens (fail closed) without affecting human JWT logins. ```bash # .env — enabled by default API_KEYS_ENABLED=true ``` ## Full reference Browse every public operation on the [API reference](/api/reference), or open Swagger at `/docs` on your deployment to try calls interactively. Source: https://docs.lunnoa.com/api/auth --- # Release notes > What changed in each Lunnoa Automate release, newest first, with upgrade notes for self-hosted installs. Each entry below is a release that was promoted to production. Every release starts with a short summary, then lists what is **new**, **improved**, **fixed**, and **removed**. If you self-host Lunnoa Automate, read the **Upgrade notes** before you move past a release. They cover database migrations that change or delete data, environment variables that were added or removed, and features that behave differently after the upgrade. When you skip several releases, read the upgrade notes of every release in between. ## 3.5.0: Email in knowledge, and document versions _26 November 2026_ Knowledge notebooks can index emails, and documents can carry a version and validity dates, so answers cite only the version that is in force. **New** - **Emails in knowledge.** `.eml` and `.msg` files are indexed together with their attachments. Each attachment is indexed on its own, and nested emails are followed up to three levels deep. Citations name the source, for example "subject › Attachment: file.pdf". See [Create and upload](/guides/knowledge/create-and-upload). - **Document versions and validity.** A document can have a document ID, a version, valid-from and valid-until dates, and an owner. Uploading a new version with the same document ID replaces the old one from its valid-from date. Older versions are kept for audit and marked **Superseded**, and future versions are marked **Upcoming**. Only documents in force are searched, and citations show the version and date, for example "title, v3, valid from …". **Improved** - **The same file formats everywhere.** Upload, SharePoint sync, re-index, and the **Save to knowledge** workflow action accept the same formats. CSV, JSON, XML, YAML, and images are new. - Legacy `.doc`, `.xls`, `.ppt`, and `.rtf` files are rejected, with a hint to save them as `.docx`, `.xlsx`, or `.pptx` first. - Restart the knowledge worker with the new image. It checks hourly which document versions are in force. ## 3.4.0: Secure knowledge search and sandboxed code _26 November 2026_ A major release for Knowledge and for running code safely. Knowledge can sync from SharePoint, respects document permissions, and cites its sources page by page. Code from skills and agents runs in an isolated sandbox. **New: Knowledge** - **Knowledge sources and SharePoint sync.** Connect a SharePoint Online library as a knowledge source, and a background worker keeps the notebook in sync. - **Permission-aware search.** Answers only use documents the person asking is allowed to open in the source system. Document views and passages follow the same permissions. - **Hybrid search and re-ranking.** Each notebook has search settings that combine keyword and semantic search, with an optional re-rank model, including self-hosted ones. - **Strict grounding.** An agent can be set to answer only from its knowledge, show how confident it is, and say when it doesn't know instead of guessing. - **Page-level citations.** Answers cite the page they came from, and clicking a citation opens the original document at that page. Each cited passage is checked against the sentence it supports, and weak citations are marked. - **Secure GPT agent template.** A ready-made agent for answering questions from company documents, with strict grounding and citations switched on. - **Re-index and index age.** Re-index a notebook, and see when it was last indexed. - **Save files to knowledge.** The **Save to knowledge** workflow action saves files, not only text. - **Knowledge in the SuperAdmin menu.** Knowledge has its own section, with access diagnostics that explain why someone can or can't find a document, and retrieval diagnostics in observability. **New: Sandboxed code execution** - **Isolated sandbox.** Code execution and skill scripts run in a gVisor sandbox. Outbound network traffic is limited to an allow-list, and every run is audited. - **Sandboxes screen.** Superadmins manage sandbox providers, policies, and connections in Admin Space. The sandbox can also be configured from [installation settings](/guides/deploy/installation-settings). OpenSandbox, E2B, and Vercel are available as alternative providers. **Improved** - Embedding sizes, the chunk tokenizer, and re-rank limits come from the model catalogue. - Files are uploaded to the server for processing instead of being read in the browser. - Keyword search uses English stopwords by default. - Ollama is used through its OpenAI-compatible API. - Admin dialogs share the same form layout. **Fixed** - Replacing a document keeps the old one searchable until the new one is indexed, and documents written during a re-index are kept. - Re-indexing repairs notebooks with an unsupported embedding size. - **Re-index** and **Sync now** start reliably. **Security** - Workflow file downloads, the HTTP action, and Copilot actions are blocked from reaching private network addresses, and downloads have a size limit. - Prompts are redacted from stored trace summaries. - Entra SSO only trusts a user's object ID when it comes from your own tenant. - Source links in knowledge no longer contain credentials. - **New required variables:** `SANDBOX_RUNNER_TOKEN` and `EGRESS_HOOK_TOKEN`. The production Docker Compose file refuses to start without them. - **Knowledge needs `WEAVIATE_API_KEY`.** Without it, Knowledge is switched off. - **New services:** `knowledge-worker`, `docker-socket-proxy`, `sandbox-runner`, `egress-guard`, `smokescreen`, and their helpers. Set `KNOWLEDGE_WORKER_ENABLED=false` on the API container so only the worker syncs. - **Weaviate is upgraded from 1.37 to 1.40.7.** Check that existing collections load after the upgrade. - **Pull or rebuild the document parser image** before re-indexing. It now includes the chunk tokenizers, and without them a re-index returns no text. - **After deploying:** run a model catalogue sync, then re-index notebooks created before this release. The catalogue now includes a re-rank model that older versions reject, so catalogue sync only works again after this upgrade. - The server applies 15 new database migrations on start. ## 3.3.2: Safer skill runs and clearer parse errors _23 November 2026_ A maintenance release that tightens how skills clean up after themselves and makes document parsing failures easier to diagnose. **Fixed** - **Skill runs clean up after themselves.** When a skill finishes, its secrets and working folder are removed. Before this release, a finished run could leave both behind on the server. - **Document parsing reports the real error.** When a document fails to parse, you now see the parser's own error message instead of a generic "not found". Parsing, OCR, and table extraction also keep the original file name, so the error points at the right file. - **Parsing no longer loses finished results.** The document parser runs as a single worker, so a finished parse is always found by the request that asks for it. **Removed** - Unused public connection callback endpoints. **Under the hood** - Large parts of the server and UI were split into smaller modules: SCIM, roles and permissions, tool discovery, workflow execution, drive providers, analytics, and the workflow form builder. Behavior is unchanged. ## 3.3.1: Shared OAuth fix and models in installation settings _17 November 2026_ **New** - **Choose connection models in the settings file.** An AI connection in [installation settings](/guides/deploy/installation-settings/file-reference) can list which catalogue models it offers (`ai.connections[].models`). Leave the list out and the connection's models are not touched. Models set from the file are read-only in Admin Space. **Fixed** - **Connecting through a shared OAuth provider works again.** Connecting an app through a shared OAuth provider failed after sign-in with a database error. The connection now saves. ## 3.2.0: Gravitee LLM Proxy _17 November 2026_ **New** - **Gravitee LLM Proxy as an AI provider.** Add Gravitee as an OpenAI-compatible provider and set the gateway base URL and key. See [AI configuration](/guides/adminspace/ai-configuration). **Improved** - When the installation settings file owns an AI provider, the catalogue edit and custom add actions on the **Models** and **Tools** tabs are hidden, so you can't make changes that the next settings reload would overwrite. ## 3.1.0: Installation settings from git, and access by role _17 November 2026_ The biggest change since 3.0. You can describe an install's AI providers, privacy policy, workspaces, and custom roles in a JSON file kept in git, and Lunnoa applies it. Access to shared resources is now granted to **roles** instead of individual people. **New** - **Git-backed installation settings.** Point Lunnoa at a settings file with `LUNNOA_SETTINGS_REPOSITORY`, `LUNNOA_SETTINGS_BRANCH`, `LUNNOA_SETTINGS_PATH`, and an optional `LUNNOA_SETTINGS_TOKEN`. After you merge a change, reload with `POST /api/admin/installation-settings/reload`. If the file contains an unknown model or tool, or a secret value where an environment variable name belongs, the reload fails and the previous settings stay. When the variables are unset, nothing changes. See [Installation settings](/guides/deploy/installation-settings). - **AI providers, models, and tools in the file.** Each provider can set an API key environment variable (`apiKeyEnv`, the name only), a base URL, catalogue models, and built-in tools. Models can be listed and turned off with `enabled: false`. Supported providers: OpenAI, Anthropic, Gemini, xAI, DeepSeek, Featherless, Perplexity, Ollama, and Hugging Face. - **AI connection access in the file.** `ai.connections` creates a connection if it's missing and grants it to everyone, a workspace, or a role. Its name, deletion, and access are locked. Its models, tools, and personal-data settings stay editable in Admin Space. - **Privacy policy in the file.** The file can own the install's privacy policy. When present, all eight fields are required. Admin Space shows a Git badge and disables the policy fields. Testing the PII service still works. - **Workspaces and custom roles in the file.** The file creates or updates workspaces and custom roles by name, and a role can list the workspaces it covers. It never adds or removes people. Built-in role names (Admin, Editor, Viewer, Agent User) are rejected. - **Custom roles that span workspaces.** A custom role can cover several workspaces. Adding someone to the role adds them to each workspace. Removing them takes the role away everywhere. A workspace membership is kept only while another role still needs it. - **Platform machine users.** A superadmin can create an API key for a platform-wide machine user with the SuperAdmin role and no workspace membership. The `lna_` secret is shown once and can be revoked from the same screen. See [API keys](/guides/adminspace/api-keys). **Improved** - **Access is granted by role.** Apps, OAuth clients, shared credentials, MCP servers, skills, external agents, and AI connections are granted to everyone, to a workspace, or to a role. A role grant counts only in the workspace where the person holds that role. The access checker explains matches as "Via role …". - **Unique workspace names.** Workspace names are unique on an install, like role names. Creating or renaming to a taken name shows a clear conflict message. Names are case-sensitive, so `Acme` and `acme` are different. - **Rows managed from git are marked.** Providers, connections, workspaces, roles, and the privacy policy that come from the settings file show a Git badge, and their settings are read-only. - **SSO sign-in creates only the account.** Signing in with SSO or provisioning through SCIM no longer creates a personal workspace. Access comes from SCIM group mappings. A person with no mapped group waits on a holding page until an administrator adds them. See [SSO](/guides/adminspace/sso). **Removed** - Automatic Featherless provisioning. `FEATHERLESS_API_KEY` is no longer required, and agents without a connection no longer get a default model. A Featherless provider created by the old startup step stays and can now be edited or deleted. - Object storage settings in Admin Space. - The unused `WEAVIATE_COLLECTION_NAME` variable. - **Skills granted to individual people lose that grant.** Person-level grants can't be mapped to a role, so they are removed. Skills open to everyone or enabled for a workspace keep working. Give a role access to any skill that only individuals used. - **SSO groups need a workspace.** The migration copies each SSO provider's old default workspace onto groups that relied on it. Check that every SCIM group mapping names a workspace. A group with no workspace grants nothing, and a group with no role gives Viewer. - **Duplicate workspace names are renamed.** The migration keeps the oldest workspace with each name and adds a short suffix to the copies. - **Legacy LLM environment variables are no longer read.** Move provider configuration into the installation settings file or Admin Space before upgrading. ## 3.0.0: Two-way sync between code and the UI _13 November 2026_ Agents and workflows can now live as JSON definition files in your own repository. You can change them in code or in the UI and sync both ways, and neither side silently overwrites the other. **New** - **Two-way sync.** Every agent and workflow gets a slug from its name, so anything built in the UI can be pulled into code. Pushing a stale definition is refused with a conflict unless you force it. Synced resources show a sync badge in the UI. See [Sync with the UI](/guides/develop/client/sync). - **Lock code-synced resources.** A workspace setting makes resources managed from code read-only in the UI. In a locked workflow, node settings are read-only. - **Definition endpoints.** `GET /api/agents/slug/:slug/definition` and `GET /api/workflows/slug/:slug/definition` return the current definition and its revision. - **Full agent round trip.** Agent files now carry the profile image, builder canvas, skills, drive mount, shares, public link, and object scope. A key left out of the file leaves that part unchanged, and `null` clears it. Secrets, public-link tokens, and passwords are never written to the file. See [The agent file](/guides/develop/client/agents/file). - **AI models from a catalogue repository.** The built-in model list is replaced by a git catalogue. By default this is `lunnoa-automate/ai-model-catalogue`, and a superadmin can point at another GitHub or GitLab repository, including a private one. **Seed models** in AI Providers adds and updates models. A model that leaves the catalogue is marked deprecated, never deleted. It stays active while anything still uses it. **Improved** - The model catalogue dialog matches the other Admin Space forms. - The admin sidebar lists Apps, MCP Servers, Skills, External Agents, OAuth Providers, and Catalog Sources as separate entries again. **Removed** - The go-live checklist on the platform overview. The `managedByCode` flag is replaced by `codeSource` (`none`, `synced`, or `generated`). Update any client that reads or sets it. A fresh database loads the model catalogue on first start. After that, use **Seed models** to refresh it. ## 2.37.0: Light and dark themes only _12 November 2026_ **Improved** - Light and Dark are the only theme choices. The System option is removed from the account menu and preferences. Anyone who had System, or no choice set, now gets Light, and the app no longer follows the operating system's color scheme. ## 2.36.0: Task timeline and live plan checklist _11 November 2026_ Agent conversations are easier to follow while the agent works through several steps. **New** - **Task timeline.** When an agent uses tools, its reply shows as a numbered timeline: planning, each tool step, then the answer. The active step shows a spinner, finished steps collapse to a checkmark, and you can click a step to expand it. Plain answers that use no tools are shown as before. **Improved** - **Live plan checklist.** The plan checklist updates the moment the agent adds or completes a to-do, instead of a few seconds later. Planning tool calls no longer clutter the transcript, because the checklist shows them. Shared public chats show the plan too. ## 2.34.0: Branches in code-deployed workflows _11 November 2026_ **New** - **Branches from code.** A workflow deployed from code can end with branches on its last step: **Request Approval** (approved, then rejected), **Conditional Paths**, or **Manually Decide Path**. Labels and conditions appear in the builder as if you had drawn them. Steps on a branch can use the branching step and earlier steps on the same branch. Branches don't merge back together yet, so do that in the builder. **Fixed** - **Request Approval follows only the decided branch.** With separate Approved and Rejected branches, both branches used to run after every decision. Now only the decided branch runs. An approval with no branches still continues to every next step, so existing workflows that check the result later keep working. ## 2.33.0: Step references in code-deployed workflows _6 November 2026_ **New** - **Reference earlier steps from code.** A step deployed from code can read the trigger and earlier steps with `={{step:trigger,field}}` or `={{step:,path}}`. Give steps an optional `key`. The builder shows these references as mapped fields from the earlier node. - **Validation on deploy.** A deploy is rejected with a clear error when a reference points to an unknown, later, or the same step, when keys are duplicated or reserved, or when a Manually Run field is missing from the inputs. **Improved** - Steps that have a key keep the same node ID across deploys, so run history and references stay stable. ## 2.32.0: Triggers in code-deployed workflows _6 November 2026_ **New** - **Declare a trigger in code.** A linear workflow deployed from code can declare one catalogue trigger, such as a webhook, a schedule, or an app trigger, with its input and an optional connection. Without a trigger, the workflow stays **Manually Run**. Manual input fields are allowed only with the manual trigger. See [Triggers](/guides/workflows/triggers). ## 2.31.1 – 2.31.2: Workspaces without projects, and Oracle APEX _5 November 2026_ Projects are gone: agents and workflows now belong directly to a workspace. This release also adds the Oracle APEX integration. **New** - **Oracle APEX app.** Read and write ORDS data with a client-credentials connection, using query and row actions, polling triggers, and a row-event webhook. **Improved** - **Sign-up creates only the account.** A new user who isn't in any workspace sees a holding screen until a superadmin adds them. - **Agents created from code skip setup.** The first-time setup wizard is skipped, because the code already supplies instructions and a model. - The public API lists AI connections without their credentials. **Fixed** - **Tool-using agents finish their work.** Agents running inside apps and workflows sometimes stopped mid-task after a few rounds. They now get the full step budget. - **Oracle APEX objects resolve.** Objects picked from the dropdown no longer return "not found". Projects are removed, including their pages and database tables. Agents and workflows that were in a project now belong to its workspace. ## 2.30.0: Object type catalog and multiple OAuth clients _4 November 2026_ **New** - **Object types as a shared catalog.** Creating an object type grants it to your workspace, and platform admins can assign it to other workspaces. Open object types from a search side panel. - **Several OAuth clients per app.** An app can have more than one OAuth client. Builders choose a client only when more than one is shared with them, and token refresh keeps using the client that created the connection. See [App configuration](/guides/adminspace/app-configuration). - **Tables by slug.** The public API can create or update tables by slug. **Improved** - An app is marked ready only once a usable credential is shared. - Workflows managed from code are read-only in the builder. **Fixed** - Object-type fields are created only after you confirm their details. - Connection IDs are hidden on the app overview list. - Tooltips on workflow nodes no longer jump away from the cursor. Object type slugs become unique across the whole install. The migration renames duplicate slugs and creates a workspace grant for every existing type. ## 2.29.0: Redesigned apps and tools administration _3 November 2026_ **New** - **One Integrations catalog.** Superadmins manage apps and tools from a single catalog, with a **Catalog Sources** page and new admin navigation. - **Simpler app pages.** Each app has **Overview**, **Credentials**, **Access**, and **Usage** tabs, and the OAuth redirect URL is shown right where you need it. Managed connections open in a side panel. See [Managed connections](/guides/integrations/managed-connections). - **"Can use" access checker.** Check from a user or a workspace whether they can use a resource, and why. - **Secret expiry.** Credentials can have an optional expiry date. Expiring ones show a **Needs attention** status. - **"Shared by your admin" badge.** Builders see which connections an admin shared with them. **Improved** - Access panels search on the server, so lists with more than 100 users work. - Sign-in and sign-up pages are redesigned. ## 2.28.0: Outlook reply drafts _27 October 2026_ **New** - **Outlook Create Reply Draft.** Draft a reply on the original email thread from a workflow. **Improved** - Chat explains what happened to personal data in each message. - Installed apps with a managed connection are listed first. **Fixed** - The Outlook **Email Received** trigger no longer crashes when no folder is set, so Inbox workflows stay active. ## 2.27.0 – 2.27.1: Copilot Studio _26 October 2026_ **New** - **Copilot Studio action.** Send a message to a Copilot Studio agent from a workflow. Each user connects with their own Microsoft account. **Improved** - Agent dossier PDFs show current record names. - Superadmins see every approval in the current workspace. Only eligible approvers can decide. **Security** - Dependency updates that close high-severity advisories. ## 2.25.0: Roles when adding members, and span timestamps _22 October 2026_ **Improved** - **Assign roles while adding a member.** Choose a new member's workspace roles in the same step. See [Users and roles](/guides/adminspace/users-and-roles). - **Timestamps on traces.** Traces and spans show their start and end times. See [Observability](/guides/adminspace/observability). ## 2.24.0: Dossier PDFs, Supabase SQL, and SharePoint folders _22 October 2026_ **New** - **Dossier PDFs.** Download a live or frozen agent dossier as a branded PDF from the admin dossier page. - **Supabase: run SQL scripts.** - **SharePoint: read markdown from a shared folder,** including company libraries the signed-in user can already open. **Fixed** - Action runs that don't belong to a workflow are listed, and their approvals can continue. ## 2.23.0: Simpler approvals _21 October 2026_ **Improved** - **Request Approval is simpler.** Pick the approvers, how many approvals are required, and an optional expiry. See [Approvals](/guides/approvals). Approval stages, quorum modes, reassignment, segregation of duties, and delegation are removed from the action, the decision logic, and the Approvals inbox. The migration deletes those settings and all delegations. Review workflows that relied on them before upgrading. ## 2.22.0: Workflow runs linked to records _21 October 2026_ **New** - **Link runs to object records.** A workflow can link each run to an object record by a unique key, and create the record from the trigger when it doesn't exist yet. The run shows on the record's **Work** tab, with an activity view of the execution. **Improved** - Observability spans show the icon of the tool that was called. **Fixed** - Searchable dropdowns show their options again, and multi-select dropdowns match the single-select style. **Removed** - The object owner field. - The mobile "use a desktop" popup. ## 2.21.0: Scorecards, tables, and formula sheets _14 October 2026_ **New** - **Scorecards.** Live scorecards with values entered by hand or through the API. - **Tables.** Versioned lookup tables and decision tables, with **Excel** and **Postgres** lookup actions for workflows. - **Math formula sheet.** Named expressions live in their own formula sheet, so any workflow can use them, not only pricing steps. ## 2.20.0 – 2.20.2: Solution Designer retired _12 October 2026_ **Improved** - Agent memories are stored directly in the vector store, which removes a dependency. **Removed** - **Solution Designer** and its specialist builder agents. **Admin → Builder Agents** now lists only the Workflow Builder. **Security** - Patches for all open critical dependency advisories and most high-severity ones. - The migration permanently deletes all saved solutions. Back them up first if you need them. - The `minio-init` service is removed from the Docker Compose files. On a **new, empty** MinIO volume, create the bucket yourself with the `mc mb` command documented in the compose file. Existing volumes are not affected. ## 2.19.0: Personal-data screening always on _31 August 2026_ **Improved** - **PII screening is on by default.** The `PRESIDIO_ENABLED` environment switch is removed. A Super Admin can still pause screening in Admin Space. - **Personal data panel.** Agent PII controls moved from the chat header to a dedicated **Personal data** panel in the agent's configuration. ## 2.18.0: Personal-data routing _28 August 2026_ Lunnoa can detect personal data in a message before it reaches an AI model, and decide what happens to it. **New** - **PII detection with Presidio.** The detection service ships with the Docker Compose stack. Superadmins turn it on, choose which entity types to detect, and test it in Admin Space. - **Policies at every level.** Each AI connection has a personal-data tier, each workspace a minimum policy, and each agent an optional fallback connection and model for messages that contain personal data. Agents and members can only make a workspace's policy stricter, never looser. - **Ask before sending.** When a message contains personal data, chat asks what to do: hide the details, use a safer model, or edit the message. **Improved** - Personal-data settings use plain language throughout. - If the detection service is down, messages are blocked rather than sent unchecked. ## 2.16.0: Compliance dossiers, activity logs, and agent memory _26 August 2026_ **New** - **Compliance dossiers.** Superadmins get a versioned compliance record for each agent under **Compliance → Dossiers**. A checkpoint is saved nightly when the agent changed. **Freeze** always saves a version, and every version can be exported. Downloads are logged. - **Activity logs.** Logs of platform and workspace activity. - **Agent memory.** Browse, filter, edit, and delete the facts an agent remembers, clear them all, or preview what the agent would recall for a question. - **Workflow traces.** Each workflow run appears as a trace with one span per step, linked from the Executions table. - **Four-eyes approvals.** Stronger checks in Request Approval. Several of these options were later simplified in 2.23.0. **Improved** - Adminspace has two-level navigation (sections, then pages), and the workspace selector is hidden there because Adminspace covers the whole platform. - Steps set to continue on failure are still marked as errors, so they're visible in the run. - A refreshed UI design. ## 2.15.0: Refreshed interface and stricter objects _21 August 2026_ **Improved** - **Cleaner interface.** A minimalist redesign with a new UI font. Workflow nodes, tool-call cards, app layouts, dialogs, and popups are restyled. - **Stricter object attributes.** Object types validate their attributes, and a Form/JSON schema editor makes them easier to define. **Removed** - The unused server-side Pinecone integration. Knowledge uses Weaviate. ## 2.13.1 – 2.14.0: In-app observability _29 July – 3 August 2026_ **New** - **Observability viewer.** Traces, metrics, and logs inside the app, with role-based access and retention controls. Tool calls are captured too. See [Observability](/guides/adminspace/observability). The self-hosted SigNoz, ClickHouse, and OpenTelemetry collector services are removed from Docker Compose. The in-app viewer replaces them. Optional OTLP export to SigNoz Cloud is still available in Admin Space. ## 2.12.0 – 2.13.0: Deep-work planning for agents _20–21 July 2026_ **New** - **Deep-work planning.** Agents can plan before they act, keep working on long tasks, and offload large tool results so they don't fill the conversation. Configure this in the agent's deep-work panel, and follow the plan in the chat checklist. - **Queue items linked to objects.** Link queue items to object records from the Work panel and queue actions. **Fixed** - Execution stability fixes for live updates and execution logs. ## 2.11.0 – 2.11.1: SDK runs and agent analytics _16 July 2026_ **New** - **Multi-step runs through the API.** Start multi-step runs from the public API and SDK, create or update workflows and agents by slug, and set default connections. See [Start runs](/guides/develop/client/runs). - **Agent analytics.** Usage metrics for each agent turn, and an **Agents** tab in analytics. ## 2.10.0 – 2.10.1: Approvals inbox _15 July 2026_ **New** - **Rebuilt Approvals inbox.** Pending and Done tabs, a detail panel, and a list of who can approve. - **OpenConnector support.** Bundled with the Docker Compose stack, and switched off until you configure it. - **Live execution updates.** **Fixed** - Workflow node settings no longer reset when you save. ## 2.9.0 – 2.9.1: OIDC-only SSO and schedule-aware builder chat _10–13 July 2026_ **New** - **Schedules in the builder chat.** Describe a schedule in plain language, such as "every Monday at 9am", and the workflow builder chat sets up the trigger. It also writes descriptions for the workflow and its steps. See [Chat to workflow](/guides/workflows/chat-to-workflow). SSO uses OIDC with SCIM provisioning. SAML and personas are removed. Move any SAML identity provider to OIDC before upgrading. See [SSO](/guides/adminspace/sso). ## 2.8.0 – 2.8.1: AI workflow builder chat _10 July 2026_ **New** - **Workflow builder chat.** A chat panel beside the canvas interviews you about the process and builds the workflow live (trigger, steps, and app suggestions), saving as it goes. - **Approval-driven runs.** Workflows can pause for a Request Approval step and continue when it's decided. **Fixed** - Connections between nodes persist after you refresh the builder. Connections you draw by hand are saved straight away. ## 2.7.0 – 2.7.1: Headless use with API keys _9 July 2026_ Lunnoa Automate can now be the backend for your own apps and integrations. **New** - **API keys.** SuperAdmins create workspace API keys in **Admin Space → API Keys**, with a role and an optional expiry. Each key acts as a service account with normal role permissions. The secret is shown once. See [API keys](/guides/adminspace/api-keys). - **Bearer authentication.** Clients call the API with `Authorization: Bearer lna_…`. Rate limits apply per key. See [Authentication](/api/auth). - **Public API v1.** A documented, stable set of endpoints, marked in the [API reference](/api/reference). **Fixed** - Workflows that split into parallel paths and merge again now resume correctly. ## 2.6.1 – 2.6.2: Object context tools _6–7 July 2026_ **New** - **Object context tools for agents.** When an object type has a published context blueprint, agents that can use it get a dedicated context tool and are told to prefer it for questions about those objects. The object list shows which types offer one. Agents can no longer be triggered directly. Build a workflow with the trigger you need and a **Message Agent** step instead. ## 2.3.0 – 2.5.1: Agent sharing, Agent Hub, and SSO enforcement _20–22 June 2026_ **New** - **Share agents.** Share an agent with a user, a workspace, or everyone, with rate limits on each share. See [Chat and share](/guides/agents/chat-and-share). - **Agent Hub and the Agent User role.** People with the **Agent User** role can use shared agents in the Agent Hub without building anything. - **SCIM groups map to workspaces.** An identity-provider group can grant a specific workspace and role. Removing someone from the group removes that access when no other group still grants it. - **Enforce SSO.** SSO can be required for the whole install, with a single identity provider. **Improved** - Roles are one catalog for the whole install. **Fixed** - Agent User sign-in and the Consumers workspace setup. - The last-admin safeguard, and roles for newly provisioned users. **Security** - Dependency updates for high-severity advisories. ## 2.2.0 – 2.2.9: New agent builder and MCP _2–20 June 2026_ **New** - **AI Agent Builder.** A visual canvas for configuring agents. - **MCP.** Connect MCP servers, with improved tool calling. See [MCP](/guides/mcp). - **File uploads in chat**, and **Brave web search**. **Improved** - An agent's app actions and tools are now one list. - Transactional email is sent only through your own SMTP server. See [Email configuration](/guides/adminspace/email-config). - Excel, OneDrive, and Microsoft app improvements. **Fixed** - The workflow builder keeps its add buttons and connection lines in sync after undo, redo, and reload. **Security** - **Two-factor authentication hardened.** You need a code, not only your password, to turn 2FA off. Codes can't be replayed, and backup codes now work at sign-in. Agent actions stored the old way are removed and not migrated. Re-enable any missing app actions as tools on the agent. ## 1.17.0 – 2.1.0: Object knowledge and audit logging _23–29 April 2026_ **New** - **Agents with object knowledge.** Agents can use your object records as knowledge. - **Duplicate a workflow** in one click, within the same workspace. - **Full-screen instructions editor** for long agent instructions, with a character count. - **LLM call audit.** Audit logging of LLM calls, with audit preferences for each workspace. - **Tool policies.** When you enable a tool on an agent, a platform-managed policy is added to its instructions so the tool behaves predictably. **Improved** - A "Select all" checkbox when you create or edit a role. - Queues stay fast as they grow. - Queue errors no longer reveal internal details. **Security** - Dependency updates for several advisories. ## 1.15.0 – 1.15.5: UI framework upgrade _1–16 April 2026_ **New** - Custom action cards. **Improved** - The UI framework is upgraded, and chat streaming is more reliable. **Removed** - The Node.js code execution step. - The workflow canvas minimap. - The display name setting in email configuration. ## 1.14.0: Public sharing _19 March 2026_ **New** - **Public sharing and public chat** for agents, with the matching configuration options. ## 1.13.7 – 1.13.16: Loops and object fixes _11–18 February 2026_ **Improved** - The **Loop** step is redesigned, with a table view of items and app icons. **Fixed** - Reading, creating, and updating object attributes, and the object trigger. - The conversational URL, object rendering, and navigation. Source: https://docs.lunnoa.com/guides/release-notes