Tensic guides

Guide 15

Automate projects with routines, messaging channels, webhooks and the API

Schedule agent tasks with routines, connect a project to messaging channels, receive event webhooks in your own systems, and build against the Tensic OpenAPI spec with a coding agent.

On this page
  1. Create a routine to run an agent on a schedule
  2. Monitor and run a routine from the Schedule board
  3. Monitor routines and crons across the platform (admins)
  4. Connect a project to messaging channels
  5. Receive Tensic events in your own systems with webhooks
  6. Build your own integration from the Tensic OpenAPI spec

Tensic projects do not have to wait for a user to type. Routines run a message against a project on a schedule, channels expose a project on messaging platforms, event webhooks notify your own systems when something happens, and the OpenAPI spec lets you build your own automation on top of the platform.

Create a routine to run an agent on a schedule

A routine sends a fixed message to a project at a set interval, like a scheduled job. The agent handles it with its normal prompt, tools and sandbox. Use routines for recurring work such as reports, health checks, or syncing and summarising data.

  1. Open the project and select the Routines tab. The Schedule board lists existing routines.
  2. Click New routine.
  3. Fill in:
    • Name – for example Daily health check.
    • Message – the instruction the routine sends to the project, for example calculate report X.
    • Schedule – the interval, for example Every hour or every 5 minutes.
    • Enabled – switch on to start running on the schedule.
  4. Click Create.

Keep the routine's message short and define the task itself in the project's system message. For example, describe in the system message what "report X" contains and where the data comes from; the routine then only has to say calculate report X. Everything the agent runs during a routine runs in the project's sandbox.

New routine dialog

Monitor and run a routine from the Schedule board

Each routine appears as a card on the project's Routines tab. The card shows:

  • the schedule (for example every 5m) and time zone, the Message, and the Next run;
  • Last 5 fires – the latest runs with time, trigger (scheduled or manual), status and duration;
  • Fire result – the agent's answer from the latest run, with Show more for the full text;
  • Fire now – run the routine immediately, without waiting for the schedule;
  • History – all earlier runs;
  • API – how to trigger the routine through the API.

Use the icons on the card to edit or delete the routine, and the toggle to enable or disable it.

If the project has memory enabled, routine runs are stored in the agent's memory like any conversation. Routines are best suited to stateless tasks, so consider running them on a project without memory, or check that routine output does not crowd out user conversations.

Routine card with last fires, fire result, Fire now, History and API

Monitor routines and crons across the platform (admins)

Platform admins can see every routine configured on the platform and the scheduled system jobs that run them.

  1. In the sidebar, open Observability.
  2. Select Routines to see all routines on the platform with project, name, interval, last run and an Enabled toggle. Disable a routine here to stop it centrally, for example if it is misused or runs too often.
  3. Select Cron Logs to see the platform's scheduled jobs (system crons, not operating-system crons) and each run's status, message and duration. The routines cron is the job that fires routines; other crons handle tasks such as memory indexing and knowledge-base syncs.
  4. Expand a log entry to read its full output when a job reports an error.

Connect a project to messaging channels

A project's Integrations tab lists the Channels the project can be reached on. Each channel stores its own credentials; saving one never touches the others.

Available channels:

  • Telegram
  • Slack
  • WhatsApp Business Cloud
  • Email · SMTP – managed on the team: SMTP is not stored per project, and the send_email tool uses the owning team's relay.
  • SMS · Twilio
  1. Open the project and select the Integrations tab.
  2. On the channel card, click Credentials and fill in the required fields (the card shows how many are set, for example "0 of 6 fields set").
  3. Click Test connection where available to check the credentials.

The same tab also holds the project's Widgets (see the widget guide) and Event webhooks.

Integrations tab with channel cards

Receive Tensic events in your own systems with webhooks

Event webhooks send an HTTPS request to your system when something happens in a project, for example so your back end can react when a budget runs out.

  1. Open the project, select Integrations and scroll to Event webhooks.
  2. Enter the endpoint URL. It must be HTTPS; private (RFC 1918) hosts are refused at delivery time.
  3. Optionally set a Signing secret, or use rotate to generate one. Tensic then signs each request body with HMAC-SHA256 and sends the signature in the X-Tensic-Signature header. Leave empty to skip signing.
  4. Under Subscriptions, switch on the events you want:
    • budget_exceeded – the project hit its budget cap; fired before the caller receives the refusal.
    • budget_warning – the project crossed 80 % and then 95 % of its budget; fires once per threshold per month. Opt-in.
    • sync_completed – a knowledge-base sync source (URL, S3, Drive, Confluence, SharePoint) finished; one event per source per run.
    • eval_completed – an eval run finished, with the score and per-metric breakdown.
    • routine_failed – a scheduled routine raised an error; the body carries the exception summary.
  5. Use the Payload inspector to see a sample Body and Headers for each event, ready-made signature checks (Verify · Python, Verify · Node) and a cURL command to test your endpoint.

Always verify X-Tensic-Signature in your endpoint before acting on a webhook.

Event webhooks: endpoint, signing secret and subscriptions

Build your own integration from the Tensic OpenAPI spec

Everything in Tensic is available through its API, described by an OpenAPI spec. The sidebar links to Documentation and to Swagger, the interactive API reference. Each project also has an API button in its header with project-specific call details.

The fastest way to build on Tensic is to let a coding agent (such as Claude Code, OpenAI Codex or OpenCode) write the code against the spec:

  1. Download the Tensic OpenAPI spec and place it in your project folder.
  2. Tell the coding agent what you want, and point it to the spec. For example: "This is the OpenAPI spec of the Tensic API. Build a simple chat app where a user can ask questions to project 48 and see the answers."
  3. Create an API key for the project in its Access tab and give it to the app through an environment variable, not in code.
  4. Run and test the result; ask the agent to fix anything that does not match the spec.

A good first exercise is a small ChatGPT-style chat app on an agent project: it exercises memory, memory search, tools and the sandbox terminal in one go.

Common questions

What is the difference between a routine and a webhook?

A routine makes Tensic do something on a schedule (send a message to a project). A webhook makes Tensic tell your system that something happened (budget, sync, eval, routine failure).

Can I trigger a routine immediately?

Yes. Click Fire now on the routine's card, or call it through the API shown in the card's API section.

How do I know when a routine fails?

Subscribe to routine_failed under Event webhooks, and check the card's Last 5 fires and History. Admins can also check Observability → Cron Logs.

Where do I define what the routine actually does?

In the project's system message. The routine's Message only needs to name the task.

Can a platform admin stop someone else's routine?

Yes. In Observability → Routines, admins see every routine on the platform and can disable each one.

How do I verify that a webhook really came from Tensic?

Set a Signing secret and check the HMAC-SHA256 signature in the X-Tensic-Signature header. The Payload inspector shows ready-made verification code for Python and Node.

Why is my webhook to an internal server not delivered?

Webhooks must use HTTPS to a public host; private (RFC 1918) addresses are refused at delivery time.

Is there an SDK?

Build directly against the OpenAPI spec. Coding agents can generate a client from the spec in any language.