Build with Harebell · Building

Jobs that run on a schedule, and agents

Not everything useful is a page that someone opens. Sometimes you want a digest posted to Slack every morning, or a helper that answers questions when someone mentions it. Harebell calls the first kind a job and the second kind an agent. This page explains what each one is, how you ask for one, what you will see in the console, and the few places where they behave differently from an app, so that nothing about them surprises you.

How the three kinds differ#

What separates an app, a job and an agent is what starts it. Someone opening its address starts an app. The clock starts a job. An event starts an agent, such as a message in Slack. Everything else about putting them on Harebell is the same: you describe it to your AI tool, your AI tool ships it, and you read the release page and press Release.

Because nobody opens a job, it has no address and no sign-in page. Because nothing needs to be running between runs, a job costs nothing between them. An agent, like an app, keeps running so that it can answer at any moment.

Jobs#

A job runs on a schedule and then finishes. You describe the schedule in plain words:

Make a job on Harebell that posts yesterday's expenses over $500 in #finance-ops every weekday at 7 AM, and ship it.

Tell your AI tool your time zone too, because a job runs on universal time unless the tool is told otherwise, and 7 in the morning in Warsaw is not 7 in the morning in Chicago.

Time limits and overlapping runs#

Every job has a time limit, one hour unless your AI tool sets another between one minute and twelve hours. A run that takes longer is stopped and recorded as having run out of time.

Suppose a job runs every five minutes, and one run takes seven. Without a guard, a second run would start while the first was still going, and both might post the same message. Harebell stops that. If the previous run is still going when the next one is due, the new run is skipped and recorded as skipped, and the job carries on at the next time as usual.

What you see in the console#

A job's page in the console has a Schedule card and a Runs tab. The Schedule card shows when it runs and when it runs next, and it has three controls.

  • Run now starts the job within the minute, so you can watch it work without waiting for the clock. It is also the way to try a job, since jobs have no private copy.
  • Turn off stops the schedule from starting the job, and stops a run that is going. Turn on brings it back.
  • Skip this run skips just the next run, and the runs after it go ahead, which is useful for a holiday.

The Runs tab lists each run, newest first, with how it ended. A run is Worked or Failed, or it can be Skipped, Ran out of time, Stopped (someone turned the job off while it ran), or Missed (nothing started when one was due). If a run did not work, your AI tool can read its log through Harebell and tell you why. When your app breaks covers that.

Releasing a changed job#

When you release a new update of a job, the next runs use the new one. A run that is going at that moment finishes as it is. If a job is turned off, releasing an update leaves it turned off.

Agents#

An agent waits for something to happen and then acts. What starts it is up to you. It can be someone mentioning it in a Slack channel, someone messaging it directly, or a slash command. It can also be a schedule, a webhook (a web address that another tool can call to send the agent an event), or, if your company uses Microsoft Teams, a message there.

Make an agent on Harebell that answers travel policy questions in #travel, and ship it.

Its own Slack identity#

An agent gets its own Slack app and bot, with its own name, so people mention and message it directly, and Slack's own pages show it as itself. Harebell creates that Slack app when you release the agent. The release page says so, and the agent goes live by itself once someone adds the new app to Slack. If the agent needs to read a private channel, someone in that channel has to invite it, and the release page says who to invite and where. The release waits for up to seven days, and the agent's page shows Waiting for Slack or Waiting for invites in the meantime.

What it can read, and who it can reach#

An agent always reads as itself, never as a person, so it never acts with the rights of whoever last spoke to it. The reason is that an agent remembers things between events, and Harebell cannot see what it remembers. So instead of checking each answer, Harebell checks the agent's reach up front. Everything the agent reads has to be something that everyone it can reach could already read, or the data's owner has to agree. Use company data explains the rule. A job is held to the same standard, checked against everyone in your company, because what a job posts can end up anywhere. That is why a job that reads a private channel usually needs the channel's owner to agree.

An agent also chooses at run time who to message, and that creates a risk that the release page cannot check in advance. If an agent tries to message someone who could not otherwise see the data it used, Harebell does not send the message. It holds it, and asks the owners of that data. Every owner has to approve, and a held message waits up to 24 hours. The agent learns later whether the message was sent, failed, declined or expired.

Trying an agent#

A private copy is not available for agents yet. Release the agent, and use it in the channel where it will live, preferably a quiet one at first.

Stopping and starting#

An app or agent that you stop keeps its data and settings, and can be started again. The page for it has Stop it and Start it controls. A job has Turn off and Turn on instead, as above. Only the owner or an admin can use them, and the security team can stop any of them, but cannot start them again.

Costs and AI models#

If your job or agent calls an AI model, it has a daily limit on what that can cost. Your company sets the standard limit, and if your update asks for more, an admin has to approve it, which the release page tells you. Until they do, the job or agent runs with the standard limit. What your app costs shows where costs come from.