Agenti

← All docs

Building your own agent

Draft help page. Shown to global admins in Settings → Agents.

The short version

The four steps

  1. Basics.
  2. Kind: Network recon or File analysis.
  3. Name: what people see, e.g. Web server check.
  4. Short name: filled in from the name as you type, e.g. web-server-check. It's used in commands and links and can't be changed later.
  5. What it does: one sentence.
  6. Programs. Tick the programs it may run. Search by name or purpose. A program that isn't installed on the server is greyed out and shows the sudo apt install … command. Only reviewed programs are listed. For network recon that is the baseline recon set and the program catalog (see below). For file analysis it is the short list a developer has written option rules for (tshark, capinfos, suricata); the catalog doesn't apply to it.
  7. Instructions. This is the agent's system prompt: what it's for, the steps, what to produce, and what it must not do. A template is filled in from your earlier answers. Replace the line <describe the job, step by step> with the real steps.
  8. Review. Check the summary, then press Build agent and confirm with your password and 2FA code.

What a built agent can and can't do

It can It can't
Run the programs you ticked, one command at a time, against a target inside the scope Run any other program, a shell, or an interpreter
Save raw output and read it back Chain commands, redirect output or substitute commands (always refused)
Ask the operator a question, message a team Widen its own scope, programs or limits

Scope, approval and the model/caps limits come from the organisation's engagement and policy, exactly as for Network enumeration. Nothing typed into the builder can change them.

Changing a built agent

Removing a built agent

Press Remove on its card. You'll be shown what will be deleted, then asked to type DELETE and confirm with your password and 2FA code.

The program catalog

The list of programs comes from the program catalog, which an admin keeps in Controls → Edit this agent's tool allow-list (the same catalog serves every agent).

From a terminal

sudo agenti admin agent-build tools               # the programs on offer
sudo agenti admin agent-build check  < spec.json  # validate without building
sudo agenti admin agent-build create < spec.json  # build it
sudo agenti admin agent-build preview <name>      # what removing would delete
sudo agenti admin agent-build remove  <name>      # asks you to type the name

spec.json looks like:

{"kind": "recon", "name": "web-server-check", "title": "Web server check",
 "description": "Looks at a web server's headers and open ports.",
 "programs": ["nmap", "curl", "whatweb"],
 "system_prompt": "You are Web server check. ..."}

For a file-analysis agent use "kind": "analysis" and "programs": ["tshark", "capinfos", "suricata"]; leave "kind" out and it is a recon agent.

Messages you may see

Message What it means
An agent called "x" already exists Pick another short name.
'x' is reserved The CLI or web address already uses that word. Pick another.
'x' is not a program a built agent may run It isn't in the baseline list or the catalog. An admin can add it to the catalog if it isn't blocked.
'x' is not a program a file-analysis agent may run File analysis only offers programs with reviewed option rules. A developer adds one in shared/analysis_programs.py.
its kind cannot be changed A recon agent can't become a file-analysis agent or the reverse. Build a new one.
'x' is not installed on this server Run the sudo apt install x command shown, or leave it out.
Can't remove it yet: it is running in … Stop those runs first.
…these teams list it as a member Remove it from those teams first.
'enum' was not built in Settings → Agents Hand-built agents can't be removed here.

Writing an agent in code

If you need something a program list can't express (a different scope kind, a custom tool, a protocol client), write a hand-built agent. agenti new <name> scaffolds one; see docs/contributing-agents.md.