Skip to content

Four jobs, four schedules, one file

Four agentic workflow examples, each a row in open-source Kortix

An agentic workflow example is worth copying when it shows the row that starts the run, the prompt that row fires and the lines that come back. These four are rows in a project's kortix.yaml: a Wednesday stock list, a review per pull request, a monthly renewal check and a Saturday postmortem. Kortix is the open-source CompanyOS, and each row names its agent, its schedule and the session its fire lands in.

The open-source CompanyOS

Cron and webhook triggers · Four session modes · Self-host is free

kortix.yaml · agents

An agent is a named entry in the file, and the lines under it carry its prompt file, its tools, its connectors and its skills.

Source: kortix.com/automations

  # Engineering  eng-triage:    prompt_file: agents/engineering/triage.md    tools: [read, grep, glob, web_search]    connectors: [github, kortix_slack]    skills: [triage-issue]

Four rows, and the work each fire starts

Each card carries the row that starts the run, the fields that row sets, and the job its prompt asks for.

Weekly stockkortix.yaml · trigger weekly-inventory

A Wednesday stock list that a buyer edits in the diff.

At 07:00 Chicago time the ops agent reads last week's counts from the repo, proposes a reorder file and opens a change request. The buyer changes the quantities in the diff rather than in a spreadsheet.

Trigger
weekly-inventory
Cron
0 0 7 * * 3
Agent
ops
Session
fresh

Wednesday at 07:00 in America/Chicago, a clean session every week.

Per pull requestkortix.yaml · trigger pr-review

Every pull request opens one review thread.

A repository event fires the webhook, the payload's pull request number becomes the key, and each pull request keeps its own session instead of joining a shared queue.

Type
webhook
Agent
reviewer
Secret
WEBHOOK_SECRET
Session
keyed
Session key
{{ body.number }}

A webhook trigger without its signing secret is rejected at validation.

Monthly renewalkortix.yaml · trigger renewal-watch

A renewal check that keeps last month's exceptions.

On the 15th at 08:00 Singapore time, reuse re-prompts the most recent healthy session the trigger created, so the accounts agent opens with the previous month's notes already in the thread.

Trigger
renewal-watch
Cron
0 0 8 15 * *
Timezone
Asia/Singapore
Session
reuse

One running thread for a monthly job, instead of a fresh start twelve times a year.

Saturday postmortemkortix.yaml · trigger incident-postmortem

The week's incidents get a timeline nobody assembles by hand.

Saturday at 06:00 UTC the sre agent reads the week's incident notes in the repo, writes the timeline as a file and opens a change request while the detail is still fresh.

Trigger
incident-postmortem
Cron
0 0 6 * * 6
Agent
sre
Session
fresh

The machine sleeps about 15 to 20 minutes after the last turn and keeps /workspace, the branch and the conversation.

What a copyable example has to show

Pattern catalogs name reflection, tool use and planner-executor loops, and they are good at that. What they leave out is the part that decides whether a workflow holds up in a building with other people in it: the paperwork. An example worth copying carries three visible parts, which are the trigger row, the prompt sitting on it and the lines the run hands back. What an agentic workflow means is the other half of the question; these four runs keep to those three parts.

A row, a prompt and a session's output fit on one screen. They are specific enough to argue with. When one of the three is missing, what is left is a screenshot of a product.

One row in full

The weekly-inventory row is the whole example, in the shape it takes in a project config beside the agent it runs as:

triggers:
  - slug: weekly-inventory
    type: cron
    agent: ops
    cron: "0 0 7 * * 3"
    timezone: America/Chicago
    session_mode: fresh
    prompt: |
      Read last week's stock counts. Propose a reorder file. Open a change request.

Every field has a job. The slug is the name typed at the command line. type: cron puts the schedule in the flat form of the row; the expanded form carries it in one on:, which also takes a webhook or an App event. agent: ops names the agent the fire starts, and that name has to exist under agents: in the same file. The schedule line holds six parts, seconds through weekday, and the zone is an IANA name. session_mode: fresh asks for a clean session on every fire. The block under prompt: is the work itself: what to read, what to write and where the result goes.

The trigger lives beside the agent and the machine

The schedule, the agent slug and the prompt sit within a few lines of each other in the same config. That file also declares the machine the agent runs on, so a reader can copy the whole shape without opening a dashboard.

