Workflow

Describe the outcome you want. Then read each request in the dashboard and approve or decline it, until the work is done.

The overview said the agent proposes each command and a person approves or declines it. This page shows what that looks like at the administrator’s desk, through a series of typical tasks: setting Wingman up, starting the first session, checking a server for pending security updates, planning a larger change in the admin wiki, running a command that takes minutes, using a stored password, keeping master data current, and teaching the dashboard which commands no longer need a card. Each task shows what the administrator types, what the agent does, and what the dashboard shows. The scheduled checks have a page of their own, the Sentinel workflow.

Setting up

Wingman builds on secdev: the agent runs in the secdev sandbox, using the wingman image, which here routes every model request to the institute’s own GPUs, and Wingman adds the service that the agent reaches from inside that sandbox. Setup therefore assumes a working secdev installation on the administrator’s workstation, as the secdev workflow describes, and adds the Wingman side to it once.

  1. Install Wingman and initialise it

    Wingman is a Python program installed as a command-line tool. Its init command writes a configuration directory and points it at the administrator’s existing SSH key, the private half of a key pair. Wingman assumes that every server it will administer already trusts that key, so that the administrator can log into each of them without a password today; Wingman adds no access and distributes no key, it only uses the one the administrator has. The following commands clone the repository, install the tool with the Python installer uv, and initialise it:

    git clone https://github.tik.uni-stuttgart.de/ac114192/itp3wingman
    cd itp3wingman
    uv tool install .
    itp3wingman init --identity-file ~/.ssh/id_ed25519
    itp3wingman check-config
    

    The check-config step refuses an encrypted key (Wingman cannot prompt for a passphrase) and refuses configuration files that other users can read.

    init also prints the configuration block that secdev needs in the next step, with the paths of the socket (a local file through which the agent talks to Wingman), a token and a signing key.

  2. Wire secdev to the service

    The agent reaches Wingman only because secdev is told where the service is. One section in the secdev configuration file does that, with the paths that init printed:

    # ~/.config/secdev/config.toml
    [runtime.wingman]
    socket = "/run/user/1000/itp3wingman/mcp.sock"
    token_file = "~/.config/itp3wingman/mcp-token"
    workspace_signing_key_file = "~/.config/itp3wingman/workspace-key"
    system_prompt_file = "~/.config/itp3wingman/wingman-system-prompt.md"
    completion_wake = true
    

    The socket is the local channel to Wingman, the token proves to Wingman that the caller is this secdev, and the signing key binds the agent’s file transfers and history searches to its own project folder (the workspace). The system prompt file carries Wingman’s instructions for the agent, so that OpenCode, the coding agent used here, starts with a wingman profile. The last line lets secdev wake the agent when a long-running command finishes, and deliver the Sentinel issues the administrator hands to it. The Technical Details page explains each of these.

  3. Describe the machines

    Wingman only ever talks to a server that appears in its master data: a YAML file listing each host by a short name, with its address, login user and whatever notes help an agent reason about it. Nothing that is not in this file is a valid target — a host name the agent invents is refused before any network activity.

    version: 1
    hosts:
      storage-01:
        address: storage-01.example.invalid
        user: admin
        icon: storage
        tags: [storage, backup]
        metadata:
          role: file server
          os: Debian 13
          expected_services: [ssh, nfs, smb]
    networks:
      institute: "the management network, see firewall notes"
    

    Everything outside hosts is free-form reference material for the agent: networks, name servers, contacts, firewall notes. Secrets never go here; the agent reads this file.

    The file is a starting point, not a burden to keep by hand. The agent has tools of its own for proposing a change to the file: one to add an entry, one to modify a value and one to remove an entry. When the agent notices on a host that the record is wrong or incomplete — a newer operating system, a service that is no longer there, a disk that was added — it calls one of those tools, and the proposal opens a card in the dashboard like any other request. Nothing changes in the file until the administrator approves the card, so the master data evolves with the machines under the same control as the commands; the section on keeping master data current shows an example.

  4. Store the passwords

    Root commands need each server’s sudo password, and some services need an account password of their own, such as a database superuser’s. The dashboard’s Secrets page keeps both kinds in Wingman’s vault, an encrypted file that only the dashboard opens: the administrator chooses a passphrase once, then adds each password. A sudo password is stored with the servers that use it, and one entry can cover a whole group, such as all compute nodes. The overview of the Secrets page counts the entries and names any server that has no sudo password yet:

    The Overview tab of the Secrets page: the password vault, unlocked, with Lock now and Change passphrase; buttons Add password and Add sudo password; and tiles counting three stored passwords for five hosts, three sudo passwords covering ten of ten hosts, and no host without a sudo password. (enlarge)
    The vault holds both the service passwords and the sudo passwords. The agent never sees a sudo password.

    After every restart of the service the vault is locked, and the administrator unlocks it here with the passphrase.

  5. Add the risk model

    Before the service starts for the first time, install the model that rates every waiting command for the administrator: a small open classifier for shell commands, LANCET Nano [1], that runs on the workstation without a network connection. One command installs the model and one setting switches the risk mark on:

    itp3wingman install-model
    # then set assessment.enabled: true in Wingman's own config.yaml
    

    The service log later reports Risk assessment ready once the model has loaded. From then on every card that waits for a decision carries a risk mark: the model reads the command text and rates how destructive the command could be, green for one that only reads, orange for one worth a closer look, red for one that could delete data or break a system. The mark makes no decision. It tells the administrator where to look twice; approving or declining remains the administrator’s choice on every card, and a green mark approves nothing.

  6. Install the service

    Wingman runs as a user service, a background program that starts with the administrator’s login session. The repository ships the unit file, the description that systemd, the Linux service manager, uses to run it; the following commands install it and start the service now and at every login:

    mkdir -p ~/.config/systemd/user
    cp systemd/itp3wingman.service ~/.config/systemd/user/
    systemctl --user daemon-reload
    systemctl --user enable --now itp3wingman.service
    

    The dashboard is reachable only from a browser on the same machine, at http://127.0.0.1:9402 by default. A shell alias opens it in the browser’s app mode, a window without tabs or address bar, detached from the terminal:

    # in ~/.bashrc, for the default port
    alias wingman='setsid -f chromium --app=http://127.0.0.1:9402 \
      >/dev/null 2>&1'
    
  7. Update

    An update reinstalls the tool from the repository, restarts the service and replaces the agent’s instructions with the new version’s:

    git pull
    uv tool install --force --reinstall --no-cache .
    systemctl --user restart itp3wingman.service
    itp3wingman update-prompts
    

    update-prompts keeps an edited prompt beside the new one, so local changes can be carried over by hand.

