Connect your own agent
With Premium, Bettertext can hand a reply or an edit to your own AI agent, like Claude Code on your computer, and show its answer in the usual card. This article shows you how to connect one.
Connect Claude Code
- In your Bettertext dashboard, open Agents, click Connect an agent and choose Claude Code. You get a command with a pairing code in it.
- On the computer where Claude Code is (this one, or another one of yours, like a Mac mini), open Terminal and go to the folder your agent should work in. Claude Code uses that folder's files and its CLAUDE.md.
- Paste the command and press Enter. It downloads one small file from bettertext.ai and connects that computer to your account. You need Node.js and Claude Code installed.
- The dashboard shows Connected by itself. Add the email addresses or sites the agent is for, and click Save.
Keep Keep it running, also after the computer restarts ticked, and Bettertext starts with that computer from now on. The computer only makes outgoing connections to Bettertext, so nothing on your network needs to be opened or set up. To stop it, run node ~/.bettertext/agent.mjs --uninstall on that computer, or remove the agent in your dashboard.
Connect an agent on the web
For developers: any agent that answers like OpenAI's chat completions works, for example one built with the OpenAI Agents SDK. Choose An agent on the web, enter its address and, if it needs one, its key and model name, then click Test. These agents are saved in the Bettertext extension on your browser and called from there directly.
Use your agent
- Write a reply or an edit as usual. The card shows a Write with chip with the agent Bettertext picked: the one whose Used for list matches the email address or site, or your default agent.
- Click the chip to choose another agent, or Bettertext to let Bettertext write it.
- While your agent works, the card counts the seconds. Click Cancel to stop waiting.
- The answer appears with Written by and your agent's name, ready to insert or copy. Ask for changes sends your change back to the same agent.
What your agent receives
The task (for example, reply to an email), the email or text, up to four earlier messages of the conversation, your note, the tone and the name to sign with. Bettertext passes the job to your computer and deletes it as soon as the answer is back, within 15 minutes at most. It keeps nothing of your emails or your agent's answers.
Was this article helpful?