Kortix system

From kortix-ai/CompanyOS · View interactive version

Kortix system is an AI agent skill from the GitHub repository kortix-ai/CompanyOS. How Kortix works and how to change a Kortix workspace from a session: land work through a change request, drive Kortix with the in-sandbox `kortix` CLI, keep files where they last, store or request credentials, schedule work, know the computer a session runs on (its own microVM, its desktop, what la

How to use this skill

Skill file

<skill name="kortix-system">

<live-skills>

Skills, served live

Your system prompt lists every skill your agent may load, with its path. Read

a skill's SKILL.md with read before you work on its topic. Paths inside a

skill are relative to its folder.

The Kortix skills (kortix-*) come from the deployed platform, not from the

repository, and update in a running session. Never edit or commit a copy.

For one your list lacks, or outside a session:

one SKILL.md and its reference paths; … file <name> <path> one reference.

A flag-gated skill exists only while its flag is on.

</live-skills>

<overview>

The model

hosts it, or the workspace connects one on GitHub.

$KORTIX_BRANCH_NAME. Sessions run in parallel and share no sandbox.

permission rules, and the things it may use.

sessions only when its change request merges.

your agent's workspace.repos declares a clone (your prompt then names it

and its setup progress). Otherwise kortix workspaces clone clones the

repository onto your session branch. Send the change with kortix cr.

workspace.gitops.read in your agent's kortix_permissions.

</overview>

<machine>

Your computer and where files last

Your session runs on its own microVM: a whole Linux computer, root through

sudo. /MACHINE.md lists its tools and explains its desktop.

To keep a package for every session, add it to a sandbox template

(references/kortix/kortix-yaml.md → sandbox) and install it now too.

your screen, which the user watches in the Desktop panel, or on their own

computer. The kortix-computer skill decides which (<which-desktop>).

Keep big files out of Git: every clone downloads the whole repository.

kortix validate warns at 10 MiB per file and at 512 MiB in total; above

512 MiB compressed, running sessions stop picking up config changes. Put

media and datasets in object storage; add build output to .gitignore.

</machine>

<change-requests>

Land work through a change request

A commit that stays on your session branch reaches no other session. A

change request (CR) is the only way to the default branch. Do every step:

  1. Work in your clone (<overview>): cd into it and run every step there.
  2. Sync: git fetch origin && git rebase origin/main (main or the default

branch kortix workspaces info names). Resolve conflicts now.

  1. Commit small, working commits. Run kortix validate after a kortix.yaml

change. Keep big files out of Git (<machine>).

  1. Push: git push origin HEAD. Rejected because the remote branch moved?

git fetch origin && git push --force-with-lease origin HEAD. Force only

your own session branch.

  1. Open: `kortix cr open --title "<imperative summary>" --description "<what,

why, how you tested, risks>". It takes $KORTIX_BRANCH_NAME` as the head.

422 CR_HEAD_NOT_AHEAD means the push did not land: push, then retry.

  1. Check: kortix cr diff <n> shows your diff. Empty: push again and check

the same CR. Never open a second CR for the same work.

  1. Share the CR number, title and URL from cr open or cr show <n> --json.

Copy the URL; never infer it from an API path. The web reply shows Review.

Name kortix cr merge <n> only to a CLI or channel user.

  1. Wait. Merge your own CR only when the user asks. The API refuses a

self-merge (403 CR_SELF_MERGE_REFUSED) unless your agent holds

workspace.gitops.merge.

(workspace.gitops.ref.any): the push skips review.

out of the sandbox.

workspace.agent.write, connectors and policy_sets workspace.connector.write, triggers

workspace.trigger.*, apps, skills, sandbox, project theirs. 503 CR_GOVERNANCE_UNVERIFIED: retry.

For people: https://kortix.com/docs/developers#change-requests

</change-requests>

<cli>

The `kortix` CLI in the sandbox

kortix is on $PATH and signed in: $KORTIX_TOKEN is this session's

workspace-scoped token, $KORTIX_API_URL its API. Use it for Kortix cloud

state. Use git and the file tools for files and commits.

to stderr. Mutations take flags and never prompt.

you guess a flag.

