CJM
Agents

Automate work with routines

Configure a project agent to run manually, on a schedule, or from a webhook.

Create a routine

  1. Select the project and open AgentsRoutines.
  2. Select New routine.
  3. Enter a name, choose an available agent, and write the prompt it should use.
  4. Optionally add a description, then leave the routine enabled when it is ready to run.
  5. Add one or more triggers and, if needed, an email output action.
  6. Save the routine.

A routine runs the selected agent with its saved prompt. It is different from outbound webhooks, which send CJM events to another system.

Choose how it starts

Choose the trigger that matches the work:

  • Manual: run it yourself from the routine page when needed.
  • Cron: enter a valid schedule expression, for example 0 9 * * 1 for Monday at 09:00, and set the time zone when it matters.
  • Webhook: create a secret and give it to the system that is allowed to trigger the routine. That system must send the secret in the X-Routine-Secret header.

The current dashboard lets you configure the webhook secret but does not show a copyable webhook endpoint. Confirm the endpoint with the product interface or support before configuring an external caller.

Receive the result by email

Add an Email output action, enter one or more recipient addresses separated by commas, and optionally set a subject. When the run completes, CJM sends the output to those recipients.

Keep the email action enabled and verify the addresses before relying on it. An email-delivery problem is recorded separately and does not turn a completed agent run into a failed run.

Run and inspect a routine

Use the manual run action for the first test. Open the routine's run history to check who or what started each execution, its status, duration, token usage, cost, and any error message. A completed test and received email confirm the configuration works end to end.

Common failures

  • The routine does not start: check that both the routine and its agent are enabled.
  • A scheduled run fails: correct the cron expression or its time zone.
  • A webhook call is rejected: verify the X-Routine-Secret header matches the configured secret exactly.
  • The run stops for budget: the agent's monthly budget is exhausted; ask a project administrator to review it.
  • No email arrives: check recipients and the email action, then inspect the run history. The agent may have completed even if delivery failed.

On this page