add a default archetype, preselected by the clients
This commit is contained in:
parent
a74d23d313
commit
8f7c45d40f
4 changed files with 253 additions and 47 deletions
|
|
@ -239,21 +239,23 @@ message box under her terminal. She is the manager agent: her MCP surface is the
|
|||
privileged one that configures agents, and she can recover the others. Changes to
|
||||
an agent's config arrive as PRs you merge. → [`2-handbook/agents/agent-permissions.md`](../2-handbook/agents/agent-permissions.md)
|
||||
|
||||
To create an agent yourself instead, use the swarm UI, or:
|
||||
To create an agent yourself instead, use the swarm UI, the optional last step of `swarmctl setup` (it asks whether the agent should be custom), or:
|
||||
|
||||
```bash
|
||||
swarmctl agent create <name> --hive firsthive
|
||||
```
|
||||
|
||||
The name is yours to choose; it has no meaning to the swarm. The controller provisions the agent's identity, forge user and config repo
|
||||
(`agent-configs/<name>`, from the default template), then has the hive build
|
||||
and start the container. The hive builds from a copy of hyperhive on the swarm's own forge: the
|
||||
The name is yours to choose; it has no meaning to the swarm. The controller provisions the agent's identity and forge user, then has the hive build
|
||||
and start the container. The swarm builds the agent from the `default` archetype, which has
|
||||
no config repo; pass `--custom` for a custom agent, whose repo
|
||||
(`agent-configs/<name>`) the controller seeds from the default template, or
|
||||
`--archetype <name>` for another archetype. The hive builds from a copy of hyperhive on the swarm's own forge: the
|
||||
controller mirrors it there as `hyperhive/hyperhive` on a fresh swarm, so the
|
||||
first agent needs no extra step (see
|
||||
[`nixos.md`](nixos.md#the-hyperhive-mirror)). It returns once the scheduler queues the job — watch the
|
||||
swarm UI's job view for progress.
|
||||
|
||||
Later config changes are PRs on `agent-configs/<name>`; you merge them on the
|
||||
Later config changes to a custom agent are PRs on `agent-configs/<name>`; you merge them on the
|
||||
forge, and the merge deploys them. →
|
||||
[`2-handbook/agents/persistence.md`](../2-handbook/agents/persistence.md#config-changes)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,9 +9,14 @@ change each field before you create the agent.
|
|||
An agent created from an archetype has no `agent-configs/<name>` repo of its
|
||||
own. The swarm's `internal/meta` flake builds it from the archetype's module,
|
||||
so every agent of that archetype runs the same configuration. To change what it runs, change the
|
||||
archetype. Picking "none" creates a custom agent, with its own config repo. The
|
||||
swarm can also turn an archetype agent into a custom one later
|
||||
([below](#turn-into-custom)).
|
||||
archetype. The create form opens on `default`, an archetype with the default
|
||||
config, so an agent that needs no config repo has none. Picking "none"
|
||||
creates a custom agent, with its own config repo. The swarm can also turn an
|
||||
archetype agent, `default` included, into a custom one later
|
||||
([below](#turn-into-custom)). The API stays as it was: a request with no
|
||||
`archetype` still creates a custom agent, and `swarmctl agent create` sends
|
||||
`default` unless you pass `--custom`. A swarm whose controller or builder
|
||||
lists no `default` opens the form on "none."
|
||||
|
||||
## The built-in archetypes
|
||||
|
||||
|
|
@ -19,6 +24,7 @@ The hyperhive flake ships these:
|
|||
|
||||
| archetype | what it sets |
|
||||
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `default` | the default config: its module is empty, so it builds what an unedited custom agent builds, and it holds the default permissions. It has no prompt, caps or inference settings. The create form preselects it. |
|
||||
| `reviewer` | permissions `messaging`, `inbox`, `execution`: the default set without `meta`. With `execution` it can run `hive-forge`, `git` and other commands. |
|
||||
| `android-dev` | installs `android-tools` (`adb`, `fastboot`), Gradle, a JDK, the Android SDK (build-tools 36.1.0, platform 35) and nix-ld, and sets `ANDROID_HOME`, `ANDROID_SDK_ROOT` and `JAVA_HOME`, so the `aapt2` Gradle downloads runs; default permissions. |
|
||||
| `reverse-engineer` | sets `services.hyperhive.agent.rea.enable`: installs REA, Ghidra 12.1 and procps, and allows all REA MCP tools; default permissions and the agent's normal memory cap. |
|
||||
|
|
@ -44,7 +50,7 @@ agent gets every new item, and two of them would both label and assign it.
|
|||
An existing ruth, created before this archetype, keeps her own config repo and
|
||||
model. Set `sonnet` in the swarm UI's inference settings for her if wanted.
|
||||
|
||||
Each built-in archetype also sets `services.hyperhive.agent.icon`, so its agents
|
||||
Each built-in archetype except `default` also sets `services.hyperhive.agent.icon`, so its agents
|
||||
show an icon in the swarm UI until their config sets another.
|
||||
|
||||
## Where an archetype comes from
|
||||
|
|
|
|||
|
|
@ -112,6 +112,12 @@ No approval gate guards this: the caller is root on the controller's host, or lo
|
|||
* `--hive <HIVE>` — Hive in this swarm to deploy the agent to.
|
||||
|
||||
Required, and deliberately not defaulted: it's an *address* — the hive that gets the deploy message — and only the operator knows which one they mean. The controller checks it against the swarm's hive roster and names the known hives if it misses.
|
||||
* `--archetype <NAME>` — Archetype of the `hyperhive` source to build the agent from.
|
||||
|
||||
`default` is the default config with no config repo; turn the agent into a custom one later when it needs a repo. The hive's `hyperhive` input must know the archetype, or the agent's build fails.
|
||||
|
||||
Default value: `default`
|
||||
* `--custom` — Create a custom agent: it gets an `agent-configs/<name>` repo and no archetype
|
||||
* `--agents-md <FILE>` — A text file the agent's `AGENTS.md` starts with.
|
||||
|
||||
The agent writes it on its first start, and only when it has no `AGENTS.md` yet: re-creating an agent never replaces an existing file. The controller refuses a file over 64 KiB.
|
||||
|
|
|
|||
|
|
@ -36,6 +36,12 @@ stored list and logs a warning on each pass. A swarm whose
|
|||
builder connects after the controller has no list until a retry succeeds. A swarm with no builder enabled shows no
|
||||
archetype select.
|
||||
|
||||
The create form preselects the `default` archetype once the list has loaded and
|
||||
lists it, then "none" (a custom agent), then the rest. A list without `default`,
|
||||
from a controller or builder that predates it, leaves "none" preselected. The
|
||||
server still reads no `archetype` in `POST /api/agents` as a custom
|
||||
agent, the only way the request says custom.
|
||||
|
||||
The stored value:
|
||||
|
||||
```json
|
||||
|
|
|
|||
Loading…
Reference in a new issue