ls answers 403). kortix whoami --token-only` prints your agent's grant.

people: https://kortix.com/docs/developers#cli

| Task | Command |

| --- | --- |

| What every session does, talk to one | kortix sessions status, sessions log <id> (read-only), sessions chat <id> --prompt "…" |

| Hand a task to another agent | The agent tool (default session: "separate": its own session). From a session a person started it runs in the background: the report arrives later as a message. Deeper, one call waits up to 30 min. A follow-up goes to the same agent: send_message to its name, or agent with its task_id or name; a new agent only for separate parallel work. Not sessions new + wait-for |

| Tell another session something; a team's task list | send_message (list_agents lists who you can reach), task_create/task_list/task_update (flag agent_teams; a teammate starts with agent({ name, team: true }), its role is for its session only); from a shell kortix sessions message <to> "…", sessions reachable, sessions inbound <id> accept\|hold\|refuse, kortix tasks ls\|add\|claim\|done |

| Change requests, the review inbox | kortix cr ls\|show\|diff\|merge-preview, kortix review ls; My Kortix: the kortix_change_requests tool |

| Triggers; loops on this session (<scheduling>) | kortix triggers ls\|info\|fire\|add\|set\|enable\|disable; kortix loop "…" --in 24h, kortix loops ls\|pause\|resume\|rm |

| Secrets | kortix secrets ls\|set\|request\|sync |

| Connectors and accounts | kortix connectors … (the kortix-connectors skill) |

| Apps: sites, servers, backends | kortix apps … (the kortix-apps skill) |

| Drive files and sharing | kortix drive … (the kortix-drives skill) |

| Connect Slack or Teams | kortix channels connect (the kortix-slack skill) |

| Agents and models | kortix agents ls\|default\|config\|scope, kortix models ls\|default <model-id> |

| Tools, feature flags | kortix tools ls\|eject <name>, kortix workspaces features [enable <flag>] |

| The manifest | kortix validate [--scopes], kortix schema |

| Score an agent on tasks (flag evals, <evals>) | kortix evals datasets\|tasks\|run\|jobs\|show\|compare\|rerun\|judge |

| Kortix itself is broken, confusing or missing something | kortix feedback "<what happened, what you expected>" --kind bug\|friction\|idea: it reaches the Kortix team with this session's id. File it when it happens, once per problem, then continue with a workaround |

</cli>

<credentials>

Credentials: never send the user to a settings page

  1. Read $KORTIX_SECRET_CAPABILITIES first: a JSON list of the secrets this

session may use, without values. Each entry's delivery:

write it to a file, and never copy it into code or kortix.yaml.

puts in the value outside the sandbox, only on the listed hosts, over

HTTPS. [REDACTED] in a response means it worked. Experimental.

in the sandbox.

  1. The user gave you a value (chat, a file): store it in the same turn,

value on stdin: printf '%s' "$VALUE" | kortix secrets set NAME=-

(--scope connector for a connector's key). 403: go to step 3.

  1. You lack the value: mint a link, put the URL in your reply, end the turn.

A key your code reads: kortix secrets request NAME (--scope connector

keeps a connector's key out of the sandbox). An app account:

kortix connectors connect <slug> --label "<name>" (--owner project for

a shared company account). Never ask for a key in chat.

Slack is a channel, not a secret: kortix channels connect prints its

install link. Owners, accounts, not granted, undecryptable:

references/kortix/credentials-and-setup-links.md.

</credentials>

<scheduling>

Follow through: never wait blind

After any action whose result comes later (a message sent, an order or form

submitted, a CR opened, a deploy started, a question to a person, a page to

watch), set up this session's wake-up before you end the turn. Nobody asks.

| You are now waiting on | Wake this session with |

| --- | --- |

| A reply to an email or message | A loop. Also a connector event when that app is connected (flag event_triggers): kortix triggers add "…" --on event --connector <slug> --event <TYPE> (types: kortix triggers events --connector <slug>) |

| A change request | kortix triggers add "…" --on cr-merged --cr <id> |

| A deploy, a CI run, a job | kortix triggers add "…" --on webhook --secret-env <NAME> when it can call a URL, else kortix loop "…" --every 15m |

| A person's answer | kortix loop "…" --in 4h --every 6h |

| A page, a status or a price that changes on its own ("tell me whenever …") | A watcher App that posts App events, then kortix triggers add "…" --on app --app <slug>: no model runs until it changes (references/scheduling.md → Watch 24/7). A loop only for a wait that ends within a day |

| A hand-off, a teammate, a workflow | Nothing: it reports back by itself |

to check, what to do on each outcome, the end date (default 14 days). Tell

the person in one line when you check and until when.

the loop with a slower one. Done or past the end date: kortix loops rm

and kortix triggers rm every one. Playbook: references/scheduling.md.

set the wake-ups, keep the state in out/status.md, set Kortix up when the

work repeats, close out: references/scheduling.md → Long jobs.

| Workspace work | A kortix.yaml trigger (fields: references/kortix/kortix-yaml.md) |

| --- | --- |

| Recurring (a daily digest), or one-off | on: { cron: "0 0 9 * * 1-5", timezone: <IANA> }, on: { every: 1h }, on: { at: <ISO-8601> } |

| Workspace code on a cadence, no agent | run: { app: <slug>, path: /tick } |

| A system that can call a URL, or a watcher App | on: { webhook: { secret: <SECRET_NAME> } }, on: { event, app } |

model turn. 403 feature_disabled: Loops are off. Tell the user

(kortix workspaces features enable reminders). Meanwhile, an at trigger

starts a fresh session at the time: put the full context in its prompt.

after its CR merges, or at once with --apply (through the API, gated by

your kortix_permissions). Then kortix triggers fire <slug> once.

</scheduling>

<evals>

Measure an agent before you change it

A change to an agent's prompt, skills, tools or model is a guess until a score

says otherwise. With the evals flag on, load the kortix-evals skill first:

score a baseline, make one change, score again (kortix evals compare). Keep

the change only when more tasks pass and none gets worse; say the score in the

CR. Two models or prompts compare the same way. People see jobs in Customize →

Evals. Flag off: say Evals exists behind it and offer to turn it on; do not

build a scoring system of your own.

</evals>

<runtime>

The session runtime: pi

Every session runs pi inside the Kortix daemon. Every model call goes through

the Kortix LLM gateway. pi has:

show (memory is retired: use the file tools); workspace tools; codemode.

pi does not have rewind or edit-and-resend (501 feature_not_supported),

MCP servers (use connectors), a todo list, shell turns, session fork, or an

attachable terminal client. No webfetch: use scrape_webpage. Its

capabilities include session.subagents, session.compact,

session.commands, session.steer, session.messaging, session.team_tasks. Say plainly what is missing.

pi puts the root AGENTS.md (else CLAUDE.md) in every system prompt. It

reads that file, agents, skills, tools and commands from the default

branch's config release: a change takes effect after its CR merges, in

running sessions too. Extensions and codemode load at runtime start.

Tools, permissions, extensions: references/pi.md.

</runtime>

<manifest>

kortix.yaml

One format, no version line. Declare everything in kortix.yaml (or

kortix.yml) and the files it names. The workspace registers things by name;

each agent enables what it uses. Unknown keys are errors.

# yaml-language-server: $schema=https://kortix.com/schema/kortix.schema.json
default_agent: kortix
env: { optional: [ORDERS_API_KEY] }       # secret names; values live in Kortix
skills: { triage: skills/triage }         # folder that holds triage/SKILL.md
tools: { lookup_order: tools/lookup_order.ts }
commands:
  standup: { description: Post the standup summary., prompt_file: commands/standup.md }
extensions: { audit: { pi: extensions/audit.ts } }   # or "npm:<package>@1.2.3"
agents:
  kortix:
    description: Front-door agent.
    mode: primary                         # primary | subagent | all
    prompt_file: agents/kortix.md         # or prompt: "…"
    permission: { bash: { "git push --force *": ask, "*": allow } }
    tools: "*"                            # "*" is every name; `all` is the same
    skills: "*"                           # omitted = none, Kortix skills too
    subagents: [researcher]
    commands: [standup]
    extensions: [audit]
    connectors: "*"
    secrets: [ORDERS_API_KEY]
    kortix_permissions: [workspace.read, workspace.gitops.read, workspace.gitops.push]
  researcher:
    mode: subagent
    prompt: Research the question. Cite every source.
    tools: [read, grep, web_search, scrape_webpage]
    skills: [kortix-system, triage]
triggers:
  - slug: daily-digest
    on: { cron: "0 0 9 * * 1-5", timezone: Europe/Berlin }
    run: { agent: kortix, prompt: "Summarize yesterday's merged change requests." }

No agent named runs default_agent (may be mykortix when on), else My Kortix when on.

skill, kortix-system included. skills and extensions also take

{ exclude: [names] }: every one but those.

declared agents with mode: subagent or all.

[names] }. Omitted, the agent gets every tool and kortix validate` warns.

A tools: registry entry with a Kortix tool's name replaces that tool.

longest matching pattern wins. Omitted: allow.

kortix validate --scopes lists the values. You grant only what you hold.

kortix-*; frontmatter name and a quoted description that says when

to load it. Register it, grant it, land it through a CR.

<file>:<line>:<col> and the fix. kortix schema prints the full schema.

broken part (references/kortix/kortix-yaml.md → Problems).

them through a CR when asked. kortix validate --fix rewrites every

deprecated shape, and converts an older format (fix: legacy-format).

Keep every file that conversion writes or deletes.

Keys, imports:, sandbox templates, triggers: references/kortix/kortix-yaml.md.

Tools: references/kortix/tools.md. People: https://kortix.com/docs/developers#kortixyaml-reference

</manifest>

Model switches, agent-pin permissions and precedence: references/session-model.md.

</skill>

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.