# ConnectOnion

> ConnectOnion connects your AI agent to Gmail, Outlook, a real logged-in browser, chat apps and your files — one `co` command each, with no OAuth app, no DNS records and no Playwright script. It is the command-line toolkit for AI agents, and works from Claude Code, Codex or your own agent.

Open source (Apache-2.0), Python 3.10+. Install: `pip install connectonion`, then `co ai`.
Built for forward deployed engineers: people who wire an agent into a client's real systems and hand it over.

## Commands

### identity

- `co init`: Initialize the global ~/.co identity — a keypair and 0x address — or a project with co init ./.
- `co auth`: Authenticate with OpenOnion; google, microsoft, feishu and lark connect accounts.
- `co keys`: Show agent keys and credentials.
- `co status`: Check credential sources, account status, and deployments.
- `co trust`: Manage trust lists (contacts, whitelist, blocklist, admins).

### browser

- `co browser`: Drive one persistent browser — run a function directly, or `do "…"` for the AI agent.
- `co remote-browser`: Manage an owner-bound browser session on a remote agent.
- `co proxy`: Share this computer's internet connection with an authorized agent.

### mail & calendar

- `co email`: Send and read email from the agent's own address.
- `co gmail`: Send and read email from your Gmail account.
- `co outlook`: Your Outlook account: mail, scheduled sends, contacts and calendar.
- `co gcalendar`: Google Calendar events and Meet links.

### inboxes

- `co sms`: Pair a phone and read the agent's encrypted SMS inbox.
- `co telegram`: Send a message from your Telegram bot.
- `co whatsapp`: WhatsApp as an inbox: listen, receive, send, reply.
- `co feishu · co lark`: Feishu / Lark bot as an inbox: listen, receive, send, reply.

### files

- `co gdrive`: List, search, download, and upload Google Drive files.
- `co syno`: Connect to a Synology NAS, inspect its state and manage everyday files.
- `co youtube`: YouTube Data API using your saved Google login.

### network & ship

- `co call`: Run one command on a remote agent and print the result (no LLM).
- `co deploy`: Deploy to ConnectOnion Cloud, or with --to onto a server you own.
- `co server`: Register, list and preflight the servers you can deploy to.
- `co transfer`: Send credits to another agent address.

### build

- `co ai`: Start the AI coding agent, or run a one-shot prompt.
- `co create`: Create a new agent project.
- `co skills`: Discover, copy, and list SKILL.md files from agent tool directories.
- `co eval`: Run evals and show results.
- `co doctor`: Diagnose installation.
- `co commands`: List every command, including subcommands, with its summary.

## FAQ

### What is ConnectOnion?

ConnectOnion connects your AI agent to Gmail, Outlook, a real logged-in browser, chat apps and your files — one `co` command each, with no OAuth app, no DNS records and no Playwright script. It is the command-line toolkit for AI agents, and works from Claude Code, Codex or your own agent. It is an open-source Python package, Apache-2.0 licensed. Install it with `pip install connectonion`.

### How is it different from an AI agent framework?

It still ships a Python Agent class, but the product is the toolkit. Every capability — browser, email, inboxes, files, remote calls, deploys — is a CLI command, so anything that can run a shell command can use it: your own ConnectOnion agent, or a coding agent such as Claude Code or Codex.

### Do I need an API key to try it?

No. New accounts get $5 of credit for managed models through the `co/` prefix, routed through OpenOnion's proxy. Put your own OpenAI, Anthropic or Google key in .env and change the model string whenever you like.

### How can an agent send email without setting up DNS?

Every agent gets its own mailbox at its address on mail.openonion.ai after `co auth`. It is an OpenOnion-hosted service, so there is no Resend or SendGrid account and no SPF, DKIM or MX records to add. `co email send` sends; bare `co email` shows the inbox.

### How does Gmail or Outlook work without my own OAuth app?

`co auth google` and `co auth microsoft` run the consent through OpenOnion's OAuth app, so there is no cloud project, consent screen or review queue on your side. The credentials come back encrypted to a one-time key your CLI generated and are saved only on your computer.

### Is agent traffic end-to-end encrypted?

No. Traffic between an agent and people outside your network passes through the OpenOnion relay, which terminates TLS and can read it.

### How do I control what an agent is allowed to do?

Dangerous tools — bash, shell, file writes, background tasks, email, delete — stop and ask for approval in the chat UI when one is attached, and file edits arrive as a diff. Custom tools you add run without asking unless you list them in .co/host.yaml. Remote agents calling yours with `co call` can only run what your .co/host.yaml whitelist names.

### Which models does it work with?

OpenAI, Anthropic, Google, Groq, Grok, OpenRouter and Mistral, or managed keys through the `co/` prefix. The model is a string you can change.

## Links

- [Home](https://connectonion.com/): connect your AI agent to Gmail, a real browser and your files — one command each
- [Documentation](https://docs.connectonion.com): Guides, quickstart and API reference
- [GitHub](https://github.com/openonion/connectonion): Source code, Apache-2.0
- [PyPI](https://pypi.org/project/connectonion/): pip install connectonion
- [Discord](https://discord.gg/4xfD9k8AUF): Community and support
- [Manifesto](https://connectonion.com/manifesto): why we build it this way
