GuidesAll guides

Guides

Each guide answers one question about connecting an AI agent to a real service, then shows the commands. All of them use the co command line.

What is an agent CLI harness?

An agent CLI harness is a set of command-line tools that an AI agent runs to reach real services: email, chat apps, a browser, files and servers. Each capability is an ordinary shell command, so any agent that can run a shell can use it, including Claude Code, Codex and agents you build yourself. A person can run the same command to see exactly what the agent sees. ConnectOnion is an open-source agent CLI harness, and its commands all start with co.

How to give Claude Code or Codex access to Gmail

Install ConnectOnion, run co auth google to connect your Google account, then run co skills link. That links ConnectOnion's bundled skills, including co-google, into Claude Code and Codex. When you ask either agent about your mail, it can run co gmail inbox, co gmail read and co gmail send from its shell. You don't create a Google Cloud project, and the credentials are saved only on your computer.

How to give an AI agent access to Gmail and Outlook

Run co auth google for Gmail or co auth microsoft for Outlook. The consent runs through OpenOnion's OAuth app, so you don't register an app of your own, and the credentials are saved only on your computer. After that, any agent that can run a shell uses co gmail or co outlook to list, read, search, send and reply. Both also cover the calendar.

How to give an AI agent its own email address

Run co init. The agent gets a keypair, a 0x address and a mailbox at 0x…@mail.openonion.ai. The mailbox is hosted by OpenOnion, so you don't need an email provider account or any DNS records. The agent sends with co email send and reads with co email inbox. To get a readable address, co email name <name> --buy claims name@openonion.ai from your credits.

How to give an AI agent a real, logged-in browser

Use co browser. It keeps one real browser open between commands, using your system Chrome by default with a persistent profile. You log in to a site by hand once, including 2FA, and every later command runs in that logged-in session: co browser go_to, co browser get_text, co browser take_screenshot, or co browser do "…" to hand a whole task to an AI agent. You don't write a Playwright script.

How to connect an AI agent to WhatsApp

Install the WhatsApp extra with pip install 'connectonion[whatsapp]', then run co whatsapp listen and scan the QR code from WhatsApp (Settings → Linked devices → Link a device). Every message is written to ~/.co/inbox/whatsapp/. The agent takes the next message with co whatsapp receive and answers with co whatsapp reply. The linked device sees every chat on that number, so use a number meant for the agent.

How to connect an AI agent to Telegram, Discord, Feishu or SMS

Each chat app is one co command that turns a bot into an inbox of files: co telegram, co discord, co feishu (and co lark) and co sms. listen holds the connection and writes every message to ~/.co/inbox/, receive hands the agent the next one as a JSON line, and reply answers it. The listeners dial out, so you don't host a webhook server or open a public endpoint.

Star us on GitHub

If ConnectOnion saves you time, a ⭐ goes a long way — and earns you a coffee chat with our founder.