Skip to content
Autonomous AI Agents GuideTry Kortix

Four open-source autonomous agent examples, one run at a time

An autonomous agent example is useful once you can picture the run: what fired it, what it touched, what came back. Four cases, from a digest to an App event. Kortix is the open-source CompanyOS: your agents, their skills, your company memory, and every connector in one git repo you own, with the agents working on real cloud computers.

The manifest every example starts from

The documented example is one cron trigger in the workspace manifest, and every line of it is a key the trigger reference lists.

kortix.yaml
triggers:  - slug: weekly-report    name: Weekly report    on:      cron: "0 0 9 * * 1"      timezone: Europe/Berlin    run:      agent: support      prompt: Write the weekly support report for the last 7 days.
Source: https://kortix.com/docs/developers#triggers-keys

What each example does when it runs

Each example ends in the artifact the run hands back, and every name and number inside those artifacts is made up.

09:00 on a Monday, already written

A cron trigger fires at 09:00 every Monday in the workspace's timezone, and the agent gathers the weekend's commits and the change requests still open into one page.

What the run handed backops/daily-digest.md
ChangeOwnerState
checkout-webcheckoutmerged
invoicing-apibillingin review
docs-sitecontentmerged
Three changes, one waiting on a person

A signed request becomes a triaged lead

A signed POST arrives at the trigger's URL, the trigger secret's signature check passes, and the agent writes the lead into the CRM through a connector, tagged with the form it came from.

What the run handed backcrm/acme-lead.md
FieldValue
CompanyAcme
Sourcesigned webhook
Ownerunassigned
Draft replywritten
Signature verified, one record added

The diff gets read before a person opens it

A new pull request in the code host sends a signed POST to the trigger, and the agent reads the diff, comments on the changed lines and holds the merge while a test fails.

