Guides

Let an AI agent sign in without seeing your password

How to let AI agents use websites behind a login safely: saved logins the agent never sees, 2FA codes, 1Password vaults, and tokens sent to one site only.

Bhavik Fuletra··3 min read
Let an AI agent sign in without seeing your password: cover art with the Brainwrite team

To let an AI agent sign in to a website safely, never give it the password. Save the login with a tool that types it into the site for the agent. In Brainwrite, a bot asks Brainwrite to fill a saved login, and Brainwrite types the username, password and 2FA code into that site's login page. The bot only hears whether it worked.

Why pasting a password into chat is a bad idea

Agents do useful work behind logins: partner portals, billing dashboards, supplier sites. The quick fix is to paste the password into the chat. Then it is in the conversation, in logs and in whatever the model sees next. A web page the agent reads could even try to talk it into using that password somewhere else.

So a Brainwrite bot never asks for a password or a one-time code in chat. If you paste a token anyway, the bot won't use it. It tells you to rotate it and asks again on a secure card.

Step 1: let the bot ask

When a bot reaches a site it can't get into, it stops and shows a Sign in needed card. The card names the site and quotes the bot's reason. You get three choices:

  • Open takes you to the bot's own browser, already in your control. You sign in yourself, then choose Done and the bot carries on.
  • Save a login opens a short form for the username, the password and, optionally, the site's 2FA setup key.
  • Cancel tells the bot you said no.

Step 2: save the login once

Saved logins are encrypted on the computer Brainwrite runs on and never shown again. A login saved from a card is for the bot that asked. One added in Settings → Logins is for every bot unless you pick bots.

A login fills only on its own site, over https. A login for example.com fills on accounts.example.com, never on example.com.evil.test. For a company that shares a domain, such as acme.okta.com, tick Only on this exact address.

If your team already keeps logins in 1Password, choose Connect 1Password. Paste a service account token that can read one vault, and its logins appear as From 1Password.

Step 3: let it handle 2FA

Save the site's 2FA setup key with the login. That is the key, or the otpauth:// address in the site's QR code. Brainwrite then makes the one-time code as it fills the form, the way an authenticator app does. For codes sent by email, a bot can read the code in your connected inbox and type it into that site. It never pastes a code anywhere else.

Tokens work the same way

APIs need tokens, not passwords. A bot asks for one with a Secret needed card that names the one https site it may go to. The bot names the secret, and Brainwrite adds the real value only when it sends the request. Anything the site sends back is cleaned of the token before the bot sees it. Every secret lives in one place, with what it may be used for.

Saved logins fill in the built-in browser and My Chrome. On a Cloud desktop, a private desktop or a VPS, the bot asks you to sign in instead. CAPTCHAs and passkeys always need you.

Put it to work

Pair saved logins with an automation and the boring monthly jobs run on their own. Downloading a payout report or pulling an invoice list from a portal with no API are good examples. See month-end close and invoice chase for teams that do this.

Bhavik Fuletra

Written by

Bhavik Fuletra

Bhavik Fuletra is the co-founder and CEO of Palzin LLC, the company behind Brainwrite. A tech entrepreneur and virtual CTO with more than 20 years in software and over ten products shipped, he works on SaaS architecture and the product decisions behind Brainwrite's AI agent teams. He is based in Ahmedabad, India.

FAQ

Questions people ask

Is it safe to give an AI agent my password?

Not in a chat. A password pasted into a conversation becomes part of what the model reads and what gets logged. In Brainwrite a bot never holds a password: you save the login once, and Brainwrite itself types it into that site's login page. The bot is told only whether the sign-in worked.

Can an AI agent handle two-factor authentication?

Yes, two ways. Save the site's 2FA setup key with the login and Brainwrite makes the one-time code when it fills the form. Or, for a sign-in you asked for, a bot can read a code sent to your connected inbox and type it into that site only.

What can't an AI agent sign in to by itself?

A CAPTCHA, a passkey or a step that needs payment details still needs you. The bot asks with a Sign in needed card, you sign in yourself in its browser, and Done hands control back so it carries on.

Give your first job to Brainwrite.

Download the app, connect the AI you already pay for, and tell your Chief of Staff what needs doing.

macOS today. Windows and Linux are coming soon.