AgentKey is a password vault built for AI agents. The agent asks to log in, you approve, and AgentKey fills the credential into your browser page. The password does not pass through your agent or your model.

Getting started requires two commands. npm install tryagentkey sets up a local vault and coding-agent instructions. npx tryagentkey registers AgentKey on an existing Playwright MCP connection if one is present in .mcp.json. The browser stays the same; AgentKey does not create a replacement browser or copy a profile. The supported automatic connection is one npx @playwright/mcp server configured with --extension, --cdp-endpoint=..., or a project --config file that names an existing browser endpoint. Unsupported configurations are left unchanged with a reason. Setup does not grant website access: the owner still approves on the local approval page.

With the host connected, ask your agent to log in. It uses agentkey_pages, agentkey_login, and agentkey_status. Browser tools are paused while a login is in progress. Passwords are entered on the local owner approval page, never in agent messages. Completion requires sign-out evidence and the saved username on the original site. Sites with no exact identity evidence remain unverified.

Other frameworks can use explicit browser wiring. Sample code is provided for runnable files. In JavaScript import agentkey from "tryagentkey"; const ak = await agentkey(); await ak.login("https://github.com/login", { page }); // page is your Playwright page. Python users pip install "tryagentkey[playwright]" from tryagentkey import agentkey; ak = agentkey(); ak.login("https://github.com/login", page=page). Node 22.12 or newer and Python 3.9 or newer are required.

Free local mode and offline operation

The free local mode is the whole SDK, not a trial. It works offline with no account and no card. You can read the code, run it, and fork it under Apache-2.0. A comparison table lists free local against AgentKey Cloud (paid): free local costs nothing, serves one user on one machine, stores logins on your computer, uses local approve page, and needs no internet or account. AgentKey Cloud supports multiple users and teams, stores logins end-to-end encrypted and synced across devices, uses phone approval, and requires internet and an account. Cloud is for sync, multiple users and phone approval. It is not needed to use the SDK locally.

Packages and purposes

  • tryagentkey: JavaScript SDK, CLI, local vault and connector helpers
  • tryagentkey (Python): Python SDK with Playwright, LangChain, OpenAI Agents, CrewAI and browser-use examples
  • @tryagentkey/runtime: Approved credential use in a browser page your agent already runs (cloud mode)
  • @tryagentkey/mcp: MCP server for cloud mode. It needs an AgentKey Cloud token and is not a local-mode integration.

Important notes and limitations

  • Automatic browser registration currently supports the project Playwright MCP connection described above, not every agent. A host restart is required after its configuration changes. Other hosts use the existing SDK adapters or coding-agent instructions.
  • You need a browser page your agent controls (Playwright or a supported framework).
  • CAPTCHAs and two-step codes pause and hand control to you. AgentKey does not solve them.
  • This is not a sandbox. Code running inside your agent process is trusted. See SECURITY.md.
  • Tests do not cover every site or browser. Try a throwaway login first.
  • Troubleshooting and FAQ
  • Open an issue or start a discussion
  • Contributing
  • Release notes: releases/

Security boundary and recovery

Security boundary: this bridge protects against a model whose only browser access is the filtered MCP tools on this connection. The local machine.key sits beside vault.enc. Any process running as the same OS user, including a model with shell access, can read the key and decrypt saved logins. In CDP mode another local process can drive that browser. This is not a sandbox, hardware-backed vault, or proof of human presence. The legacy approval wording about the computer means local storage, not isolation from other programs on it. Do not give the model another browser-control channel or shell access if this boundary is required. The busy window runs from accepting a login request until residual credential DOM is destroyed; other servers and extensions are not locked. Local vault writes do not support concurrent writers; use one bridge process per vault. Bare setup requires a desktop session and opens owner approval separately. Direct legacy init is for a human terminal, not an agent terminal. The installer leaves a 0600 recovery backup of the prior MCP config; after verifying the new host connection, remove that named backup if no longer needed.

Apache-2.0. Copyright 2026 AgentKey, Inc. The license permits commercial reuse and forks. It does not grant rights to the AgentKey brand. See LICENSE and NOTICE. The hosted application and backend are not in this repository. Other MCP servers, browser extensions and arbitrary code under the same OS account are outside this wrapper's lock.