Starting the first session

Setup is done once; a working session starts with three applications side by side on the workstation. The first is the dashboard in a browser, where the administrator decides. The second is the agent in a secdev sandbox, where the requests come from. The third is Obsidian, a Markdown editor, in which the administrator reads the admin wiki that the agent writes. The service itself needs no start, since it has been running since login.

  1. Open the dashboard

    Open the dashboard with the alias from setup and keep the window beside the terminal:

    wingman
    

    Right after the first start the dashboard is empty, since no agent has asked for anything yet:

    The Wingman dashboard right after the first start: the Approvals page with its empty sections Pending, Queued, Running and Sudo cache, the keyboard legend and an Issues button at the top right, the page bar with Approvals, Master Data, History, Allowlist, Secrets and Sentinel, a Legend link and four status symbols in the header. (enlarge)
    The dashboard right after the first start. The Approvals page lists what waits for a decision, nothing yet; the other pages are a click away in the bar at the top.

    The bar at the top of the dashboard has six pages:

    • Approvals shows every request that waits for a decision, with the running and queued requests below it. Nearly all of a session happens here.
    • Master Data shows the hosts and the reference material the agent reads, as filterable lists.
    • History records every request and its ending, with secrets removed.
    • Allowlist lists the programs that may run without asking, both the configured rules and the ones the administrator allowed for good from a card, each with a Revoke button.
    • Secrets holds the stored service passwords and the sudo passwords that the section on using a stored password describes.
    • Sentinel shows the scheduled checks and the issues they found, described on the Sentinel workflow page.

    Four symbols at the top right show whether the service runs, the vault is unlocked, Sentinel is active and work is in progress, and the Legend link explains every colour and symbol. A waiting request shows as an orange count next to Approvals on every page.

  2. Enter the sandbox

    The agent runs in the secdev sandbox, using the wingman image, which here routes the model requests to the institute’s own GPUs. Start the sandbox in an empty project folder — that folder becomes the workspace, the only place on the administrator’s machine the agent can read or write files:

    mkdir -p ~/admin ~/admin-skills && cd ~/admin
    secdev wingman --skills ~/admin-skills
    

    The second directory holds the administrator’s own skills, the written procedures for this institute’s servers, which secdev mounts read-only into every session so they are available alongside the bundled ones. The command opens a shell inside the container, where the next two steps run.

  3. Set up the admin wiki

    Once per workspace, one command inside the container sets up the admin wiki: a folder wiki/ with pages for hosts, services, runbooks and plans. The agent reads the pages before it works on a server, keeps them up to date afterwards, and writes its plans for larger changes there:

    scaffold init admin-wiki
    

    The administrator opens the workspace folder in Obsidian as a vault, in a theme that matches the dashboard. The section on planning a larger change shows what the wiki is for.

  4. Start the agent

    Inside the container, one command starts OpenCode, the coding agent used here, in unattended mode:

    opencoded
    

    OpenCode starts with the wingman profile pre-selected that already carries Wingman’s instructions and its tools. The d suffix starts the unattended mode the secdev workflow introduced, in which the agent does not stop to ask inside the sandbox, because every consequential step is approved in the dashboard anyway.

    Before giving the agent its first task, check that the agent can reach Wingman. OpenCode’s footer counts the connected MCP servers, and the /status command names them; the entry wingman must read Connected. Without that connection the agent has no tools for the servers and can only talk. The following screenshot shows a fresh session with the check done:

    A fresh OpenCode session in a dark terminal: the status dialog lists one MCP server, wingman, as Connected, and one plugin, opencode-wingman-wake. Behind the dialog the prompt shows the Wingman agent and a local model; the footer shows the admin workspace and one MCP server. (enlarge)
    A fresh agent session. The status dialog confirms that the Wingman tools are connected, and the prompt shows the Wingman agent with a local model.

