> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kylon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# connection

> Manage connection webhooks and contacts; read events and drafts.

```text theme={null}
kylon workspace connection — kylon workspace help detail

connection — inbound webhooks, contacts, activity, and drafts for connected services
  A Connection attaches an external data source to the workspace: an account you call out to, or a webhook that pushes events in. Contacts identify addressable recipients. Events are locally persisted Email and IM activity and may be incomplete. Drafts are canonical, editable outbound messages shown as Draft Cards.


  kylon workspace connection list
    List connections usable by this activation, including verified delegated access, with stable Connection IDs for later commands.

  kylon workspace connection search --query <keywords> [--limit <n>] [--cursor <cursor>]
    Search supported outbound and inbound providers. Results identify backend, toolkit, setup kind, and runtime credential constraints.

  kylon workspace connection owner discover --toolkit <toolkit> [--limit <n>]
    Find workspace users who own a matching connection and whether they are in the current room. Returns routing metadata only, never connection IDs or account details.

  kylon workspace connection run --connection <connection_id> [--activity-label <display_label>] -- <command> [args...]
    Run exactly one local child command with environment variables from one persistently granted native Connection. Use --activity-label only for a concise, non-sensitive Connection display name shown in execution activity; account identifiers, URLs, resource IDs, credentials, shell expressions, and opaque tokens are rejected. It does not rename the Connection. The live external assignment and gateway are revalidated before each command, and resolved values are redacted from child output. Never print, echo, inspect, or interpolate them.

  kylon workspace connection tool search --toolkit <toolkit> --query <keywords> [--connection <connection_id>] [--limit <n>] [--cursor <cursor>]
    Search exact tool slugs and JSON input schemas. MCP toolkits require --connection because each server exposes its own tools.

  kylon workspace connection tool execute --tool <slug> [--connection <connection_id>] [--json <arguments_json>]
    Execute connected-tool calls in interactive chat, including multiple calls that run in parallel. Run tool search first. Execution uses the assignment's delegated authority and is metered by the connection proxy. Draft and Email results are presented as cards. Raw JSON must be an object shaped like the returned schema.

  kylon workspace connection create --toolkit <toolkit> [--intent <kind>] [--task-summary <text>] [--cadence <text>]
    Send the current user an authorization card for an exact auth-link toolkit. Run connection search first. Classify the task as one_off_access, realtime_delivery, scheduled_digest, context_discovery, or unknown; scheduled_digest requires cadence. Omitted intent stays fail-closed. The live assignment determines the connection owner and card audience; do not repeat the fallback URL after the card is sent.

  kylon workspace connection secret add --name <name> --key <ENV_VAR[,ENV_VAR...]> --provider-url <url> [--usage <text>]
    Send the current user one prefilled secure card for adding an API service. List every environment variable the SDK or CLI reads in --key (comma-separated) so the user pastes all values into one form; never send one card per key. Resolve the service name, the variables, and the official provider URL from the user's request or verified official documentation found through web search; ask only if they cannot be confirmed reliably. When the user saves, the service is granted to this agent. Never ask for or accept a value in chat or another command.

  kylon workspace connection secret update --connection <connection_id>
    Send the owner a secure card for rotating an API Key Connection already granted to this agent. Use its exact connection id. Missing or unauthorized targets fail and never fall back to create. Never ask for or accept the value in chat or another command.

  kylon workspace connection mcp add --url <server_url>
    Send the current user a card for configuring a Remote MCP server with the exact Streamable HTTP endpoint prefilled. If the user did not provide it, resolve it from verified official provider documentation found through web search. Ask the user only if it cannot be confirmed reliably; never invent one or substitute a homepage or documentation URL. The user reviews it and supplies authentication. It is available only inside a live human-triggered assignment and sends the card to the current room.

  kylon workspace connection webhook create --name <name> [--room <room_id>]
    Create an inbound webhook and return its URL once. Any system that can POST JSON can send events to it; each event opens its own thread in the bound room and activates that room's main agent. Defaults to the current room. Use this — not a webhook-triggered workflow — when inbound events should be handled as conversations. Payload: required "title", optional "_content" body, optional "_event_id" for idempotency; all other fields are preserved for the agent. The URL carries the token and is never shown again: give it once to the person who asked, then do not repeat it in a later message, a file, or another command.
  kylon workspace connection webhook list
    List this agent's webhooks with their bound room, status, and last event time.
  kylon workspace connection webhook rotate --id <endpoint_id>
    Issue a new URL and invalidate the old one. Use after a leak or a lost URL; the room binding and existing threads are unaffected. The new URL needs the same handling as the original.
  kylon workspace connection webhook revoke --id <endpoint_id>
    Stop accepting events. Threads the webhook already opened are unchanged.

  kylon workspace connection understand <connection_id>
    With the owner's consent, analyze an Email Connection to learn their writing style. Run only when the owner asks. The result becomes available on a later turn.

  kylon workspace connection meeting-prep prepare --json <setup_json>
    Dev Eval setup preview only. In a private owner-and-Agent conversation, suggest categories from authorized calendar context and send the setup card. JSON: {connectionId, preferences?: {categories: ["customers", "partners"], conditions: "", readyBeforeMinutes: 60}}. Other categories: recruiting, internal.
  kylon workspace connection meeting-prep apply <connection_id>
    Apply only in the live turn from the owner's card click. Save preferences, a private Room and a paused Automation. Automatic preparation is not available yet.
  kylon workspace connection meeting-prep status <connection_id>
    Read saved preferences and setup availability on behalf of the connection owner.
  kylon workspace connection meeting-prep pause <connection_id>
    Pause after a live owner request. Keep the Room and invalidate outstanding setup cards.

  kylon workspace connection delivery status <connection_id>
    Show whether inbound delivery is unconfigured, explicitly disabled, active through an Automation, or fail-closed because its stored Automation or derived Room is unavailable.
  kylon workspace connection delivery prepare --json <setup_json>
    After conversationally confirming all-email or filtered real-time delivery, provide connectionId, policy, and an optional privateRoomName. The server discovers and ranks suitable Rooms and sends the canonical destination card with create-private and Not-now choices.
  kylon workspace connection delivery apply <connection_id>
    Run in the live turn created by the destination click. The server authenticates the immutable receipt, revalidates the Room and privacy boundary, creates exact canonical Automation source/hash, then binds only after creation succeeds.
  kylon workspace connection delivery disable <connection_id>
    After the user asks in this live turn, disable automatic inbound delivery. Existing reply-to-thread routing is unchanged.

  kylon workspace connection contact list --connection <connection_id> [--query <name-email-or-phone>] [--kind email_address|direct|group|room] [--status active|unavailable] [--limit <n>]
    Search addressable recipients for one Connection. Returned Contact IDs are internal identifiers for subsequent commands.
  kylon workspace connection contact get --id <contact_id>
    Read one Contact selected by list. LINE destination IDs remain internal.
  kylon workspace connection contact create --connection <connection_id> --address <email-or-whatsapp-number> [--name <display_name>] [--kind email_address|direct]
    Create or reuse an Email or WhatsApp recipient. LINE Contacts are discovered from inbound conversations.

  kylon workspace connection event list --connection <connection_id> [--query <text>] [--conversation <id>] [--direction inbound|outbound|unknown] [--since <date>] [--until <date>] [--latest-inbound] [--limit <n>] [--cursor <cursor>]
    Search locally persisted Events. Results include sender, conversation, subject, content preview, and attachment count. Inspect the returned collection start, status, and coverage warning. --latest-inbound returns conversations whose latest locally collected message is inbound and defaults to 20 results.
  kylon workspace connection event get --id <event_id>
    Read one Event selected by list, including its collection coverage warning.

  kylon workspace connection draft list [--query <text>] [--recipient <email-or-name>] [--subject <text>] [--type email|im|social] [--connection <connection_id>] [--status <status[,status...]>] [--since <date>] [--until <date>] [--limit <n>]
    Find visible Drafts and return their IDs. Statuses: draft, scheduled, sending, sent, failed, delivery_unknown, discarded.
  kylon workspace connection draft get --id <draft_id>
    Return the canonical Content and version required by revise.
  kylon workspace connection draft revise --id <draft_id> --expected-version <n> --json <content_json> [--quote-event-id <event_id>] [--clear-quote true]
    Replace the full Content returned by get when the version matches. Raw JSON needs no shell quotes.

Note: quote flag values that contain spaces; follow each command's JSON syntax.
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.