Skip to content

af kind

Read the organization's agent kinds

An agent kind is an organization record that says what an agent started as it is: the program it runs, its instructions, the most roles and folders it may have, the models it may call and how long it may live. The forge ships none; an administrator asks for each.

Usage

af kind [OPTIONS] <COMMAND>

Commands

Command What it does
list List the organization’s agent kinds
show Show a kind: its current version, or one you name, and the versions it has had
text Print the instructions of a kind’s version
agents List the live agents started as a kind
request Ask for a kind to be made or changed
request-text Print the instructions that wait on an open request
retire Ask for no new agent to be started as a kind
restore Ask for a retired kind to start agents again
withdraw Withdraw an open request

Global options

Every af command also takes the global options.

Examples

af kind list
af kind show coder
af kind text coder

af kind list

List the organization’s agent kinds

Each kind is shown as its current version: its number, whether new agents may be started as it, and what it is for. Kinds that are retired are left out unless asked for.

Usage

af kind list [OPTIONS]

Options

  • --retired

    Show the kinds that are retired too

Global options

Every af command also takes the global options.

Examples

af kind list
af kind list --retired

af kind show

Show a kind: its current version, or one you name, and the versions it has had

A kind is a series of immutable versions, each a record the forge signed. What is shown is that record: the program an agent of it runs, the roles, folders and models it may have, how long it may live, and the digest of its instructions (af kind text prints them).

Usage

af kind show [OPTIONS] <NAME>

Arguments

  • <NAME>

    The kind’s name

Options

  • --version <VERSION>

    A version other than the current one, by number

Global options

Every af command also takes the global options.

Examples

af kind show coder
af kind show coder --version 2

af kind text

Print the instructions of a kind’s version

The text an agent of the kind starts with, exactly as the organization approved it. You may read it if you are an administrator or may read every folder the kind names; a kind born of the forge is read by administrators only.

Usage

af kind text [OPTIONS] <NAME>

Arguments

  • <NAME>

    The kind’s name

Options

  • --version <VERSION>

    A version other than the current one, by number

Global options

Every af command also takes the global options.

Examples

af kind text coder
af kind text coder --version 1

af kind agents

List the live agents started as a kind

Who runs a kind, retired or not: every version of the kind named, or every kind if none is. Requires an administrator. An agent is live until it expires or is stopped. The list is in the order of their kind’s version and then their own id; if there are more than --limit, the last line gives the command that goes on.

Usage

af kind agents [OPTIONS] [NAME]

Arguments

  • [NAME]

    The kind’s name; every kind if left out

Options

  • --limit <LIMIT>

    How many to list at most, from 1

    Default: 100

  • --after <AFTER>

    Where to go on from, as an earlier call’s last line gave it

Global options

Every af command also takes the global options.

Examples

af kind agents coder
af kind agents
af kind agents coder --limit 20

af kind request

Ask for a kind to be made or changed

A request is a whole new version of the kind, and what you leave out is kept from its current version: af kind request coder --lifetime 2h changes the life and nothing else. A new kind needs –purpose, –program, –instructions, –role and, if it is born of a line, –lifetime. Lists are one flag with values separated by commas, and an empty value means none. The instructions are read from a file, or from standard input with -: no one edits a file the forge reads. The request takes effect at once on an administrator’s word unless the forge requires a second one, who reads the text with af kind request-text before af approve.

Usage

af kind request [OPTIONS] <NAME>

Arguments

  • <NAME>

    The kind’s name: 1 to 64 of a-z, 0-9, ., _ and -

