
# Connect an agent

You can connect a local AI assistant - Claude Desktop, Claude Code, an
OpenClaw-class agent, or any MCP-capable agent - to SweetHive. It connects with a
**scoped access token** that never exceeds what you can see, and that you can revoke
at any time.

## Create a connection

1. Open **My agents** from the home rail (or *Settings → Connected agents*).
2. Choose **Connect an agent**.
3. Name it, pick the **hives and contexts** it may access, choose a **capability**
   and an **expiry**.
4. Create the token. **Copy it (shown once)** or download the config bundle.
5. Register the connector with your local agent using the bundle - see
   [MCP connector setup](/en/mcp-connector/).

## Where the agent runs

When you create the agent you choose where it runs:

- **Your SweetHive Agents Node** - the app on your computer, with local
  models. The agent answers while the computer is on.
- **The company server** - if your organization has an
  [Agents Server](/en/agents-server/), it shows up as a destination, with how
  many agents you can still host there. Nothing to install: the agent lives on
  the server, in an isolated space that is yours alone.
- **Bundle to import** - you download the configuration and import it into a
  compatible agent yourself.

> **Organization rule.** An organization can decide that its hives are
> readable **only by agents on the company servers**. If you pick a context of
> that organization, SweetHive tells you and offers the company server; agents
> already installed on a personal computer stop seeing those hives.

## Capabilities

| Capability | The agent can |
|---|---|
| **Read** (default) | read items and search in its scope |
| **Read + draft** | also prepare drafts for you to send |
| **Read + post** | also publish posts and replies as you - it confirms the exact text with you in chat first |

## What stays safe

- The token's scope is **intersected with your live visibility on every request**.
  Leave a group, and the token loses that access at the same instant.
- **Read-only is the default.** Posting needs a Read + post token, and the agent
  confirms the exact text with you in the chat before anything is published.
- Anything a connected agent posts is attributed **“via you”** and obeys the same
  group targeting as any message.
- **Revoke** a token in one click from its card - access stops immediately.
- Every token's card shows when it was last used and how much it has read, and hive
  admins can allow, restrict to read-only, or block external agents on their hive
  entirely.

> Your agent runs **outside** SweetHive. Anything the token can read, treat as being
> on your machine - so scope it tightly: the contexts it needs, nothing more.

## See your agents at work

The **My agents** page lists every token with its scope, capability, expiry and a
live **online** indicator (the agent has checked in recently). From a context, you
can also see which of your agents currently cover it.
