dejo

Keep your AI agent signed in

The short answer: sign in once yourself, in a real browser window. Dejo keeps the session in its own browser profile, so your agent starts signed in every time, and it never sees your password.

This works for every kind of sign-in: a password, "Sign in with Google", a company SSO page, or a code sent to your phone.

Sign in once

Ask your agent to do something on the site. If the site wants a sign-in, your agent calls dejo_login and a real browser window opens on that site (Chrome if you have it, otherwise the Chromium Dejo installed). Sign in there however the site asks, in your own time, then tell your agent you are done. It calls dejo_login_done and the window closes.

From a terminal, the same thing is:

dejo login --site posthog.com

Sign in in the window, then press Enter in the terminal.

Dejo checks that you really signed in

Before it closes the window, Dejo looks at it. If the page still looks like a sign-in page (the address has /login, /signin, /auth, /sso or /oauth in it, or a password box is showing), nothing is closed and nothing is saved. Your agent is told to ask you to finish.

If you have looked and you are signed in, your agent can call dejo_login_done again with confirmed: true.

A sign-in that did not happen is never recorded as one.

What Dejo keeps, and what it doesn't

keptnot kept
the browser session (cookies and site storage), in ~/.dejo/browser-profileyour password
the fact "this site needs a sign-in"any one-time code
how you signed in

The session lives on your machine, in Dejo's own browser profile. It is not your everyday Chrome profile, so nothing in your own browser is touched.

Several accounts on one site

Some sites have more than one kind of user: a customer, a vendor, an admin. Give each one its own profile before signing in. A profile is a whole signed-in browser of its own, so all of them stay signed in side by side.

From your agent:

  • dejo_profile("vendor") switches to the vendor profile (and makes it the first time).
  • dejo_login then signs in that profile only.
  • dejo_profile() with no name lists the profiles and says which one is in use.

From a terminal:

dejo --profile vendor login --site shop.example.com
dejo --profile admin  login --site shop.example.com

You never sign out and back in between roles, so a set of tests covering three roles no longer depends on the order they run in. Every dejo_run result names the profile it ran as.

What your agent learns about a site is shared by all profiles on purpose: it is one site, however many accounts reach it.

Sites where your agent types the password

Some sites have a plain password form, and you may want your agent to fill it on every run. Dejo still never stores the password. The saved step says only that a password goes there, and the value is read at run time from one of two places:

  1. An environment variable named after the site and the field:

    DEJO_SECRET_BILLING_ACME_COM_PASSWORD=your-password
    
  2. Or the file ~/.dejo/secrets.json:

    { "billing.acme.com": { "password": "..." } }
    

For one profile only, add the profile name: DEJO_SECRET_BILLING_ACME_COM_ADMIN_PASSWORD, or { "billing.acme.com": { "admin": { "password": "..." } } } in the file.

If the value is missing, the run stops and names the exact variable to set. It never guesses and never uses something stored earlier.

When a session runs out

Websites end sessions on their own schedule. When that happens, the next dejo_run comes back with needs_login. Sign in once more, the same way, and the route carries on.

If a page times out in a profile but loads fine in a fresh browser, Dejo says the profile is stuck instead of blaming the website. See Troubleshooting.

How this compares with Playwright MCP

Playwright MCP also keeps you signed in: by default its browser profile persists between sessions. It gives you a few ways to handle sign-in:

Playwright MCPDejo
keeps the session between chatsyes, a persistent profile by defaultyes, a persistent profile
several accounts on one siteone profile per project folder; switch with --user-data-dir or --storage-state filesnamed profiles side by side, switched with dejo_profile
Google, SSO, one-time codesthe browser extension reuses your own signed-in Chromea window opens and you sign in once
checks the sign-in really happenednoyes, before the window closes
password for a form, without the AI seeing itnot built inDEJO_SECRET_… variable or secrets.json
remembers the task after signing innoyes, the next run is one call

Playwright MCP's extension is a good choice when you want the agent inside your everyday browser, with all its sign-ins. Dejo keeps its own browser instead, so your agent never touches your personal tabs.

On a server with no screen

Signing in needs a window that a person can see, so it cannot happen over plain SSH or in a container. Sign in on a computer with a desktop and copy ~/.dejo/browser-profile across, or forward a display with ssh -X. Runs after that are headless and need no screen.

FAQ

Does Dejo store my password?

No. You sign in yourself, in a real browser window. Dejo keeps only the browser session, the same way your own browser does. A step that types a password records only that a password goes there; the value is read at run time from an environment variable or a local secrets file.

Can my agent sign in with Google or SSO for me?

No, and it should not. Dejo never automates a Google, SSO or one-time-code sign-in. It opens a window, you sign in there, and the session is kept from then on.

How long does the sign-in last?

As long as the website keeps the session, the same as in your own browser. When the site signs you out, the next run comes back with needs_login and you sign in once more.

If I make Dejo forget a site, am I signed out?

No. Forgetting removes the route, not the session. To sign out, delete the profile folder.

Make your agent remember.

Free and open source. Install it once, and every site your agent learns stays learned.

Get started