Alpha. Very early development.
Hexbot

Vault

The vault keeps what your bots need to work for you: logins for websites, API keys, SSH keys, and identities such as your name, address and passport number. The vault tool never returns a secret to a bot. Hexbot types a login or an identity field into a page for it, or hands an API key or SSH key to a command it runs.

The vault used to be called Passwords. Your saved passwords move into it on their own the first time Hexbot opens it.

Saving from a chat

When a bot needs to sign in somewhere and has no login for it, it shows a card in its chat with the site’s name and a Sign in button. When a command needs an API key or an SSH key, it shows a card with Add key. What you type or paste goes from your app to the daemon, which saves it in the vault straight away. It never appears in the conversation, in the bot’s history, or in what is sent to the model provider. The card then shows Saved. Choose Not now to tell the bot no.

If a saved login or key stops working, the bot shows the card again so you can enter the current one. Anything new saved from a card goes to every bot; a replacement keeps the bots that had it. Change that in Settings, Vault.

A bot can also make a new SSH key itself. It gets only the public key, to add to GitHub or a server.

Identities are added by you, in Settings, Vault.

Settings, Vault

Open Settings, Vault to see everything saved, by type, with each site’s own icon. Hexbot fetches the icon from the site itself, once, and keeps it in the vault, so no icon service learns which sites you use. A login or API key without one, saved for an IP address, or for a site on your own network, such as a router or homeassistant.local, shows the first two letters of its name. A VPN or proxy that gives websites placeholder addresses, such as 198.18.x.x, also leaves new sites with letters. To get icons in either case, except for an IP address, set security.allow_private_urls to true in ~/.hexbot/config.yaml on the daemon’s computer, then open the vault again. This also lets bots’ web tools reach addresses on your own network. SSH keys and identities show what they are.

From there you can:

  • add a login, with an optional one-time code key (the setup key or otpauth:// link from a site’s two-factor setup), so bots can enter the six-digit code too;
  • add an API key and choose the environment variable a command reads it from, such as OPENAI_API_KEY;
  • make a new SSH key, or paste one you have, with its passphrase;
  • add an identity: name, email, phone, company, address, birthday, and passport, driver’s license and ID numbers;
  • show or copy a secret, edit an item, or delete it;
  • choose which bots can use each item, or give it to every bot, including bots you add later.

In the mobile app, open your initials, then Vault.

Your primary bot can do the same from its own chat, without seeing any secret: it can tell you which bots have an item, give one to a bot, rename it, or delete it. Deleting always asks you first.

How bots use each type

  • Logins: Hexbot types the username, password or one-time code into the sign-in page on the bots’ computer. In Auto and Bypass, shared logins fill without prompting (so scheduled jobs can sign in too); in Manual, Hexbot asks first so you can check the screen.
  • API keys: the bot runs a command on the daemon’s computer with the key as its environment variable. The key is hidden from the command’s output.
  • SSH keys: the bot runs a command on the daemon’s computer with the key in an SSH agent that OpenSSH starts for that command alone. The agent signs for the command and never hands out the key, and it ends with the command.
  • Identities: the bot sees only the item’s title and which fields it has. In Auto and Bypass, Hexbot types shared identity fields on the bots’ computer without prompting; in Manual, it asks first.

A command that gets an API key or SSH key asks you first in Manual, and is checked first in Auto, every time, and the card names the keys. It never offers Always allow. API keys and SSH keys work in commands on the daemon’s computer only, for now. A typed identity field shows on the page, so the bot can see it in a later screenshot.

Where the vault is kept

The vault is one KeePass (KDBX 4) file per person on the daemon’s computer, ~/.hexbot/users/<you>/vault/vault.kdbx. The format is open, so you can open the file with KeePassXC or any KeePass app: logins, API keys, identities, site icons and SSH keys all show there, and KeePassXC’s SSH agent can use the keys. The file is encrypted with a random key kept in the macOS Keychain, or the keyring on Linux. Where there is neither, such as on Windows or a headless Linux server, the key is in a file next to the vault that only you can read. Settings, Vault says which one your daemon uses.

Bots’ shell commands and file tools can’t read the vault or its key in Auto or Manual. In Bypass a bot has no sandbox and could.

Limits

  • The vault works in a bot’s own chat and in its scheduled jobs. In Auto and Bypass, a scheduled job can list what it may use and fill shared logins and identities on the bots’ computer, but can’t show a card, give API keys or SSH keys to commands, or make new SSH keys. Rooms and conversations between bots can’t use the vault.
  • A page’s own scripts can read a field after it is filled, and Hexbot types at the coordinates the bot gives without checking which site or field is showing on the bots’ computer (so a page can also display a typed value in a later screenshot). Once signed in on the bots’ computer, that browser session stays on the shared desktop where any bot that works there can use it. Likewise, a command that gets an API key can use it as it likes, including sending it somewhere. Hexbot hides keys from what the bot reads back, but a bot set on finding one could still get it. Give each item only to bots that need it, and read the command before you allow it.