Read the latest blog: Pillars for Implementing Critical Production-Ready AI Learn more

Core Concepts

To view the complete documentation, please access via the Lemma console.

Lemma’s Five Core Concepts

There are five core concepts when building workflow automations on the Lemma platform. These include: Workers, States, Functions, Connections, and Secrets.

Worker
Applications

A Worker is the fundamental unit of a workflow. It represents a complete process defined as a sequence of interconnected States. Workers are immutable to provide safety measures; changes can be made to a Worker by creating and publishing a new version.

The execution of a Worker is called a Run. Each Run maintains its own Context, an internal storage space used to share data between States within that specific Run. Inputs and outputs to States are stored in the Context so they can be shared and accessed across various steps of a Run.

Key Attributes of a Worker:

Each published Worker is immediately executable via a unique endpoint and is production ready. Workers are durable, observable, and scalable.

State
ApplicationsApplicationsApplications

A State represents a single step within a Worker's execution. Each State either performs actions that utilize Functions, pauses or resumes the workflow, or contains logic that determines the flow of execution.

States are powerful logical building blocks that can enable many flexible workflows. For example, Agentic-style workflows can be created by combining certain states types such as a Do/While and a ForEach, with non-deterministic LLM Functions and Functions that you want the LLM to reason across to call.

Some of these recurring patterns are presented in the platform in the form of a Template. Templates are pre-defined Worker configurations that are available for use and further customization. Template availability can be configured per stack.

Key Attributes of a State:

Types of States:

Function
ApplicationsApplicationsApplications

A Function performs a specific action within a State by making an API call. Functions are designed to be modular and easily integrated into different Workers. The Lemma platform supports multiple protocols for Functions (e.g. REST, gRPC).

Key Attributes of a Function:

Examples

These Function definitions are saved in the Function Registry, a repository where existing Functions can be found, and new Functions can be created. The Function Registry also provides the functionality of testing Functions by providing sample input data, so that you can explore the requirements and the results of a Function before determining whether to integrate them into Workers.

The Lemma platform comes with a set of predefined Functions, including some of the latest models as well as models with special compliance guarantees. These ready-to-use functions do not require you to preconfigure their own authentication schemes.

Functions can be Stochastic, meaning that the output of an API call can be different for the same given inputs (eg LLM’s,) or Deterministic, meaning that the output of an API call will be the same for the same given inputs. Depending on the type of the function, retries may have different behavioral guarantees.

Connection
ApplicationsApplications

A Connection pulls data from a data source like a Database or an API and executes a Run of a Worker using the incoming data. Each Connection can be configured to pull specific data from a data source at a pre-configured frequency or stream. The data being processed can either be structured, semi-structured, or unstructured.

If the data source is protected and requires authentication credentials, then a Connection can use preconfigured Secrets to access that data.

Key Attributes of a Connection:

Example Types of Connections:

Secret
Applications

A Secret stores sensitive information, such as API keys, passwords, and database credentials, used by Functions and Connections. They are managed securely and encrypted within the platform, preventing hardcoding of sensitive data into your Workers.

Lemma comes with a set of Credentials managed by Thread for common AI building blocks pre-configured in the Function Registry. These are available for use by any user on the platform, so that you can experiment, try, and productionize different Functions without signing up for every different cloud or model provider, reducing overhead and lowering barriers to entry for workflow building!

This allows for an easy bootstrapping of new Workers and better experience with experimenting and mixing different Function service providers. Functions available to use with Thread Credentials can be configured on a per-tenant level, adhering to organizational restrictions and practices.

Billing for usage of Thread credentials will be included in monthly usage pricing.

Applications
Applications

Applications are another interface to Lemma Workers. Applications allow you to continue to work as you do today in your existing tool chain, but access and leverage the power of your Workers easily to enhance and augment from those same tools.

Applications are an easy way to interact with Workers and provide contextual information.

Compliance

CJIS

GDPR

HIPAA

SOC 2 Type 2

Made In NY badge

©️ 2025 Thread AI, Inc.

131 Varick Street. Suite 1029. New York, NY 10013

Vector