The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
docs(channels): document channel and chat features
Steven Enamakel36f7928bb8a0
diff --git a/gitbooks/features/channels.md b/gitbooks/features/channels.mdindex 879007e521..2352b1df65 100644--- a/gitbooks/features/channels.md+++ b/gitbooks/features/channels.md@@ -1,94 +1,86 @@---description: >-- Messaging platforms OpenHuman talks back to you on: inbound dispatch into the- agent loop, outbound replies and proactive delivery, and per-channel- credentials.+ Messaging apps OpenHuman talks back to you on: how messages reach the agent,+ how replies and proactive messages go out, and how each channel signs in.icon: messages-square----# Messaging Channels+# Messaging channels-A **channel** is a messaging platform OpenHuman uses to _talk back_ to you. This is the mirror image of an [integration](integrations/README.md): an integration is mostly a source the agent _reads from_ (your inbox, your calendar, your CRM), while a channel is a two-way conversation surface. You message the agent on a platform you already use, and the agent replies there.+A channel is a messaging app the agent uses to talk to you. You message the agent on a platform you already use, and it replies there. A channel is the opposite of an [integration](integrations/README.md). An integration is mostly something the agent reads from, such as your inbox, calendar or CRM. A channel is a two-way conversation.-Under the hood every channel implements one small Rust contract (a `send` path for outbound messages and a `listen` path for inbound ones), so the same agent loop serves Telegram, Discord, the built-in web chat, and a dozen others without per-platform branching in the core.-----+Every channel follows the same small contract: one path to send messages and one to listen. That is why the same agent loop can serve Telegram, Discord, the built-in web chat and a dozen others without per-platform code.## What a channel does-Each channel does two things:+A channel handles two directions.-- **Inbound**: when a message arrives, the channel normalizes it into a `ChannelMessage` (sender, reply target, content, optional thread id) and hands it to the dispatch loop. Dispatch spawns or resumes an agent run, scopes its tools, and the agent works the request. Some platforms support a `/models` and `/model` command to switch the model for that sender's session; Telegram additionally supports remote-control commands.-- **Outbound**: the agent's response is sent back through the same channel to your `reply_target`, threaded when the platform supports it. Channels can also deliver **proactively** (no incoming message to reply to) when fired by a [trigger](integrations/triggers.md) or a cron job. A channel only receives proactive sends if it advertises a default delivery target; channels without one are skipped rather than posted to an empty recipient.+**Inbound.** When a message arrives, the channel turns it into a standard message (sender, reply target, content, optional thread id) and hands it to the dispatch loop. Dispatch starts or resumes an agent run, limits its tools, and the agent works on the request. Some platforms support `/models` and `/model` to switch the model for that sender's session. Telegram also supports remote-control commands.-Channels that support it can show a typing indicator, stream progressive **draft updates**, post **threaded replies**, and add **emoji reactions**. Capabilities are declared per channel, not assumed.+**Outbound.** The agent's reply goes back through the same channel to your reply target, in a thread when the platform supports it. A channel can also send proactively, with no incoming message, when a [trigger](integrations/triggers.md) or a cron job fires. A channel receives proactive messages only if it has a default delivery target. Channels without one are skipped.----+Where the platform allows it, channels can show a typing indicator, stream draft updates, post threaded replies and add emoji reactions. Each channel declares what it supports.## Supported channels-OpenHuman ships **15 channel provider modules**, of which **14 compile into the shipped desktop build**: WhatsApp Web sits behind the `whatsapp-web` Cargo feature, which is in neither the contributor default set nor the shipped product set, so it is an opt-in build rather than something you can switch on. Alongside them, the in-app **Web** chat is built into the app rather than being a provider module, and a separate `cli` channel serves the `openhuman-core` terminal binary. **Eight** channels have a setup flow in the app (Telegram, Discord, Web, iMessage, Lark/Feishu, DingTalk, Email, 元宝); the rest are enabled by hand in `config.toml`.+OpenHuman has 15 channel providers. 14 are built into the shipped desktop app. WhatsApp Web sits behind the `whatsapp-web` build feature, which the shipped app does not enable, so you can't switch it on. The in-app Web chat is built in and is not a provider. A separate `cli` channel serves the `openhuman-core` terminal binary. Eight channels have a setup flow in the app: Telegram, Discord, Web, iMessage, Lark/Feishu, DingTalk, Email and 元宝 (Yuanbao). You turn on the rest by hand in `config.toml`.-Matrix is the one to know about: a `[channels.matrix]` stanza is still accepted by the config parser, but the provider was removed from the build. It is logged and skipped, so a Matrix config does nothing.+Matrix is no longer supported. The config parser still accepts a `[channels.matrix]` section, but the provider was removed, so it is logged and skipped.-| Channel | Direction | Inbound transport | Credential mode | In Settings UI |+| Channel | Direction | Inbound transport | Credentials | In Settings UI || ------------------ | ------------- | ---------------------------- | ------------------------------------------------------------------ | -------------- |-| **Telegram** | Two-way | Bot API long-poll | Connect via OpenHuman (managed DM) **or** your own BotFather token | Yes |-| **Discord** | Two-way | Gateway | Your own bot token, OAuth install, **or** managed account link | Yes |-| **Web** | Two-way | In-app | Built-in, no setup (local) | Yes |-| **iMessage** | Two-way | macOS Messages (AppleScript) | Local-only, no credentials (needs Full Disk Access) | Yes |-| **Lark / Feishu** | Two-way | WebSocket or webhook | Your own app id + secret | Yes |-| **DingTalk** | Two-way | Stream Mode WebSocket | Your own client id + secret | Yes |-| **元宝 (Yuanbao)** | Two-way | WebSocket | Your own AppID + AppSecret | Yes |-| **Slack** | Two-way | Events/socket | Your own bot token | `config.toml` |-| **WhatsApp** | Two-way | Meta Cloud webhook | Your own access token | `config.toml` |-| **IRC** | Two-way | Persistent socket | Your own server/nick | `config.toml` |-| **Signal** | Two-way | signal-cli REST events | Your own linked signal-cli account | `config.toml` |-| **Mattermost** | Two-way | WebSocket | Your own bot token | `config.toml` |-| **QQ** | Two-way | WebSocket | Your own bot credentials | `config.toml` |-| **Linq** | Two-way (SMS) | Webhook | Your own API token | `config.toml` |-| **Email** | Two-way | IMAP IDLE + SMTP | Your own mailbox credentials | `config.toml` |--WhatsApp also has an experimental peer-to-peer variant behind the `whatsapp-web` feature flag. Channels marked "webhook" keep a live connection alive but receive inbound messages by HTTP push, so they need a reachable HTTPS endpoint configured on the provider's side.--Telegram is the most fully featured channel. It supports typing indicators and live draft updates, and is currently the only channel wired to a per-channel approval surface, so `Prompt`-class tool calls can be answered inline rather than parked. Discord adds native threaded replies; Lark also threads. Web supports rich text and stays entirely local.--**Email deserves a special mention**: it is a fully **native, self-hosted connector**, with no third-party broker in the loop. Inbound mail arrives over IMAP with **IMAP IDLE** push (new mail reaches the agent in seconds, with the connection refreshed every ~29 minutes per the RFC), and replies go out over SMTP with full attachment/multipart support, from your own address on any provider you configure. An `allowed_senders` allowlist is the inbound security gate. Set it explicitly to the addresses you trust. (In `config.toml` an empty list means deny-all, but the Connections UI defaults a blank field to `["*"]`, which allows **any** sender. So don't leave it blank if strangers shouldn't be able to prompt your agent by email.)+| Telegram | Two-way | Bot API long-poll | Connect via OpenHuman (managed DM) or your own BotFather token | Yes |+| Discord | Two-way | Gateway | Your own bot token, OAuth install, or managed account link | Yes |+| Web | Two-way | In-app | Built in, no setup (local) | Yes |+| iMessage | Two-way | macOS Messages (AppleScript) | Local only, no credentials (needs Full Disk Access) | Yes |+| Lark / Feishu | Two-way | WebSocket or webhook | Your own app id and secret | Yes |+| DingTalk | Two-way | Stream Mode WebSocket | Your own client id and secret | Yes |+| 元宝 (Yuanbao) | Two-way | WebSocket | Your own AppID and AppSecret | Yes |+| Slack | Two-way | Events/socket | Your own bot token | `config.toml` |+| WhatsApp | Two-way | Meta Cloud webhook | Your own access token | `config.toml` |+| IRC | Two-way | Persistent socket | Your own server and nick | `config.toml` |+| Signal | Two-way | signal-cli REST events | Your own linked signal-cli account | `config.toml` |+| Mattermost | Two-way | WebSocket | Your own bot token | `config.toml` |+| QQ | Two-way | WebSocket | Your own bot credentials | `config.toml` |+| Linq | Two-way (SMS) | Webhook | Your own API token | `config.toml` |+| Email | Two-way | IMAP IDLE and SMTP | Your own mailbox credentials | Yes |----+WhatsApp also has an experimental peer-to-peer variant behind the `whatsapp-web` feature. Channels that use a webhook receive messages by HTTP push, so they need an HTTPS endpoint that the provider can reach.-## Credential modes+Telegram has the most features. It supports typing indicators and live draft updates, and it is the only channel with its own approval surface, so approval prompts can be answered inline. Discord adds native threaded replies, and Lark threads too. Web supports rich text and stays entirely local.-Channels authenticate one of a few ways:-- **Connect via OpenHuman (managed)**: a one-click, encrypted connection brokered through the OpenHuman backend. Today this covers Telegram (message the managed bot directly) and Discord (link your account or install via OAuth). No tokens live on your machine.-- **Your own credentials**: you supply a bot token, API key/secret, or app credentials. Telegram (BotFather token), Discord (bot token), Slack, WhatsApp, Lark/Feishu, DingTalk, Yuanbao, Signal, Mattermost, QQ, Linq, IRC, and Email all support this. Maximum control; you own the platform account, rate limits, and any webhook endpoint.-- **Local, no credentials**: the **Web** chat and **iMessage** need no tokens at all. Web runs inside the desktop app; iMessage drives the local macOS Messages app over an AppleScript bridge (grant Full Disk Access). Both keep messages on your machine.+Email is a native, self-hosted connector with no third-party broker. Inbound mail arrives over IMAP IDLE push, so new mail reaches the agent in seconds. The connection refreshes about every 29 minutes, as the RFC requires. Replies go out over SMTP with full attachment support, from your own address on any provider you configure.-Secrets supplied for any mode are stored through OpenHuman's credential layer and protected at rest by the [encryption layer](privacy-and-security.md). They are never written to `config.toml` in plaintext for the UI-managed channels.+An `allowed_senders` list controls who can reach the agent by email. Set it to the addresses you trust. In `config.toml`, an empty list denies everyone. The Connections UI is different: a blank field becomes `["*"]`, which allows any sender. Don't leave it blank if strangers should not be able to prompt your agent.----+## Credential modes-## Where to connect a channel+Channels sign in one of three ways.-Channels are set up under **Connections → Channels** in the left sidebar, **not** under Settings, and not under any "Automation & Channels" menu (no such menu exists). Open that tab, pick a platform tile, and follow its setup card:+- **Connect via OpenHuman (managed).** A one-click encrypted connection brokered by the OpenHuman backend. It covers Telegram (message the managed bot directly) and Discord (link your account or install through OAuth). No tokens are stored on your machine.+- **Your own credentials.** You supply a bot token, API key and secret, or app credentials. Telegram (BotFather token), Discord, Slack, WhatsApp, Lark/Feishu, DingTalk, Yuanbao, Signal, Mattermost, QQ, Linq, IRC and Email all support this. You get the most control, and you own the platform account, rate limits and any webhook endpoint.+- **Local, no credentials.** Web chat and iMessage need no tokens. Web runs inside the desktop app. iMessage drives the local macOS Messages app through AppleScript, so grant Full Disk Access. Both keep messages on your machine.-- **Discord**: choose _Connect via OpenHuman_ (link your account or install the bot via OAuth), or paste your own Discord bot token.-- **Telegram**: message the managed OpenHuman bot to link, or paste a BotFather bot token.+Secrets for any mode go through OpenHuman's credential layer and are encrypted at rest (see [Privacy and security](privacy-and-security.md)). Channels managed in the UI never write secrets to `config.toml` in plaintext.-Slack is connected as an **app** under **Connections → OAuth** (Composio) so the agent can read and act in Slack; it is not set up as a talk-back channel in the Channels tab.+## Where to connect a channel----+Set up channels under **Connections > Channels** in the left sidebar, not under Settings. Open that tab, pick a platform tile and follow its setup card:-## Choosing the default channel+- **Discord.** Choose Connect via OpenHuman (link your account or install the bot through OAuth), or paste your own bot token.+- **Telegram.** Message the managed OpenHuman bot to link, or paste a BotFather token.-Open **Connections → Channels** to pick which channel is the **active route**: the one OpenHuman uses for proactive, recipient-less delivery (cron, triggers). The default is the in-app **Web** chat until you change it. Setting a new default takes effect immediately, without restarting the channel runtime, and the panel shows which channel is currently active. Inbound messages always get answered on whatever channel they arrived on, regardless of the default route.+Slack is connected as an app under **Connections > OAuth** so the agent can read and act in Slack. It is not set up as a talk-back channel in the Channels tab.----+## Choosing the default channel++In **Connections > Channels** you can pick the active route, which is the channel used for proactive messages with no recipient, such as cron jobs and triggers. The default is the in-app Web chat. A new default takes effect immediately, with no restart, and the panel shows which channel is active. Replies to inbound messages always go back on the channel they came from, whatever the default is.## See also-- [Integrations](integrations/README.md): the read-side catalog the agent pulls context from.-- [Triggers](integrations/triggers.md): live events that fire proactive channel delivery.-- [Privacy & Security](privacy-and-security.md): where credentials live and the backend boundary.-- [OS Keyring & Secret Storage](os-keyring-and-secret-storage.md): at-rest protection for channel secrets.+- [Integrations](integrations/README.md): the catalog the agent pulls context from.+- [Triggers](integrations/triggers.md): live events that fire proactive channel messages.+- [Privacy and security](privacy-and-security.md): where credentials live and the backend boundary.+- [OS keyring and secret storage](os-keyring-and-secret-storage.md): at-rest protection for channel secrets.diff --git a/gitbooks/features/chat.md b/gitbooks/features/chat.mdindex 30ec7f3d0e..f96968081f 100644--- a/gitbooks/features/chat.md+++ b/gitbooks/features/chat.md@@ -1,78 +1,78 @@---description: >-- The chat surface: composer, slash commands, mentions, model and effort+ The chat screen: composer, slash commands, mentions, model and effortpickers, the context ring, the tool timeline, approvals, sub-agent cards,- artifacts and threads.+ files and threads.icon: comments---# Chat-Chat is where almost everything happens. It is not a text box with a send button: a turn here can call tools, spawn sub-agents, stop to ask you something, park an action for approval, produce files, and bill itself, and the transcript shows all of it in order.+Chat is where almost everything happens. A turn here can call tools, spawn sub-agents, stop to ask you a question, wait for your approval, produce files and track its own cost. The transcript shows all of it in order.-Open it at **Chat** in the sidebar, or `⌘N` for a new conversation.+Open it from **Chat** in the sidebar, or press `⌘N` for a new conversation.## The composer-The input is a rich text field rather than a plain one, which is what lets a `/` become a command chip and a popover anchor to the caret as you type. Alongside it:+The input is a rich text field. That is how a `/` becomes a command chip and a popover follows your cursor as you type. Around it you have:-- **Attach** files. An image, a PDF, an Office document or an archive is preserved in the working folder and offered to the model natively when the model and the route both support that type; otherwise it degrades to extracted text, a bounded readout, or an archive listing with accessible paths.-- **Model**, and a separate **thinking effort**. Both apply to this conversation, not globally.-- **Context ring**, which shows how full the context window is for this thread and opens a breakdown with per-sub-agent cost.-- **Voice**: tap to speak, or hand the turn to the live voice agent. See [Voice](native-tools/voice.md).-- When the box is empty, the mascot button takes you to the full-screen [mascot](mascot/README.md) stage.+- **Attach**. Images, PDFs, Office documents and archives are saved in the working folder. The model gets them natively when both the model and the route support that type. Otherwise it gets extracted text, a short readout, or an archive listing.+- **Model** and **thinking effort**. Both apply to this conversation only, not globally.+- **Context ring**. It shows how full the context window is for this thread. Click it for a breakdown with the cost of each sub-agent.+- **Voice**. Tap to speak, or hand the turn to the live voice agent. See [Voice](native-tools/voice.md).+- **Mascot button**. When the box is empty, it opens the full-screen [mascot](mascot/README.md) stage.### Slash commands-Typing `/` offers three sources at once: the built-ins (`/new`, `/clear`, `/stop`, `/plan`, `/build`), the core's own command list, and your installed skills and workflows.+Typing `/` lists the built-in commands (`/new`, `/clear`, `/stop`, `/plan`, `/build`), the core's own commands, and your installed skills and workflows.### Mentions-Typing `@` offers two sources: **memory**, searched as you type, and **files**, meaning the artifacts this thread has already produced. A mention becomes a chip, so the agent gets the reference rather than a guess at what you meant.+Typing `@` offers your memory, searched as you type, and the files this thread has already produced. A mention becomes a chip, so the agent gets the exact reference and does not have to guess.## Reading a turn-Each assistant turn groups its reasoning and its tool calls into one chronological block, so you can see what it thought and what it did in the order it happened rather than in two separate panes.+Each assistant turn puts its reasoning and tool calls in one block, in the order they happened.-- **Tool calls** render per tool: a search shows its queries and sources, a shell call shows its command and exit, a failed call shows a failure card with the reason rather than a stack trace. Every tool runs in the core; nothing executes in the browser.-- **Sources** appear as badges under an answer, up to four inline and then a count.-- **Timing and cost** are on the turn, and the context ring's breakdown attributes spend to the sub-agents that caused it.-- **Find in conversation** (`⌘F`) searches this thread only, and the right-edge rail jumps between turns.+- Tool calls render by tool. A search shows its queries and sources. A shell call shows its command and exit code. A failed call shows the reason, not a stack trace. Every tool runs in the core, never in the browser.+- Sources appear as badges under an answer: up to four, then a count.+- Timing and cost are shown on the turn. The context ring attributes spend to the sub-agents that caused it.+- **Find in conversation** (`⌘F`) searches this thread only. The rail on the right edge jumps between turns.-The action bar on an assistant turn has copy, regenerate, a thumbs up or down that is remembered, read-aloud, and export as Markdown. On your own turns you can edit and resend, which branches the conversation: the branch picker moves between versions.+An assistant turn has copy, regenerate, thumbs up or down (remembered), read aloud, and export as Markdown. On your own turns you can edit and resend. That branches the conversation, and the branch picker switches between versions.## When the agent needs you-Four different kinds of stop, all inline:+The agent can stop for four reasons, all shown inline:-| Stop | What it looks like |+| Stop | What you see || --- | --- |-| **Approval** | A card naming the tool and a redacted one-line summary of the action. Approve once, always allow that tool, or deny. See [Approval Gate](approval-gate.md). |-| **Permission** | A connector or provider needs authorizing; the card collects exactly the fields that provider needs. |-| **Clarification** | The agent asks a direct question and waits. |-| **Plan review** | A proposed plan with approve, reject, or revise-with-feedback. |+| Approval | A card naming the tool and a redacted one-line summary. Approve once, always allow that tool, or deny. See [Approval gate](approval-gate.md). |+| Permission | A connector or provider needs authorizing. The card asks for exactly the fields that provider needs. |+| Clarification | The agent asks a direct question and waits. |+| Plan review | A proposed plan. Approve it, reject it, or ask for a revision with feedback. |-A background or scheduled turn has nobody to ask, so an approval raised outside a live chat collects in a deck you can decide later. Undecided requests deny themselves after ten minutes.+A background or scheduled turn has nobody to ask. Approvals raised outside a live chat collect in a deck you can decide later. Undecided requests are denied after ten minutes.## Sub-agents-When a turn delegates, each child appears as its own card: a nested transcript, its own status, a reply box when it is waiting on you, and a cancel button. Delegation is asynchronous, so the parent keeps working and the card fills in as the child reports. Detached background agents, scheduled runs and memory syncs collect in a separate inbox card rather than interrupting the thread.+When a turn delegates work, each child gets its own card. The card has a nested transcript, a status, a reply box if the child is waiting on you, and a cancel button. Delegation is asynchronous, so the parent keeps working while the card fills in. Detached background agents, scheduled runs and memory syncs collect in a separate inbox card so they don't interrupt the thread.## Files the agent makes-Anything the agent produces that is meant for you, a document, a deck, an image, a render, becomes an artifact: a chip above the composer opens a panel with download, reveal in folder, and delete. Only finished artifacts persist across a restart; a failed one offers a retry.+Anything the agent produces for you, such as a document, a deck, an image or a render, becomes an artifact. A chip above the composer opens a panel where you can download it, reveal it in its folder, or delete it. Only finished artifacts survive a restart. A failed one offers a retry.## Workflow proposals-Ask for an automation and the agent proposes a graph. The proposal is validate-only: it arrives as a card with the node list and three choices, save and enable, dismiss, or open it on the canvas. That card is the only path from a proposal to a saved automation, which is deliberate. See [Workflows](workflows.md).+If you ask for an automation, the agent proposes a graph. The proposal is validate-only. It arrives as a card with the node list and three choices: save and enable, dismiss, or open on the canvas. That card is the only way to turn a proposal into a saved automation. See [Workflows](workflows.md).## Threads-The sidebar lists your conversations. You can create, select, rename inline, and delete behind a confirmation. Turns on different threads run **concurrently**, so starting something slow in one conversation does not block another.+The sidebar lists your conversations. You can create, select, rename and delete them (delete asks for confirmation). Turns on different threads run at the same time, so a slow task in one conversation does not block another.-Threads carry a goal and a to-do list when the agent sets them, shown as a pinned list and a banner with its token budget. Both are read-only in the UI today: the agent maintains them, you do not edit them there.+A thread can carry a goal and a to-do list that the agent sets. They show as a pinned list and a banner with the token budget. The agent maintains them. You can't edit them in the UI yet.-A long conversation is compacted rather than truncated. The compaction seals what came before and opens a new generation that records the sealed one as its parent, so nothing is deleted on disk even though the model only reads the head. There is no UI for browsing those generations yet.+A long conversation is compacted, not truncated. Compaction seals what came before and starts a new generation that points back to the sealed one. Nothing is deleted on disk, though the model reads only the latest generation. There is no UI for browsing older generations yet.## Keyboard@@ -87,11 +87,11 @@ A long conversation is compacted rather than truncated. The compaction seals wha## Not here yet-Stated so you don't go looking: there is no thread search, pinning, folders or archiving in the sidebar; no UI for setting a thread goal or ticking a to-do; no browser for compaction generations; and follow-up suggestion chips are built but have no producer, so the row stays empty.+So you don't go looking: the sidebar has no thread search, pinning, folders or archiving. There is no UI to set a thread goal or tick a to-do, and no browser for compaction generations. Follow-up suggestion chips exist in the UI but nothing produces them yet, so that row stays empty.## See also- [Memory](memory.md): what the agent recalls before it answers, and what it writes after.- [The Orchestrator](orchestration.md): how delegation is planned.-- [Available Tools](native-tools/README.md): what those tool cards are calling.-- [Notifications & Activity](notifications-and-activity.md): what happens when a turn finishes while you are elsewhere.+- [Available tools](native-tools/README.md): what those tool cards are calling.+- [Notifications and activity](notifications-and-activity.md): what happens when a turn finishes while you are elsewhere.