Why the way you hand over a login matters
A login is not a file you can take back. Once an agent has seen a password, you cannot make it forget. Copies can live in chat history, logs, config files, backups, and anything the conversation gets pasted into. The password also keeps working for as long as it is valid, long after the task that needed it is finished.
Three questions sort almost every method:
Does the agent see the password itself? Some methods hand over the secret as text. Others let the agent ask to sign in without receiving the password as text. That difference is the biggest one on this page.
How many copies exist afterward? One copy in a protected place is manageable. Five copies across five tools is not.
Can you take access back? A good method lets you remove one agent's access to one site without changing your password everywhere.
Here is a small example. Say you use three agents: one that handles your inbox, one that books travel, and one that posts to your social accounts. Each needs a few logins. If you paste credentials into each chat, you have created nine or more copies you will never find again. If you keep them in config files, you have nine copies on disk. If you use one vault, you have one saved login per site, and a list of which agent can use which site. When you stop using the travel agent, you remove its access in one place.
Keep those three questions in mind as we go through the options.
The options
The six ways, one by one
1. Paste it into the chat
This is how most people start. You type "my login is..." and the agent gets to work.
- Good for:
- a throwaway account you do not care about.
- How the agent gets access:
- it reads the password as text in the conversation.
- Copies created:
- at least one in the chat history, plus anywhere that history is stored or shared.
- Taking it back:
- you can only change the password on the site itself.
- Watch out for:
- the password is now part of the conversation. If you use five agents, you will paste it five times, in five places, and you will not remember where.
Verdict: fine for a test account. Not for anything you would be upset to lose.
2. Put it in a .env or config file
Developers love this one. The password goes in a file, and the agent or its code reads it when needed.
- Good for:
- quick local projects where you are the only user.
- How the agent gets access:
- it reads the file and receives the password itself.
- Copies created:
- one plain-text file, plus every backup, sync folder, and repository that touches it.
- Taking it back:
- delete the line and change the password. Anything that already read it keeps its copy.
- Watch out for:
- it is easy to commit this file to a repository by accident, easy to leave in a backup, and readable by any program that can open the folder.
Verdict: common, convenient, and the source of a lot of leaked credentials. Keep it to low-stakes accounts.
3. Use your password manager
Password managers store logins safely, and they are a big step up from the first two options.
- Good for:
- your own sign-ins, as a person, on your own devices.
- How the agent gets access:
- usually by you copying a password out for it, or by sharing a vault or folder with it.
- Copies created:
- the original in the manager, plus whatever you paste or share.
- Taking it back:
- you can unshare a folder, but a password already pasted is out.
- Watch out for:
- password managers are designed for humans, not agents. Sharing a whole vault gives an agent far more than it needs, and approving each use usually means you are standing next to the screen.
Verdict: great for you. Awkward as the way an agent gets access.
4. Use a secrets manager
Secrets managers are what engineering teams use to keep API keys and credentials out of code. They offer access rules, rotation, and audit trails.
- Good for:
- teams running services that use machine credentials.
- How the agent gets access:
- the program fetches a secret at run time, based on rules an engineer wrote.
- Copies created:
- the stored secret, plus whatever the program holds in memory while it runs.
- Taking it back:
- strong. You can rotate or revoke through policy.
- Watch out for:
- real setup and upkeep, and a design aimed at keys and tokens more than the website logins an agent uses in a browser. For one person with a few agents, it is more machinery than the job needs.
Verdict: the right tool for production systems. Heavy for personal agent logins.
5. Use OAuth or an API key
When a service supports it, OAuth is the cleanest way to connect. You approve a specific set of permissions, and the agent gets a token instead of your password. API keys work similarly, with fewer controls.
- Good for:
- services that offer a proper integration, such as many email, calendar, and developer tools.
- How the agent gets access:
- it holds a token with limited permissions.
- Copies created:
- the token, which still has to be stored somewhere.
- Taking it back:
- good. You can usually revoke the connection from the service's settings.
- Watch out for:
- plenty of sites do not offer it. If the only way in is a username and password in a browser, OAuth is not an option. Tokens also need a safe home, which brings you back to options 2 through 4.
Verdict: use it whenever the site offers it. It does not cover everything.
6. Use one agent vault
An agent vault is built for exactly this problem. You save a login once. An agent that supports the vault's login tools asks for access to a specific site. You approve or deny the request on a page that is separate from the agent's conversation. In AgentKey's supported login flow, you enter the credential on that owner-facing page, and AgentKey fills it into the browser instead of returning it as a tool response for the model to read.
- Good for:
- anyone running one or more agents that need to sign in to real websites.
- How the agent gets access:
- it requests a sign-in to a site, and you approve it. In the supported flow, the password does not need to appear in the prompt or the conversation.
- Copies created:
- one saved login per site, in one place.
- Taking it back:
- AgentKey's Cloud connection flow includes owner-controlled login grants and revocation, so you can remove an agent's access to a site without changing the password everywhere.
- Watch out for:
- a vault is only as safe as the computer and account around it. AgentKey's free Local Mode keeps an encrypted vault on your computer and keeps passwords out of normal login-tool responses, but it is not a sandbox against other programs running as the same computer user. The local process and operating-system account still need to be trusted. Also, a filled form is not proof of a successful login. A site may ask for a two-step code or a human check, so confirm which account signed in before doing anything sensitive.
Verdict: the best fit when you use several agents or care about the account. One place to save, one place to approve, one place to revoke.
Side by side: the comparison table
Here are the six methods against the three questions from the start. "Sees the password" means the agent receives the password as text.
| Method | Agent sees the password? | Copies left behind | Easy to take back? | Works on any site? | Setup effort |
|---|---|---|---|---|---|
| 1. Paste in chat | Yes | In every chat | No | Yes | None |
| 2. .env or config file | Yes | Files, backups, repos | Partly | Yes | Low |
| 3. Password manager | Usually, when you copy it out | Original plus pasted copies | Partly | Yes | Low |
| 4. Secrets manager | Program receives the secret | Stored plus in memory | Yes | Best for keys and tokens | High |
| 5. OAuth or API key | No, a token instead | Tokens | Yes | Only sites that offer it | Medium |
| 6. Agent vault | Not in the supported flow | One per site | Yes, with Cloud grants | Sites you approve | Low |
And a rough scale of the same thing, from least careful to most careful:
- Paste in chat
- .env file
- Password manager
- Secrets manager / OAuth
- Agent vault
Secrets managers and OAuth sit at the same level because they solve different problems. One protects machine credentials, the other replaces passwords where a service offers it. The vault earns its place at the end because it covers the case the others miss: ordinary website logins, used by agents, with approval and revocation built in.
How to choose: a six-step checklist
Work through these in order. Stop at the first step that gives you a clear answer.
- 1
Is it a throwaway account? If losing it would not bother you, pasting it in chat is fine. Use a login you can delete afterward, and never reuse a password.
- 2
Does the service offer OAuth? If yes, use it. You get limited permissions and an easy way to revoke, and no password changes hands.
- 3
Is it a key or token for a service you run? Use a secrets manager if you have one. If you are a solo builder, a protected .env file kept out of version control is a reasonable minimum.
- 4
Will more than one agent need it? Every extra agent multiplies the copies. This is the point where a shared vault starts paying off.
- 5
Does the account matter? Email, money, customer data, a business social page: if you would be hurt by a leak, do not use options 1 or 2. Choose a method where you approve each site.
- 6
Do you want to remove access later without changing the password? If yes, you need a method with per-site grants and revocation, which is what a vault is for.
If you answered yes to steps 4, 5, or 6, you are in vault territory.
The short version
Quick picks for common situations
A test account for trying out a new agent. Paste it in chat. Use a throwaway login, and delete the account when you are done.
A solo coding project on your own machine. A .env file works. Keep it out of your repository, keep it to low-stakes accounts, and do not copy it into backups you share.
Your own everyday sign-ins. Use your password manager. It is built for you, and it does that job well.
A team shipping a service. Use a secrets manager, with access rules and rotation.
An app with a real integration. Use OAuth and review the permissions you grant.
Several agents that sign in to real websites. Use one agent vault. Save each login once, let each agent ask for the sites it needs, and approve them one at a time.
A social or business account an agent will post to. Use a vault, and give access to that site only. An agent helping with your social page should not be able to reach an unrelated bank login.
You are building an agent product. Skip building the vault, the approve screen, per-site permissions, and the revoke and audit tooling yourself. AgentKey's SDK is on npm for developers.
Where to start, and common questions
AgentKey's web app and Chrome extension are available, and developers can install the SDK from npm. The current JavaScript release offers one-command setup with npx -y tryagentkey@0.6.2 in a supported desktop environment. Your coding host may still need a reload and its own project-trust approval.
Start small. Save a throwaway login. Let an agent that supports AgentKey's login tools ask for it. Approve it, and check which account signed in. Once you trust the flow, add the logins that matter, one site at a time, and remove anything you no longer need.
Does the agent ever see my password?
In AgentKey's supported login flow, you enter the credential on an owner-facing page and AgentKey fills it into the browser, so it is not returned as a tool response for the model to read. That is a narrower claim than "never." It depends on using the supported flow, and no tool can protect you if the computer itself is compromised.
Does it work with any AI agent?
It works with agents that support AgentKey's login tools. An agent that does not support them cannot use your saved logins.
What if a site asks for a two-step code or a human check?
A filled form is not proof of a successful login. Those steps still need to be completed by you. Check which account is signed in before the agent does account-sensitive work.
Is Local Mode safe enough?
Local Mode is free and stores an encrypted vault on your computer. It keeps passwords out of normal login-tool responses. It is not a sandbox against other programs running as the same computer user, and a model with unrestricted shell access can cross boundaries that a filtered login tool cannot enforce. Do not treat an approval page as protection from a compromised computer.
Can I take an agent's access away?
AgentKey's Cloud connection flow includes owner-controlled login grants and revocation. That is different from handing over a reusable password and hoping every copy gets deleted later.
Should I use a password manager as well?
Yes, for your own sign-ins. A password manager and an agent vault do different jobs.
Questions? Email agentkey@waiwiser.com.