productivity
Intercom CLI for AI Agents
Use the Intercom CLI from KosmoKrator to call Intercom tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Intercom CLI Setup
Intercom can be configured headlessly with `kosmokrator integrations:configure intercom`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure intercom --set access_token="$INTERCOM_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor intercom --json
kosmokrator integrations:status --json Credentials
Authentication type: Bearer token bearer_token. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
access_token | INTERCOM_ACCESS_TOKEN | Secret secret | yes | Access Token |
base_url | INTERCOM_BASE_URL | URL url | no | API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call intercom.intercom_list_conversations '{"limit":1,"starting_after":"example_starting_after","sort_order":"example_sort_order","status":"example_status"}' --json kosmo integrations:intercom intercom_list_conversations '{"limit":1,"starting_after":"example_starting_after","sort_order":"example_sort_order","status":"example_status"}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs intercom --json
kosmo integrations:docs intercom.intercom_list_conversations --json
kosmo integrations:schema intercom.intercom_list_conversations --json
kosmo integrations:search "Intercom" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
intercom.intercom_list_conversations
List Intercom conversations with pagination and sorting. Returns conversation IDs, created dates, and state. Use limit, starting_after, and sort_order for pagination and ordering.
read - Parameters
- limit, starting_after, sort_order, status
kosmo integrations:call intercom.intercom_list_conversations '{"limit":1,"starting_after":"example_starting_after","sort_order":"example_sort_order","status":"example_status"}' --json kosmo integrations:intercom intercom_list_conversations '{"limit":1,"starting_after":"example_starting_after","sort_order":"example_sort_order","status":"example_status"}' --json intercom.intercom_get_conversation
Retrieve an Intercom conversation by its ID. Returns the full conversation including message parts, contacts, and metadata.
read - Parameters
- conversation_id
kosmo integrations:call intercom.intercom_get_conversation '{"conversation_id":"example_conversation_id"}' --json kosmo integrations:intercom intercom_get_conversation '{"conversation_id":"example_conversation_id"}' --json intercom.intercom_create_conversation
Create a new conversation in Intercom. Requires a user_id (Intercom contact ID) and a message body. Returns the created conversation with its ID.
write - Parameters
- user_id, body
kosmo integrations:call intercom.intercom_create_conversation '{"user_id":"example_user_id","body":"example_body"}' --json kosmo integrations:intercom intercom_create_conversation '{"user_id":"example_user_id","body":"example_body"}' --json intercom.intercom_list_contacts
List Intercom contacts with pagination. Returns contact IDs, emails, names, and roles. Use limit and starting_after for pagination.
read - Parameters
- limit, starting_after
kosmo integrations:call intercom.intercom_list_contacts '{"limit":1,"starting_after":"example_starting_after"}' --json kosmo integrations:intercom intercom_list_contacts '{"limit":1,"starting_after":"example_starting_after"}' --json intercom.intercom_get_contact
Retrieve an Intercom contact by its ID. Returns the contact's ID, email, name, phone, role, and custom attributes.
read - Parameters
- contact_id
kosmo integrations:call intercom.intercom_get_contact '{"contact_id":"example_contact_id"}' --json kosmo integrations:intercom intercom_get_contact '{"contact_id":"example_contact_id"}' --json intercom.intercom_list_companies
List Intercom companies with pagination. Returns company IDs, names, and employee counts. Use limit and starting_after for pagination.
read - Parameters
- limit, starting_after
kosmo integrations:call intercom.intercom_list_companies '{"limit":1,"starting_after":"example_starting_after"}' --json kosmo integrations:intercom intercom_list_companies '{"limit":1,"starting_after":"example_starting_after"}' --json intercom.intercom_get_current_user
Retrieve the currently authenticated Intercom admin user. Returns the admin's ID, name, email, and avatar. Useful for identifying which workspace or token is in use.
read - Parameters
- none
kosmo integrations:call intercom.intercom_get_current_user '{}' --json kosmo integrations:intercom intercom_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
intercom.intercom_list_conversations 4 parameters
kosmo integrations:schema intercom.intercom_list_conversations --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of conversations to return (default 20). |
starting_after | string | no | Pagination cursor from a previous response. |
sort_order | string | no | Sort order: "asc" or "desc". |
status | string | no | Filter by conversation status: "open", "closed", or "all". |
intercom.intercom_get_conversation 1 parameters
kosmo integrations:schema intercom.intercom_get_conversation --json | Parameter | Type | Required | Description |
|---|---|---|---|
conversation_id | string | yes | Intercom conversation ID. |
intercom.intercom_create_conversation 2 parameters
kosmo integrations:schema intercom.intercom_create_conversation --json | Parameter | Type | Required | Description |
|---|---|---|---|
user_id | string | yes | Intercom contact ID (user) to create the conversation for. |
body | string | yes | Initial message body for the conversation. |
intercom.intercom_list_contacts 2 parameters
kosmo integrations:schema intercom.intercom_list_contacts --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of contacts to return (default 20). |
starting_after | string | no | Pagination cursor from a previous response. |
intercom.intercom_get_contact 1 parameters
kosmo integrations:schema intercom.intercom_get_contact --json | Parameter | Type | Required | Description |
|---|---|---|---|
contact_id | string | yes | Intercom contact ID. |
intercom.intercom_list_companies 2 parameters
kosmo integrations:schema intercom.intercom_list_companies --json | Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of companies to return (default 20). |
starting_after | string | no | Pagination cursor from a previous response. |
intercom.intercom_get_current_user 0 parameters
kosmo integrations:schema intercom.intercom_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.