Doing a task

With Wingman running, a task is a conversation with the agent and a series of decisions in the dashboard. The running example is a check for pending security updates on a storage server.

  1. Ask for an outcome, not a command

    Describe the goal, not the commands, as in this prompt:

    Prompt to the agent:

    Check whether the storage server has pending security updates and report.

    The agent first looks the host up in master data, because that is where valid names come from. Then it composes the commands it needs and submits each one with a one-line reason.

  2. Read the request in the dashboard

    A card appears on the Approvals page. It shows, from top to bottom, a row of badges (the host with its icon, whether root is requested, and the classification explained under Under the hood below), the agent’s reason, the exact command, a Check box with the programs the command runs and the Command risk bar when the risk model is installed, and Your decision with the buttons. For this task the first request is a package index refresh that needs root, and the following screenshot shows its card:

    A pending approval card for storage-01, tagged ROOT, EXEC/UNKNOWN and EXEC: the agent's reason to refresh the package index, the command apt-get update -q, a Check box with the executable apt-get and a command risk of 9 % not flagged, and Your decision with Use stored sudo password ticked and the buttons Allow once, Allow commands forever and Reject. (enlarge)
    One card shows the target, privilege, command, classification and reason before approval.

    The risk bar gives the model’s verdict in colour: not flagged is green, review orange, and risky red and blinking. The risk model rates apt-get update -q at 9 % and leaves it unflagged. To give a feeling for the scale, two commands that could have been requested instead: the model rates systemctl stop postgresql 33 % review and rm -rf /var/lib/postgresql 99 % risky. The verdict is a hint for the person reading the card. It never approves or refuses anything.

    Because the command needs root, the card needs the server’s sudo password. The vault holds it, so the card shows Use stored sudo password, already ticked, and Wingman supplies the password to sudo over the SSH connection it opens for the approved command; the agent never sees it. For a server without a stored password the card asks for it instead, and Wingman keeps a typed password in memory only, for one hour by default, unless the administrator ticks Save in the vault.

    The three buttons at the bottom of the card are the decision. Allow once runs this request and nothing else. Allow commands forever runs it and also remembers every program the command calls, so that later commands made of those programs run without a card; the section on the learned allow list explains what that permission covers. Reject declines, with an optional note to the agent. Each button names its key, and the legend at the top of the page lists the keys that move between cards and pages, so nothing needs the mouse.

  3. Allow once, allow for good, or decline

    For apt-get update the answer is y, the key for Allow once: it is harmless, but it is not a command to pre-approve for every host as root. The agent receives the exit code and output and sends the next request, apt list --upgradable, which lists the pending updates. That command only reads, the configuration allows it, and it runs without a card.

    A decline can carry a note. “Use apt list --upgradable instead” reaches the agent as part of the result, and the agent adjusts its plan.

  4. Find the output in the history

    The output of an approved command goes two ways. The agent receives it as the result of its tool call, which is how the agent learns what it asked for. Wingman also writes it, with the request and its ending, into the history, which the History page of the dashboard shows: one row per request with its time, host, command and status, and behind each row the complete record, with the reason, the decision, the exit code and the command’s output. Declined requests are there too, with the administrator’s note. The following screenshot shows the History page after a morning’s work:

    The History page with filters for search text, host, kind, status and page size, and eight records: root and automatic commands on storage-01 and compute-01, a background download tagged BG, a restic command with the placeholder {{secret:backup-repo}}, and a Sentinel task proposal, all succeeded. (enlarge)
    Every request ends in the history. The expanded record holds the output that the agent received, with secrets removed.
  5. Read the report

    The agent answers in the chat with what it found — which packages are pending, from which repository, whether a reboot would be needed. The following screenshot shows the whole exchange in the agent’s terminal, from the prompt to the report:

    The OpenCode terminal: the prompt to check storage-01 for pending security updates, the agent's short thoughts, its call to read the master data, its explanation and two wingman_exec_on_host calls, and its report that nine packages have updates, with security updates in openssl, libc6 and the kernel, and that the kernel reboot waits for the maintenance window according to the wiki page of storage-01. (enlarge)
    A complete task in the agent’s terminal: the prompt, the requests and the report.

    If the task calls for it, the agent also writes a dated report file into the workspace. It does not install anything: that was not asked, and it would be a separate request on a separate card.

    The next prompt in the same conversation can ask for exactly that:

    Prompt to the agent:

    Install the pending security updates and restart the affected services. Tell me if a reboot is needed.

    The installation then arrives as a root request on a card like the ones before, followed by the checks the agent runs to verify that the services are back, and the administrator decides each one.

