KosmoKrator

productivity

Freshchat CLI for AI Agents

Use the Freshchat CLI from KosmoKrator to call Freshchat tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Freshchat CLI Setup

Freshchat can be configured headlessly with `kosmokrator integrations:configure freshchat`.

Install, configure, and verify
# 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 freshchat --set access_token="$FRESHCHAT_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor freshchat --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.

KeyEnv varTypeRequiredLabel
access_token FRESHCHAT_ACCESS_TOKEN Secret secret yes Access Token
url FRESHCHAT_URL URL url no API Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call freshchat.freshchat_list_conversations '{"page":1,"per_page":1,"status":"example_status","inbox_id":"example_inbox_id"}' --json
Provider shortcut
kosmo integrations:freshchat freshchat_list_conversations '{"page":1,"per_page":1,"status":"example_status","inbox_id":"example_inbox_id"}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs freshchat --json
kosmo integrations:docs freshchat.freshchat_list_conversations --json
kosmo integrations:schema freshchat.freshchat_list_conversations --json
kosmo integrations:search "Freshchat" --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.

freshchat.freshchat_list_conversations

List support conversations from Freshchat. Returns paginated results with optional filters for status and inbox. Use this to find recent or unresolved conversations.

Read read
Parameters
page, per_page, status, inbox_id
Generic call
kosmo integrations:call freshchat.freshchat_list_conversations '{"page":1,"per_page":1,"status":"example_status","inbox_id":"example_inbox_id"}' --json
Shortcut
kosmo integrations:freshchat freshchat_list_conversations '{"page":1,"per_page":1,"status":"example_status","inbox_id":"example_inbox_id"}' --json

freshchat.freshchat_get_conversation

Get full details of a specific Freshchat conversation by ID, including messages, participants, and metadata.

Read read
Parameters
id
Generic call
kosmo integrations:call freshchat.freshchat_get_conversation '{"id":"example_id"}' --json
Shortcut
kosmo integrations:freshchat freshchat_get_conversation '{"id":"example_id"}' --json

freshchat.freshchat_create_conversation

Create a new Freshchat conversation. Specify the user ID, an initial message, and optionally a channel ID. The conversation will be started with the provided message.

Write write
Parameters
user_id, initial_message, channel_id
Generic call
kosmo integrations:call freshchat.freshchat_create_conversation '{"user_id":"example_user_id","initial_message":"example_initial_message","channel_id":"example_channel_id"}' --json
Shortcut
kosmo integrations:freshchat freshchat_create_conversation '{"user_id":"example_user_id","initial_message":"example_initial_message","channel_id":"example_channel_id"}' --json

freshchat.freshchat_list_agents

List support agents in Freshchat. Returns paginated results with agent details such as name, email, and availability status.

Read read
Parameters
page, per_page
Generic call
kosmo integrations:call freshchat.freshchat_list_agents '{"page":1,"per_page":1}' --json
Shortcut
kosmo integrations:freshchat freshchat_list_agents '{"page":1,"per_page":1}' --json

freshchat.freshchat_get_agent

Get details of a specific Freshchat agent by ID, including name, email, availability, and assigned conversations.

Read read
Parameters
id
Generic call
kosmo integrations:call freshchat.freshchat_get_agent '{"id":"example_id"}' --json
Shortcut
kosmo integrations:freshchat freshchat_get_agent '{"id":"example_id"}' --json

freshchat.freshchat_list_groups

List support groups (teams) in Freshchat. Groups organize agents into teams for routing conversations.

Read read
Parameters
page, per_page
Generic call
kosmo integrations:call freshchat.freshchat_list_groups '{"page":1,"per_page":1}' --json
Shortcut
kosmo integrations:freshchat freshchat_list_groups '{"page":1,"per_page":1}' --json

freshchat.freshchat_get_current_user

Get the profile of the currently authenticated Freshchat user. Useful for verifying credentials and identifying the connected account.

Read read
Parameters
none
Generic call
kosmo integrations:call freshchat.freshchat_get_current_user '{}' --json
Shortcut
kosmo integrations:freshchat freshchat_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

freshchat.freshchat_list_conversations 4 parameters
Schema command
kosmo integrations:schema freshchat.freshchat_list_conversations --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of conversations per page (default: 50, max: 100).
status string no Filter by conversation status. Possible values: "new", "open", "pending", "resolved", "closed".
inbox_id string no Filter conversations belonging to a specific inbox by its ID.
freshchat.freshchat_get_conversation 1 parameters
Schema command
kosmo integrations:schema freshchat.freshchat_get_conversation --json
ParameterTypeRequiredDescription
id string yes The conversation ID.
freshchat.freshchat_create_conversation 3 parameters
Schema command
kosmo integrations:schema freshchat.freshchat_create_conversation --json
ParameterTypeRequiredDescription
user_id string yes The ID of the user to associate with the conversation.
initial_message string yes The first message to send in the conversation.
channel_id string no Optional channel ID to associate the conversation with a specific channel.
freshchat.freshchat_list_agents 2 parameters
Schema command
kosmo integrations:schema freshchat.freshchat_list_agents --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of agents per page (default: 50, max: 100).
freshchat.freshchat_get_agent 1 parameters
Schema command
kosmo integrations:schema freshchat.freshchat_get_agent --json
ParameterTypeRequiredDescription
id string yes The agent ID.
freshchat.freshchat_list_groups 2 parameters
Schema command
kosmo integrations:schema freshchat.freshchat_list_groups --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of groups per page (default: 50, max: 100).
freshchat.freshchat_get_current_user 0 parameters
Schema command
kosmo integrations:schema freshchat.freshchat_get_current_user --json
ParameterTypeRequiredDescription
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.