ActionLayer streams real-browser task execution (bookings, form fills, checkouts) into your Convex database so your UI updates reactively without polling.
npm install @actionlayer/convexActionLayer is a Convex component that submits tasks, then streams task status updates into your Convex database via a scheduled poll loop. It handles anything in the physical world - from restaurant reservations, flower delivery, ride booking, and much more. Task state is stored in a component-owned table and surfaced through reactive queries, so your UI updates without any client-side polling logic.
ActionLayer provides a Convex component that lets you call actionLayer.startTask(ctx, { goal }) from a Convex action to execute tasks on real websites via a managed browser. Task status is written to a component-owned Convex table and streamed to your frontend through useQuery without any polling logic on your side.
The @actionlayer/convex component uses the Convex scheduler to run a poll loop internally and writes state updates to its own table. Your frontend subscribes with useQuery(api.tasks.status, { ticketId }) and re-renders automatically as state moves through pending, completed, failed, cancelled, or blocked_on_user.
When ActionLayer needs additional input from the user, the task parks at the blocked_on_user state with the ask available in infoRequest and reason fields. You send the user's response back with actionLayer.reply(ctx, { ticketId, message }) and the task resumes automatically.
ActionLayer lets you pass a natural language goal such as 'Book a table for 2 at Lilia Brooklyn this Saturday around 7pm' to actionLayer.startTask inside a Convex action. ActionLayer operates a real browser end-to-end to complete the task and streams progress back into your Convex app reactively.
No. The @actionlayer/convex component stores all task state in its own component-owned table, leaving your app's tables untouched. Task records are scoped to the component and accessed through the generated components.actionlayer API reference.
When you call actionLayer.startTask, the component schedules a Convex scheduler-driven poll loop that fetches task status from the ActionLayer API and writes updates to a component table. Because the data lives in Convex, any useQuery subscription to your status query function re-renders automatically on every state change.
An ActionLayer task moves through the states: pending, completed, failed, cancelled, and blocked_on_user. The blocked_on_user state occurs when the task requires additional input from the user, such as a missing detail or a choice. The required information is surfaced in the infoRequest and reason fields of the task record.
You can stop a running task by calling actionLayer.cancel(ctx, { ticketId }) from a Convex action. This moves the task to the cancelled terminal state and stops the internal poll loop.
You need to install the package, register the component in convex/convex.config.ts using app.use(actionlayer), and add your ACTIONLAYER_API_KEY environment variable in the Convex dashboard under Settings then Environment Variables. After running npx convex dev, the components.actionlayer reference is available in your generated API.