Proximity is what separates an example from a demo. Text in git can be diffed, forked and reviewed, and it survives the person who wrote it. The row is still there after they change teams, and the comment above it still says what it was for.

Four session modes, one per job

session_mode decides which session a fire lands in. It is the field a copied row most often keeps by accident. Four modes exist, and a row that names none gets a fresh session.

A weekly stock list wants a clean machine and no memory of last week, so it asks for fresh. A monthly renewal check wants the thread it already owns, which is reuse. pinned uses the session named by session_id. keyed keeps one session for each value of session_key, a template over the payload such as "{{ body.number }}", and a key that renders empty runs fresh. One customer, one pull request or one order gets its own thread.

A webhook row, and what signs it

Some work belongs to an event rather than a clock. The pr-review row swaps the schedule for a secret name, and the payload renders into the prompt. This is the shape of that row:

  - slug: pr-review
    type: webhook
    agent: reviewer
    secret_env: WEBHOOK_SECRET
    session_mode: keyed
    session_key: "{{ body.number }}"
    prompt: |
      Review pull request {{ body.number }}. Open a change request with findings.

A webhook row is signed. It carries the name of a project secret, and validation refuses a row that names none. The caller sends an HMAC-SHA256 of the request body in X-Kortix-Signature. X-Hub-Signature-256 works as well, so a repository webhook needs no adapter. A payload that fails the filter starts no session. That stops a source which reports both sides of a conversation from firing the agent on its own reply.

A repository event fires these rows as well, and GitHub Agentic Workflows sets out what GitHub's product does with the same event.

What the run hands back

A finished session leaves a commit on a branch of its own, plus a change request. Session work reaches main through a change request, and merge is default-deny for agents. A run that answers the question and stops leaves nothing behind.

A transcript asks the reader to trust the run. A branch asks them to read it. The change request carries the changed lines against a base, with a place for a comment. That is what a colleague's work already looks like.

What a fire costs

Who can open a triggered run is narrow by default: the people who manage triggers, plus account owners and admins. The trigger can be set to selected teammates or to the whole project. The machine stops about 15 to 20 minutes after the last turn, unless the run is waiting on a person, which it will do for at most 30 minutes. A row copied from a colleague cannot reach further than they could. Both rules are worth knowing before a schedule runs unattended through a weekend.

Changing a row you copied

Copied rows go wrong in small, predictable places. The slug is the name you type, so it should say what the run does. The cron and the timezone travel together. A row copied from a colleague abroad keeps their clock until you change it. The agent name has to exist under agents: in the same file, because the fire starts that agent and no other. The prompt is the field where a small edit pays for itself, since it becomes the session's first message.

session_mode is the field people leave alone, and the one worth a second look when the job changes. A digest copied into a renewal check should change mode along with the prompt.

Starting from a row you already have

The shortest path is to copy one row, change the slug and the cron, and leave the rest. Building your own walks a weekday digest from the first line to the merged change request. It covers the session mode and the prompt template. Run it on Kortix Cloud, in your VPC, or on your own on-prem network. Self-host is free.

Examples and triggers

What are some examples of agentic workflows?

A Wednesday stock list, a review session per pull request, a monthly renewal check and a Saturday incident postmortem. Each is a trigger row in kortix.yaml, and the work each one commits reaches main as a change request a person reads.

What is the difference between an agentic workflow and a cron job?

A cron job runs commands written in advance. An agentic workflow can run on the same schedule, then hand the goal to an agent that chooses the steps, so a day the script never anticipated still has a way forward.

Can an agentic workflow run without a person present?

Yes. A trigger starts the session with nobody at the keyboard. The work reaches main through a change request, and merge is default-deny for agents unless an admin granted the merge capability.

How do you trigger an agentic workflow?

With a cron schedule in an IANA timezone, or a signed webhook an external service POSTs to. For a hand run, kortix sessions new --agent ops --prompt "…" starts an ordinary session that boots the same image and opens with the row's prompt. Only the schedule and the signature go untested.

Take one of these rows and put your own clock on it.

Change the slug, the agent name and the cron, and the rest of the file keeps working. I'd run them on Kortix, my pick, and I work on Kortix's marketing, so weigh that accordingly.