Planning a larger change

Some changes take several steps, touch several servers or cannot be undone. For those, the agent writes a plan before it submits anything: a page under wiki/plans/ with the goal, the steps, how to verify the result, how to roll it back, and the risks. The prompt is phrased as before, as an outcome:

Prompt to the agent:

Plan the cleanup of the backup volume on storage-01.

The administrator reads the plan in Obsidian and discusses it with the agent in the terminal, where the agent revises the plan until the administrator approves it. The agent works only on approved plans. The following screenshot shows an approved plan in Obsidian:

Obsidian with the admin wiki of the workspace: a file tree with assets, hosts, plans, runbooks and services, and the plan Prune the restic snapshots on storage-01, its properties type plan, status approved, host storage-01 and service backup, and its sections Goal, Context and Steps. (enlarge)
A plan in the admin wiki, opened in Obsidian. The administrator approves the plan as a whole; the dashboard still approves each command.

Approving the plan does not approve its commands: each step still arrives as a card. The agent records every step in the plan’s log, with the request ID that leads to the output in the history, and brings the pages of the affected servers up to date afterwards.

Long-running work

Some administrative commands take minutes rather than seconds — downloading updates, a large backup check, a package verification. The agent starts every command expected to run longer than about half a minute with a different tool, start_on_host, which returns a request ID at once instead of waiting. The command runs in the background, and the Approvals page shows its live output while it runs, with a button to cancel it. The following screenshot shows a running download of updates:

