Skip to main content
Triggers are the starting gun for your agent workflows. Instead of running an agent manually from the dashboard, you define a condition—an incoming HTTP request, a time on the clock, or an event fired by a connected tool—and Layest fires the agent automatically whenever that condition is met. This lets your agents work in the background continuously, responding to the real world without any human input required.

Types of triggers

Layest supports three trigger types, each suited to a different automation pattern:

Create a trigger

A webhook trigger gives you a unique HTTPS endpoint. Any system that can send an HTTP POST request—a form, a payment processor, another platform—can start your agent by hitting that URL.
1

Open the Triggers tab

Inside the agent editor, click the Triggers tab, then click + Add Trigger.
2

Select Webhook

Choose Webhook Trigger from the trigger type list.
3

Configure the endpoint

Give the trigger a name. Layest generates a unique webhook URL for this trigger. Copy it—you’ll paste it into the external system.
4

Set a secret (recommended)

Enable Signature Verification and copy the generated secret. Configure your external system to sign its requests with this secret so Layest can reject forged payloads.
5

Map payload fields

Under Payload Mapping, define which fields from the incoming JSON body should be passed to your agent as input variables.
6

Save and activate

Click Save Trigger. The trigger becomes active immediately—the next POST to the URL will start the agent.
Example incoming payload
Map data.ticket_id, data.subject, and data.requester.email to agent input variables so the agent has the context it needs from the first step.

Configure conditions and filters

Every trigger type supports an optional Conditions block. Conditions let you gate the agent run on properties of the incoming data without writing any code.
  • Field – The payload or event field to inspect (for example, data.priority).
  • Operator – Comparison to apply: equals, not equals, contains, greater than, etc.
  • Value – The value to compare against.
Add multiple conditions and choose whether all must be true (AND) or any must be true (OR) before the agent fires.

Test a trigger from the dashboard

You don’t need to wait for a real external event to verify a trigger is wired up correctly.
1

Open the trigger detail

In the Triggers tab, click the trigger you want to test.
2

Click Send Test Event

Click Send Test Event. For webhook and event triggers, Layest presents an editable JSON editor pre-filled with a sample payload matching the expected schema.
3

Edit the payload if needed

Adjust any field values to represent the scenario you want to test, then click Run Test.
4

Review the run

Layest fires the agent with the test payload and opens the run trace automatically. Inspect each step to confirm inputs were mapped correctly and the agent behaved as expected.
Test runs are marked as test in the run history and do not count against any usage quotas tied to live triggers.