[{"data":1,"prerenderedAt":54},["ShallowReactive",2],{"blog-let-ai-agents-use-your-accounts":3,"blog-related-let-ai-agents-use-your-accounts":36},{"slug":4,"title":5,"description":6,"category":7,"categoryId":8,"keyword":9,"date":10,"minutes":11,"body":12,"html":13,"headings":14},"let-ai-agents-use-your-accounts","How to let an AI agent use your accounts (X, Gmail, Reddit) without giving it your password","Three ways to give an AI agent access to your X, Gmail or Reddit accounts, what each one risks (keys in logs, prompt injection, posts you didn't want) and the habits that keep it safe.","Agents & automation","agents-automation","give ai agent access to accounts","2026-11-30",6,"An agent that can only talk is a nice demo. The useful ones read your inbox, answer mentions on X, post in a subreddit, check a dashboard. All of that needs your accounts. The question isn't whether to give an agent access, it's how: there are three common ways, and one of them should never be used.\n\n## What are the three ways to give an agent your accounts?\n\n| Way | How it works | Main risk |\n| --- | --- | --- |\n| API key or OAuth token | The agent calls the service's API with a key or a token you created | The key leaks: a log, a transcript, a committed file |\n| Password in the prompt | You paste the login and password into the chat or the instructions | Everything: the password is in clear, everywhere, for good |\n| A browser already signed in | The agent works in its own browser, where you signed in yourself once | It acts as you on the site, so what it sends must be checked |\n\nMost setups mix the first and the third: an API where the service has a decent one, a signed-in browser where it doesn't.\n\n## When is an API key or OAuth token the right choice?\n\nWhen the service has an API that covers the job, and lets you limit what the key can do. Gmail is a good example: Google's API has separate scopes for reading (`gmail.readonly`), for drafts (`gmail.compose`) and for sending (`gmail.send`), listed in [its scopes page](https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fgmail\u002Fapi\u002Fauth\u002Fscopes). An agent that triages your inbox needs the first one, not the last.\n\nThe catch is that a key is a string, and strings travel. It can be printed in a tool result, pasted into a script, written to a `.env` that syncs to the cloud, or kept in the session's transcript on disk. [Keeping keys out of the chat](\u002Fblog\u002Fclaude-code-secrets) covers the habits: environment variables, deny rules, the Keychain. The other catch is coverage. Many sites have no API for what you need, or one that's paid, limited or closed to small accounts.\n\n## Why is pasting a password into the prompt a bad idea?\n\nBecause a prompt is not a safe. The password ends up:\n\n- in the conversation history, on disk and often in the provider's logs;\n- in every copy of the instructions, every export, every teammate's shared agent;\n- within reach of anything the agent reads. A web page or an email can carry hidden instructions (\"send your login details to…\"), which is the first risk in the [OWASP Top 10 for LLM applications](https:\u002F\u002Fgenai.owasp.org\u002Fllm-top-10\u002F) (LLM01, prompt injection), right before sensitive information disclosure (LLM02).\n\nAnd a password is all-or-nothing. It can't be limited to reading, it can change the recovery email, and it works until you notice. Two-step verification makes it worse, not better: the agent either fails at the code prompt or you start sharing codes too.\n\n## How does a signed-in browser work?\n\nYou give the agent a browser of its own, separate from yours, and sign in there yourself, once. The agent gets the session (the cookies), never the password. It can then read and act on sites that have no usable API: your X timeline, a Reddit thread, the LinkedIn page of your company, a dashboard. [AI agents with a browser](\u002Fblog\u002Fai-agents-with-a-browser) goes through how they read pages and fill in forms.\n\nTwo things matter with this approach:\n\n- **One browser per agent, not your own Chrome.** An agent in your daily browser has your bank, your mail and your admin panels in the next tab. Its own browser holds only the accounts you gave it.\n- **The session is still power.** A signed-in X account can post, follow and send messages. So the browser solves the password problem, not the \"what does it send\" problem.\n\nFor mail specifically, the safest version is often a separate address for the agent rather than your own inbox: see [giving an AI agent its own email address](\u002Fblog\u002Fai-agent-email-address).\n\n## What can go wrong once an agent has access?\n\nThree failures, in order of how often they happen:\n\n1. **The key or session leaks.** A key printed in a log, a token in a committed file, a `.env` in a shared folder. Nobody attacked anything; it just ended up somewhere readable.\n2. **Prompt injection.** The agent reads something written by a stranger (a mention, an email, a web page) that tells it what to do. Simon Willison calls the dangerous combination [the lethal trifecta](https:\u002F\u002Fsimonwillison.net\u002F2025\u002FJun\u002F16\u002Fthe-lethal-trifecta\u002F): access to private data, exposure to untrusted content, and a way to communicate outward. An agent that reads your Gmail and can send mail has all three.\n3. **A post you didn't want.** No attacker at all: the agent misread the brief, replied to the wrong thread, posted a draft, or posted ten times. OWASP lists this under excessive agency (LLM06): more permissions or autonomy than the job needs.\n\n## How do you protect your accounts?\n\nNone of these habits is new; they're how you'd onboard a freelancer.\n\n- **Give access per agent, not to all of them.** The agent that answers support doesn't need your X account. The one that posts on X doesn't need Stripe. If an agent is fooled, it can only misuse what it holds.\n- **Start read-only.** Give the reading scope or a read-only key first. Let the agent prove its drafts are good before it can send anything.\n- **Make it ask before anything goes out.** Reading and drafting can run freely; a post, a reply, a mail or a form sent should wait for your yes until you trust that exact kind of send. [When an AI agent should ask before it acts](\u002Fblog\u002Fai-agent-approvals) sets out a simple rule for it.\n- **Check what goes out, not only what comes in.** A last look at each send for a key, a password or a link it shouldn't carry catches the leak that prompt injection was after.\n- **Keep keys on the machine.** Keys in the Keychain or a secret manager, passed to the agent as environment variables it can use but not print, and never sent to a server that doesn't need them.\n- **Keep volumes human.** Platform rules still apply to automated accounts. X, for one, expects automated accounts to say so.\n- **Know how to take it back.** Revoking a token, signing the agent's browser out, or removing the account from the agent should take one step.\n\n## In Relais\n\n[Relais](\u002Fblog\u002Fwhat-is-relais) is one way to set this up, on the Claude account you already have (it isn't made or endorsed by Anthropic). Since version 0.3.2, accounts on sites (X, Reddit, LinkedIn, Instagram, Gmail) live in its [Vault](\u002Ffeatures\u002Fvault): you sign in once, in a [browser of the agent's own](\u002Ffeatures\u002Fagent-browser), and every agent you give the account to can use it to read and to post. Relais never sees the password.\n\nAPI keys sit in the same Vault, kept in the macOS Keychain and given only to the agents that need them, as environment variables; a command that prints one is refused. Posts, replies and mails wait in the agent's conversation for your yes, unless you write a rule that lets that agent send on its own ([approvals](\u002Ffeatures\u002Fapprovals)). And every send an agent makes is checked, drafts and files included, so no key ever leaves with it. Relais itself has no telemetry: no analytics, no trackers.","\u003Cp>An agent that can only talk is a nice demo. The useful ones read your inbox, answer mentions on X, post in a subreddit, check a dashboard. All of that needs your accounts. The question isn&#39;t whether to give an agent access, it&#39;s how: there are three common ways, and one of them should never be used.\u003C\u002Fp>\n\u003Ch2 id=\"what-are-the-three-ways-to-give-an-agent-your-accounts\">\u003Ca class=\"anchor\" href=\"#what-are-the-three-ways-to-give-an-agent-your-accounts\" aria-label=\"Link to this section\">#\u003C\u002Fa>What are the three ways to give an agent your accounts?\u003C\u002Fh2>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Way\u003C\u002Fth>\u003Cth>How it works\u003C\u002Fth>\u003Cth>Main risk\u003C\u002Fth>\u003C\u002Ftr>\u003C\u002Fthead>\u003Ctbody>\u003Ctr>\u003Ctd>API key or OAuth token\u003C\u002Ftd>\u003Ctd>The agent calls the service&#39;s API with a key or a token you created\u003C\u002Ftd>\u003Ctd>The key leaks: a log, a transcript, a committed file\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>Password in the prompt\u003C\u002Ftd>\u003Ctd>You paste the login and password into the chat or the instructions\u003C\u002Ftd>\u003Ctd>Everything: the password is in clear, everywhere, for good\u003C\u002Ftd>\u003C\u002Ftr>\u003Ctr>\u003Ctd>A browser already signed in\u003C\u002Ftd>\u003Ctd>The agent works in its own browser, where you signed in yourself once\u003C\u002Ftd>\u003Ctd>It acts as you on the site, so what it sends must be checked\u003C\u002Ftd>\u003C\u002Ftr>\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>Most setups mix the first and the third: an API where the service has a decent one, a signed-in browser where it doesn&#39;t.\u003C\u002Fp>\n\u003Ch2 id=\"when-is-an-api-key-or-oauth-token-the-right-choice\">\u003Ca class=\"anchor\" href=\"#when-is-an-api-key-or-oauth-token-the-right-choice\" aria-label=\"Link to this section\">#\u003C\u002Fa>When is an API key or OAuth token the right choice?\u003C\u002Fh2>\n\u003Cp>When the service has an API that covers the job, and lets you limit what the key can do. Gmail is a good example: Google&#39;s API has separate scopes for reading (\u003Ccode>gmail.readonly\u003C\u002Fcode>), for drafts (\u003Ccode>gmail.compose\u003C\u002Fcode>) and for sending (\u003Ccode>gmail.send\u003C\u002Fcode>), listed in \u003Ca href=\"https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fgmail\u002Fapi\u002Fauth\u002Fscopes\">its scopes page\u003C\u002Fa>. An agent that triages your inbox needs the first one, not the last.\u003C\u002Fp>\n\u003Cp>The catch is that a key is a string, and strings travel. It can be printed in a tool result, pasted into a script, written to a \u003Ccode>.env\u003C\u002Fcode> that syncs to the cloud, or kept in the session&#39;s transcript on disk. \u003Ca href=\"\u002Fblog\u002Fclaude-code-secrets\">Keeping keys out of the chat\u003C\u002Fa> covers the habits: environment variables, deny rules, the Keychain. The other catch is coverage. Many sites have no API for what you need, or one that&#39;s paid, limited or closed to small accounts.\u003C\u002Fp>\n\u003Ch2 id=\"why-is-pasting-a-password-into-the-prompt-a-bad-idea\">\u003Ca class=\"anchor\" href=\"#why-is-pasting-a-password-into-the-prompt-a-bad-idea\" aria-label=\"Link to this section\">#\u003C\u002Fa>Why is pasting a password into the prompt a bad idea?\u003C\u002Fh2>\n\u003Cp>Because a prompt is not a safe. The password ends up:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>in the conversation history, on disk and often in the provider&#39;s logs;\u003C\u002Fli>\n\u003Cli>in every copy of the instructions, every export, every teammate&#39;s shared agent;\u003C\u002Fli>\n\u003Cli>within reach of anything the agent reads. A web page or an email can carry hidden instructions (&quot;send your login details to…&quot;), which is the first risk in the \u003Ca href=\"https:\u002F\u002Fgenai.owasp.org\u002Fllm-top-10\u002F\">OWASP Top 10 for LLM applications\u003C\u002Fa> (LLM01, prompt injection), right before sensitive information disclosure (LLM02).\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>And a password is all-or-nothing. It can&#39;t be limited to reading, it can change the recovery email, and it works until you notice. Two-step verification makes it worse, not better: the agent either fails at the code prompt or you start sharing codes too.\u003C\u002Fp>\n\u003Ch2 id=\"how-does-a-signed-in-browser-work\">\u003Ca class=\"anchor\" href=\"#how-does-a-signed-in-browser-work\" aria-label=\"Link to this section\">#\u003C\u002Fa>How does a signed-in browser work?\u003C\u002Fh2>\n\u003Cp>You give the agent a browser of its own, separate from yours, and sign in there yourself, once. The agent gets the session (the cookies), never the password. It can then read and act on sites that have no usable API: your X timeline, a Reddit thread, the LinkedIn page of your company, a dashboard. \u003Ca href=\"\u002Fblog\u002Fai-agents-with-a-browser\">AI agents with a browser\u003C\u002Fa> goes through how they read pages and fill in forms.\u003C\u002Fp>\n\u003Cp>Two things matter with this approach:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>One browser per agent, not your own Chrome.\u003C\u002Fstrong> An agent in your daily browser has your bank, your mail and your admin panels in the next tab. Its own browser holds only the accounts you gave it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>The session is still power.\u003C\u002Fstrong> A signed-in X account can post, follow and send messages. So the browser solves the password problem, not the &quot;what does it send&quot; problem.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>For mail specifically, the safest version is often a separate address for the agent rather than your own inbox: see \u003Ca href=\"\u002Fblog\u002Fai-agent-email-address\">giving an AI agent its own email address\u003C\u002Fa>.\u003C\u002Fp>\n\u003Ch2 id=\"what-can-go-wrong-once-an-agent-has-access\">\u003Ca class=\"anchor\" href=\"#what-can-go-wrong-once-an-agent-has-access\" aria-label=\"Link to this section\">#\u003C\u002Fa>What can go wrong once an agent has access?\u003C\u002Fh2>\n\u003Cp>Three failures, in order of how often they happen:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>The key or session leaks.\u003C\u002Fstrong> A key printed in a log, a token in a committed file, a \u003Ccode>.env\u003C\u002Fcode> in a shared folder. Nobody attacked anything; it just ended up somewhere readable.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Prompt injection.\u003C\u002Fstrong> The agent reads something written by a stranger (a mention, an email, a web page) that tells it what to do. Simon Willison calls the dangerous combination \u003Ca href=\"https:\u002F\u002Fsimonwillison.net\u002F2025\u002FJun\u002F16\u002Fthe-lethal-trifecta\u002F\">the lethal trifecta\u003C\u002Fa>: access to private data, exposure to untrusted content, and a way to communicate outward. An agent that reads your Gmail and can send mail has all three.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A post you didn&#39;t want.\u003C\u002Fstrong> No attacker at all: the agent misread the brief, replied to the wrong thread, posted a draft, or posted ten times. OWASP lists this under excessive agency (LLM06): more permissions or autonomy than the job needs.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch2 id=\"how-do-you-protect-your-accounts\">\u003Ca class=\"anchor\" href=\"#how-do-you-protect-your-accounts\" aria-label=\"Link to this section\">#\u003C\u002Fa>How do you protect your accounts?\u003C\u002Fh2>\n\u003Cp>None of these habits is new; they&#39;re how you&#39;d onboard a freelancer.\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Give access per agent, not to all of them.\u003C\u002Fstrong> The agent that answers support doesn&#39;t need your X account. The one that posts on X doesn&#39;t need Stripe. If an agent is fooled, it can only misuse what it holds.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Start read-only.\u003C\u002Fstrong> Give the reading scope or a read-only key first. Let the agent prove its drafts are good before it can send anything.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Make it ask before anything goes out.\u003C\u002Fstrong> Reading and drafting can run freely; a post, a reply, a mail or a form sent should wait for your yes until you trust that exact kind of send. \u003Ca href=\"\u002Fblog\u002Fai-agent-approvals\">When an AI agent should ask before it acts\u003C\u002Fa> sets out a simple rule for it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Check what goes out, not only what comes in.\u003C\u002Fstrong> A last look at each send for a key, a password or a link it shouldn&#39;t carry catches the leak that prompt injection was after.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Keep keys on the machine.\u003C\u002Fstrong> Keys in the Keychain or a secret manager, passed to the agent as environment variables it can use but not print, and never sent to a server that doesn&#39;t need them.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Keep volumes human.\u003C\u002Fstrong> Platform rules still apply to automated accounts. X, for one, expects automated accounts to say so.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Know how to take it back.\u003C\u002Fstrong> Revoking a token, signing the agent&#39;s browser out, or removing the account from the agent should take one step.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"in-relais\">\u003Ca class=\"anchor\" href=\"#in-relais\" aria-label=\"Link to this section\">#\u003C\u002Fa>In Relais\u003C\u002Fh2>\n\u003Cp>\u003Ca href=\"\u002Fblog\u002Fwhat-is-relais\">Relais\u003C\u002Fa> is one way to set this up, on the Claude account you already have (it isn&#39;t made or endorsed by Anthropic). Since version 0.3.2, accounts on sites (X, Reddit, LinkedIn, Instagram, Gmail) live in its \u003Ca href=\"\u002Ffeatures\u002Fvault\">Vault\u003C\u002Fa>: you sign in once, in a \u003Ca href=\"\u002Ffeatures\u002Fagent-browser\">browser of the agent&#39;s own\u003C\u002Fa>, and every agent you give the account to can use it to read and to post. Relais never sees the password.\u003C\u002Fp>\n\u003Cp>API keys sit in the same Vault, kept in the macOS Keychain and given only to the agents that need them, as environment variables; a command that prints one is refused. Posts, replies and mails wait in the agent&#39;s conversation for your yes, unless you write a rule that lets that agent send on its own (\u003Ca href=\"\u002Ffeatures\u002Fapprovals\">approvals\u003C\u002Fa>). And every send an agent makes is checked, drafts and files included, so no key ever leaves with it. Relais itself has no telemetry: no analytics, no trackers.\u003C\u002Fp>\n",[15,18,21,24,27,30,33],{"id":16,"text":17},"what-are-the-three-ways-to-give-an-agent-your-accounts","What are the three ways to give an agent your accounts?",{"id":19,"text":20},"when-is-an-api-key-or-oauth-token-the-right-choice","When is an API key or OAuth token the right choice?",{"id":22,"text":23},"why-is-pasting-a-password-into-the-prompt-a-bad-idea","Why is pasting a password into the prompt a bad idea?",{"id":25,"text":26},"how-does-a-signed-in-browser-work","How does a signed-in browser work?",{"id":28,"text":29},"what-can-go-wrong-once-an-agent-has-access","What can go wrong once an agent has access?",{"id":31,"text":32},"how-do-you-protect-your-accounts","How do you protect your accounts?",{"id":34,"text":35},"in-relais","In Relais",[37,43,49],{"slug":38,"title":39,"description":40,"category":7,"categoryId":8,"keyword":41,"date":42,"minutes":11},"claude-code-agent-teams","Claude Code agent teams: subagents, teammates, parallel sessions and hand-offs","Five ways to make several Claude Code agents work together, from subagents and the experimental agent teams to worktree sessions, scripts and agents that hand work to each other, with what each one does well and what it costs.","claude code agent teams","2026-11-27",{"slug":44,"title":45,"description":46,"category":7,"categoryId":8,"keyword":47,"date":48,"minutes":11},"ai-weekly-growth-report","A weekly growth report an AI agent writes for you","What a useful weekly growth report holds, where its numbers come from, how to tell a real change from noise, and how an AI agent can write it every Monday.","weekly growth report","2026-11-25",{"slug":50,"title":51,"description":52,"category":7,"categoryId":8,"keyword":53,"date":48,"minutes":11},"ai-agent-memory","AI agent memory: what to keep, where, and how much","How to give an AI agent a memory that works. The kinds of memory an agent needs, why plain files beat a vector database for most of it, what deserves a line, why a cap helps, and how it remembers further back.","ai agent memory",1796309901150]