What the run handed backreview/globex-214.diff
app/invoices/total.ts
if (total < 0) {
if (total <= 0) {
return reject("empty");
}
Two comments, one of them blocking

An App your team built sees it first

A watcher App your team deployed reads the queue depth and posts an App event with its own App token when it crosses a threshold, and the trigger picks that event up, so a queue that backs up arrives as a change request.

What the run handed backchecks/queue-depth.md
Pending jobs940
Alert threshold500
App events posted1
Change requests opened1
Nobody was paged at 02:40

What separates an autonomous agent demo from a run?

Microsoft calls autonomous AI agents "systems that can independently analyze situations, make decisions, and act". Its Copilot 101 page adds that they "don't just follow preset instructions" (Microsoft). Salesforce says autonomous agents "can execute on tasks and workflows independently" (Salesforce). Both sentences are true. Neither lets you picture what an agent does at 02:40 on a Wednesday with nobody awake.

The useful question is what you would actually let run. An example earns its place when it shows three things: what fired the run, what the run could touch, and what a person found waiting at the end. Follow one case the whole way, and you can check those three against your own work.

A pull request is enough to start a session

Take the review case, where nobody asks for anything. A pull request opens in the code host, and the host sends a signed POST to the trigger's address. That is the webhook case in the Kortix docs, filed under "Form tools, payment systems, code hosts". It starts a session with nobody at the keyboard.

The definition underneath it is short. "A trigger starts agent work with nobody at the keyboard. It has two parts: a source, which decides when it fires, and a target, which decides what a fire does." Nobody picked this up from a queue, and nobody pressed go.

The session gets a branch and a short list of tools

"Every session starts its own isolated cloud computer, called a sandbox. The agent works there on its own branch of the project's repository. By default, a session can push only to its own branch." Session work reaches main through a change request, and merge is default-deny for agents. Everything this run changes sits on that one ref, and the default branch stays as it was.

Tool calls are policy, written before the run. agents.<name>.permission gives every tool one of three answers: allow runs it, ask waits for a person, and deny never runs it. Connector actions have their own rules, Allow, Ask or Block, and a connector rule can match the arguments a call was given. A tool's own entry narrows a call by a glob on the command or path it names. That is how the review agent gets a read on the repository, the test command and a comment on the diff, and nothing near a merge. An omitted permission key is allow, so an agent that sets none already lets every tool call through; write allow, ask or deny deliberately, because the calls nobody narrowed are the ones nobody thought about. A run that does stop to ask waits at most 30 minutes, then stops. Write the list before the first Tuesday night. At 03:00 those rules stand in for the person who would otherwise have said no.

What lands is a change request

"When the agent finishes, it opens a change request: a request to merge that branch into the shared one." The grant that lifts the default has a name: project.gitops.merge. A person who holds it reads the change request on the Review page and merges it. A session merges its own only when its agent's kortix_permissions grant in kortix.yaml includes it.

The reviewer on the other end does not read a chat summary. They read a diff, the comment on the changed line, and the test that failed. Nothing the run produced is live until a merge. A rejection costs a minute, and the default branch loses nothing, because the work never left its branch.

The starter agent answers the question these examples raise. "The starter worker agent holds kortix_permissions: "*", so the API lets it merge its own change request." A team that wants a person on every merge takes the grant out of the manifest, and then the change request waits. Kortix is my pick for runs like these, and I work on Kortix's marketing, so weigh that accordingly.

The other three cases, read the same way

The four examples follow the same steps. Only the fire changes.

  • The digest starts on a schedule slot. "A 6-field cron expression, seconds first: "0 0 9 * * 1" is 09:00 every Monday. A trigger fires at most once every 60 seconds." The manifest entry is a handful of lines. The output is one page of state a person skims with coffee.
  • The intake starts on a signed POST. "A webhook also needs a signing secret, stored as a project secret." The manifest names that secret with on.webhook.secret, or secret_env in the flat form, and a name the workspace's env does not declare is a validation error. A request that arrives without the trigger secret's signature does not start the run, so a stranger who finds the URL gets no CRM record. The CRM connector signs in with a credential Kortix brokers: "Connector credentials are brokered server-side and never enter the machine."
  • The App event starts when a watcher App your team built posts an event with its own App token. The rule is blunt: "An App never starts an agent itself: it posts events, and a trigger decides." A trigger with on: { event, app } names the agent to run. A session opened this way is marked as automated, so the agent treats the payload as data rather than orders. A threshold crossing that used to wait for a dashboard refresh now arrives as a session, and that session opens a change request with the fix in it.

The made-up parts

The artifacts in the four examples are invented. Acme, Globex and the counts in them describe a shape, and the repositories do not exist. Everything around them is real behavior, quoted from the Kortix docs where it appears: the five sources of a trigger, the sandbox and its branch, the change request, the merge permission and the tool rules.

Three pages go further. Running an agent with nobody watching writes a trigger from an empty workspace and limits how often it fires. Autonomous vs human in the loop covers the three places a person can stand in a run like these. What autonomous AI agents are takes the vendor definitions apart.

What do readers still ask about these four runs?

A Monday morning page that gathers the weekend's commits and the change requests still open, a signed POST that becomes a CRM lead, a diff review that comments before anyone opens the pull request, and a watcher App whose event opens a fix. Each one starts on a trigger, with nobody present.

They read, write, run commands and open a change request inside the tools you allowed, on a schedule or an event, with nobody present. The work still arrives for review: what a run finishes alone is a change request, and a merge needs the project.gitops.merge permission.

A trigger fires: a schedule arrives, one of your own Apps reports an event, a connected app reports an event, a signed POST reaches the trigger's URL, or a change request merges. Each fire starts a new session on its own cloud computer, with the instruction filled in from the event's details.

A change request against the workspace's default branch. A person with the project.gitops.merge permission reviews and merges, unless the agent's grant in kortix.yaml includes it and the session merges its own. The digest case hands back one page of state; the App event case hands back a patch.

Start from a trigger you can read, and a merge you can stop

The setup path writes the trigger, human in the loop places the person, and the definition explains the three parts.