Options

  • --purpose <PURPOSE>

    What the kind is for, in one line

  • --born-of <BORN_OF>

    Who may start an agent of it: line (a person’s or an agent’s birth) or forge

  • --program <PROGRAM>

    The program an agent of it runs, which a birth must report

  • --model <MODELS>

    The models it may call, by id, from af model list; comma-separated, empty for none

  • --instructions <INSTRUCTIONS>

    A file with its instructions, or - for standard input: at most 256 KiB of UTF-8

  • --role <ROLES>

    The most roles an agent of it may hold: reader, writer, and for a kind born of the forge approver

  • --folder <FOLDERS>

    The folders it may read and write in, comma-separated: an empty value is the whole repository

  • --class <CLASSES>

    The data classes it may hold, comma-separated, empty for none

  • --act <ACTS>

    What it may do beyond its roles: review, find, requestDeploy or coordinate (starting agents); comma-separated, empty for none

  • --lifetime <LIFETIME>

    How long an agent of it may live: 90s, 30m, 2h, 1d or none

  • --budget-tokens <BUDGET_TOKENS>

    The most tokens an agent of it may spend, or none

  • --budget-cost-micros <BUDGET_COST_MICROS>

    The most cost, in millionths of a currency unit, or none

  • --budget-runner-seconds <BUDGET_RUNNER_SECONDS>

    The most runner seconds, or none

  • --egress <EGRESS>

    The exact host names it may reach, lower case without a port, comma-separated, empty for none

  • --permissions <PERMISSIONS>

    A file with its permission rules as a JSON list, or - for standard input. They say how the agent runner answers a harness’s requests for leave to act, the first rule that matches deciding: at most 32 rules and 16 KiB in all. [] takes them all away

  • --base <BASE>

    The version this changes, if not the current one; refused if it is not current when the request is approved

  • --reason <REASON>

    Reason for the request, recorded with it

    Default: ""

Global options

Every af command also takes the global options.

Examples

af kind request coder --purpose "fixes builds" --program harness --role reader,writer --folder compiler --lifetime 2h --instructions coder.md
af kind request coder --lifetime 4h
af kind request coder --permissions rules.json
af kind request reviewer --born-of forge --purpose "reviews changes" --program reviewer --role reader,approver --folder '' --act review --instructions - < reviewer.md

af kind request-text

Print the instructions that wait on an open request

The text of a request for a kind, as an administrator reads it before approving: it is kept with the request until it is approved or withdrawn. Requires an administrator.

Usage

af kind request-text [OPTIONS] <ID>

Arguments

  • <ID>

    Request ID, in hex, as af requests lists it

Global options

Every af command also takes the global options.

Examples

af kind request-text 335cb6cd61c6ddd5ac629b25c94218ce2933393e767322f59ec71f0cfd431ced

af kind retire

Ask for no new agent to be started as a kind

Asks for a new version of the kind that is retired and otherwise as it is. Agents already started as it live until they expire or are stopped; af kind agents lists them.

Usage

af kind retire [OPTIONS] <NAME>

Arguments

  • <NAME>

    The kind’s name

Options

  • --reason <REASON>

    Reason for the request, recorded with it

    Default: ""

Global options

Every af command also takes the global options.

Examples

af kind retire coder --reason "replaced by coder2"

af kind restore

Ask for a retired kind to start agents again

Asks for a new version of the kind that is not retired and otherwise as it is, checked in full: the models it names must be active again.

Usage

af kind restore [OPTIONS] <NAME>

Arguments

  • <NAME>

    The kind’s name

Options

  • --reason <REASON>

    Reason for the request, recorded with it

    Default: ""

Global options

Every af command also takes the global options.

Examples

af kind restore coder

af kind withdraw

Withdraw an open request

Closes a request that no one has approved, and drops the text that waits on it. You may withdraw your own; an administrator may withdraw any. It works for a request of any kind.

Usage

af kind withdraw [OPTIONS] <ID>

Arguments

  • <ID>

    Request ID, in hex, as af requests lists it

Global options

Every af command also takes the global options.

Examples

af kind withdraw 335cb6cd61c6ddd5ac629b25c94218ce2933393e767322f59ec71f0cfd431ced

Type to search…

↑↓ navigate↵ selectEsc close