The Running section of the Approvals page with a background request on compute-01, tagged ROOT and BACKGROUND: the reason, the command apt-get -q -y --download-only dist-upgrade, a risk of 17 % not flagged, the live output listing the packages being fetched, and a Cancel job button. (enlarge)
Long-running commands continue in the background, show their output while they run and wake the agent when they finish.

When the command finishes, a plugin that secdev installs in OpenCode wakes the agent’s session with the request ID and the final status, and the agent fetches the result. The agent does not wait for the command itself: its instructions tell it to end its turn after starting one, because the wake-up reaches the agent only while its session is idle. The following screenshot shows the agent’s terminal after the download, with the wake-up and the agent’s report:

The OpenCode terminal: the prompt to download the pending updates on compute-01, the agent's start_on_host call and its note that the download runs in the background, then a Wingman completion notification naming the request as succeeded, the agent's call to read the history entry, and its report that eleven packages, 418 MB, are now in the local cache and nothing was installed yet. (enlarge)
The completion notification wakes the agent, which reads the result and reports.

The administrator can cancel a running command from the dashboard at any time; the agent can cancel one only through a cancellation request that itself needs approval.

Using a stored password

Some tasks need an account password: a database superuser, an API token, the login of a management interface. Pasting the password into the chat would hand it to the agent and leave it in the conversation. Instead the administrator stores it in Wingman’s vault, an encrypted file that only the dashboard opens, and the agent refers to the password by the name of its vault entry. The running example lists the latest backups on the file server storage-01, which needs the password of the backup repository.

  1. Store the password

    The administrator created the vault during setup and now only adds the password. After unlocking the vault with its passphrase, the Secrets page offers Add password, which takes a name such as backup-repo, the username backup, the password, the hosts it belongs to, here storage-01 and storage-02, and a description of what the account is for. The following figure shows the Stored passwords tab with three entries:

    The Stored passwords tab of the Secrets page: a note that agents see only name, username, hosts and description, filters for text and host, and three entries backup-repo, db-admin and mailcow-api with their usernames, host chips, the time of the last change, and buttons to copy the placeholder, edit and delete. (enlarge)
    Each entry links a password to the hosts it is valid on. The page can reveal or copy a password; nothing else can.

    While a vault that holds passwords is locked, as it is after every restart of the Wingman service, every remote request waits on its card, even one a policy rule would allow, because Wingman cannot remove passwords from output it cannot recognise.

  2. Let the agent find the entry

    The task is phrased as before, as an outcome:

    Prompt to the agent:

    List the latest restic snapshots on storage-01.

    The agent calls list_secrets, which returns each entry’s name, username, hosts, description and placeholder, never the password. It finds backup-repo and writes the placeholder {{secret:backup-repo}} where the password belongs:

    storage-01   ROOT   exec/unknown
    RESTIC_PASSWORD="{{secret:backup-repo}}" \
      restic -r /srv/backup/restic snapshots --latest 3
    Reason: list the three latest restic snapshots
    

    A placeholder works only on the hosts its entry lists, here storage-01 and storage-02.

  3. Read the card and approve

    The card names every stored password the command uses, with its username and description. The decision is the same as for any card, with one difference: a command that uses a stored password always waits for a person, so the card offers no permanent approval. The following figure shows such a card:

    A pending approval card for storage-01, tagged ROOT and EXEC/UNKNOWN, with a restic command that lists the three latest snapshots and passes the placeholder {{secret:backup-repo}} in RESTIC_PASSWORD, a Check box with a risk of 51 % review and the note that Allow forever is unavailable, an orange box naming the stored password backup-repo with user backup and its description, Use stored sudo password ticked, and the buttons Allow once and Reject. (enlarge)
    The card shows which password the command will use before the person decides.
  4. Read the result

    After approval, Wingman sends the password to the host over the encrypted SSH connection, outside the command line. The result reaches the agent as usual, except that a stored password anywhere in the output reads [REDACTED:secret:backup-repo]. The history keeps the command with its placeholder, so the record shows which password was used without containing it.

A placeholder for a stored password also works inside a file the agent uploads, a configuration file that needs the database password for example. The agent writes the file with {{secret:db-admin}} in it and asks for the upload with secrets=true; Wingman fills the password in on the way to the host. A file on a host that contains a stored password cannot be downloaded into the workspace, because the download would hand the password to the agent.

Keeping master data current

Master data is where the agent starts every task, and it is only useful while it is true. The agent maintains the file: when what it sees on a host contradicts the record, it proposes the correction. The Master Data page of the dashboard shows the record as the agent reads it:

The Hosts tab of the Master Data page: filters for search, tag, symbol, user and field, and ten fictional hosts as rows with icon, address, role and tags, from cluster-head to web-01. (enlarge)
The Hosts tab of the Master Data page, one row per host the agent may reach.

The proposal is a request like any other. It names the exact field, the old and the new value, and the reason, and it opens a card in the dashboard that shows the change as a before/after preview. Neither a policy rule nor a permanent approval can pre-approve such a card; every change to master data is a decision. In the running example, the security-update check under Doing a task showed that the storage server had been upgraded since the record was written:

storage-01   WRITE   master data
modify /hosts/storage-01/metadata/os
  before: Debian 12
  after:  Debian 13
Reason: /etc/os-release on the host reports Debian 13

The same mechanism adds a host that was found on the network and is missing from the record, notes a newly installed service under expected_services, or removes an entry for a machine that has been decommissioned. Over time master data grows with the fleet instead of falling behind it, and the agent’s own reasoning on the next task starts from a record it helped to keep right.

The learned allow list

Many commands are harmless and come up in almost every task, such as reading a log or listing a directory, and a card for each of them slows the work down. Such commands can be put on an allow list, so that they run without a card. Allow commands forever on a card is how the dashboard stops asking about this routine work. Wingman parses the command as Bash, extracts every program it calls, and shows them in a preview: green for programs already learned, red for new ones. Confirming the preview stores the new ones in an allow list, separately for root and non-root use. A later command runs without a card when every program in it is either learned or on a configured list that applies at the requested privilege level; the history then names the rule combined-executables. A root command on a server without a stored or cached sudo password still opens a card, to ask for the password, and a command that uses a stored password always opens one.

Learning a program is a consequential choice, and the dashboard treats it as one. A learned program may later receive any arguments and any redirection; the permission applies to every host in the master data; and interpreters such as bash, python3 or perl ask for a second confirmation. The Allowlist page lists every learned entry with a Revoke button, beside the read-only rules from the configuration file. The following screenshot shows the Allowlist page:

The Allowlist page with the tabs Learned executables, Config executables, Exact commands and Regex commands, and one learned entry, journalctl at root, with the time it was learned, its source request and a Revoke button. (enlarge)
Everything that runs without asking is visible in one place and can be revoked from there.

References

  1. LANCET Nano: a small open model that classifies shell commands by riskfingerthief (2026) · huggingface.co/fingerthief/lancet-nano

Feedback

Every heading, paragraph, list item, figure and table on this page now has a short label in the margin, such as sw14. The label lets you point at the exact passage you mean.

A later version may number the page differently, so clicking a label copies it together with the version, as in sw14@70e35cc92aed.

For a correction, a suggestion or a question, paste the copied labels into an email to the address above and add what you would change or want to know.

The labels stay on as you move between pages. Press Labels off in the footer to hide them.