KosmoKrator

data

Freshservice CLI for AI Agents

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

Freshservice CLI Setup

Freshservice can be configured headlessly with `kosmokrator integrations:configure freshservice`.

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 freshservice --set api_key="$FRESHSERVICE_API_KEY" --set domain="$FRESHSERVICE_DOMAIN" --enable --read allow --write ask --json
kosmokrator integrations:doctor freshservice --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
api_key FRESHSERVICE_API_KEY Secret secret yes API Key
domain FRESHSERVICE_DOMAIN Text string yes Domain

Command Patterns

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

Generic CLI call
kosmo integrations:call freshservice.freshservice_list_tickets '{"page":1,"per_page":1,"filter":"example_filter"}' --json
Provider shortcut
kosmo integrations:freshservice freshservice_list_tickets '{"page":1,"per_page":1,"filter":"example_filter"}' --json

Discovery

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

Discovery commands
kosmo integrations:docs freshservice --json
kosmo integrations:docs freshservice.freshservice_list_tickets --json
kosmo integrations:schema freshservice.freshservice_list_tickets --json
kosmo integrations:search "Freshservice" --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.

freshservice.freshservice_list_tickets

List support tickets from Freshservice. Supports pagination and predefined filters (e.g., new_and_my_open, watching, spam, deleted). Returns ticket summaries including subject, status, priority, and requester.

Read read
Parameters
page, per_page, filter
Generic call
kosmo integrations:call freshservice.freshservice_list_tickets '{"page":1,"per_page":1,"filter":"example_filter"}' --json
Shortcut
kosmo integrations:freshservice freshservice_list_tickets '{"page":1,"per_page":1,"filter":"example_filter"}' --json

freshservice.freshservice_get_ticket

Get full details of a specific Freshservice ticket by its ID, including description, status, priority, requester, assigned agent, and custom fields.

Read read
Parameters
ticket_id
Generic call
kosmo integrations:call freshservice.freshservice_get_ticket '{"ticket_id":1}' --json
Shortcut
kosmo integrations:freshservice freshservice_get_ticket '{"ticket_id":1}' --json

freshservice.freshservice_create_ticket

Create a new support ticket in Freshservice. Requires a subject and description. Optionally specify the requester email and priority (1=Low, 2=Medium, 3=High, 4=Urgent).

Write write
Parameters
subject, description, email, priority
Generic call
kosmo integrations:call freshservice.freshservice_create_ticket '{"subject":"example_subject","description":"example_description","email":"example_email","priority":1}' --json
Shortcut
kosmo integrations:freshservice freshservice_create_ticket '{"subject":"example_subject","description":"example_description","email":"example_email","priority":1}' --json

freshservice.freshservice_update_ticket

Update an existing Freshservice ticket. You can change status, priority, assigned agent, add tags, or modify any writable field.

Write write
Parameters
ticket_id, subject, description, priority, status, responder_id, tags
Generic call
kosmo integrations:call freshservice.freshservice_update_ticket '{"ticket_id":1,"subject":"example_subject","description":"example_description","priority":1,"status":1,"responder_id":1,"tags":"example_tags"}' --json
Shortcut
kosmo integrations:freshservice freshservice_update_ticket '{"ticket_id":1,"subject":"example_subject","description":"example_description","priority":1,"status":1,"responder_id":1,"tags":"example_tags"}' --json

freshservice.freshservice_delete_ticket

Delete a support ticket from Freshservice. This action permanently removes the ticket and its conversations.

Write write
Parameters
ticket_id
Generic call
kosmo integrations:call freshservice.freshservice_delete_ticket '{"ticket_id":1}' --json
Shortcut
kosmo integrations:freshservice freshservice_delete_ticket '{"ticket_id":1}' --json

freshservice.freshservice_list_agents

List all agents (support staff) in the Freshservice account. Returns agent profiles including name, email, and availability.

Read read
Parameters
page
Generic call
kosmo integrations:call freshservice.freshservice_list_agents '{"page":"example_page"}' --json
Shortcut
kosmo integrations:freshservice freshservice_list_agents '{"page":"example_page"}' --json

freshservice.freshservice_get_agent

Get details of a specific Freshservice agent by their ID, including name, email, role, and availability status.

Read read
Parameters
agent_id
Generic call
kosmo integrations:call freshservice.freshservice_get_agent '{"agent_id":1}' --json
Shortcut
kosmo integrations:freshservice freshservice_get_agent '{"agent_id":1}' --json

freshservice.freshservice_list_assets

List IT assets from Freshservice. Supports pagination. Returns asset summaries including name, asset type, and state.

Read read
Parameters
page
Generic call
kosmo integrations:call freshservice.freshservice_list_assets '{"page":1}' --json
Shortcut
kosmo integrations:freshservice freshservice_list_assets '{"page":1}' --json

freshservice.freshservice_get_asset

Get full details of a specific Freshservice asset by its display ID, including name, type, state, location, and custom fields.

Read read
Parameters
asset_id
Generic call
kosmo integrations:call freshservice.freshservice_get_asset '{"asset_id":1}' --json
Shortcut
kosmo integrations:freshservice freshservice_get_asset '{"asset_id":1}' --json

freshservice.freshservice_get_current_user

Get the profile of the currently authenticated Freshservice agent. Useful for identifying which agent is performing actions.

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

Function Schemas

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

freshservice.freshservice_list_tickets 3 parameters
Schema command
kosmo integrations:schema freshservice.freshservice_list_tickets --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (1-based).
per_page integer no Number of tickets per page (max 100).
filter string no Predefined filter: "new_and_my_open", "watching", "spam", or "deleted".
freshservice.freshservice_get_ticket 1 parameters
Schema command
kosmo integrations:schema freshservice.freshservice_get_ticket --json
ParameterTypeRequiredDescription
ticket_id integer yes The ticket display ID.
freshservice.freshservice_create_ticket 4 parameters
Schema command
kosmo integrations:schema freshservice.freshservice_create_ticket --json
ParameterTypeRequiredDescription
subject string yes The ticket subject / title.
description string yes The ticket description (supports HTML).
email string no Email address of the requester.
priority integer no Priority level: 1=Low, 2=Medium, 3=High, 4=Urgent.
freshservice.freshservice_update_ticket 7 parameters
Schema command
kosmo integrations:schema freshservice.freshservice_update_ticket --json
ParameterTypeRequiredDescription
ticket_id integer yes The ticket display ID.
subject string no Updated ticket subject.
description string no Updated ticket description (supports HTML).
priority integer no Priority level: 1=Low, 2=Medium, 3=High, 4=Urgent.
status integer no Status: 2=Open, 3=Pending, 4=Resolved, 5=Closed.
responder_id integer no ID of the agent to assign the ticket to.
tags array no Array of tag strings to set on the ticket.
freshservice.freshservice_delete_ticket 1 parameters
Schema command
kosmo integrations:schema freshservice.freshservice_delete_ticket --json
ParameterTypeRequiredDescription
ticket_id integer yes The ticket display ID to delete.
freshservice.freshservice_list_agents 1 parameters
Schema command
kosmo integrations:schema freshservice.freshservice_list_agents --json
ParameterTypeRequiredDescription
page string no Page cursor for pagination — pass the value from a previous response to get the next page.
freshservice.freshservice_get_agent 1 parameters
Schema command
kosmo integrations:schema freshservice.freshservice_get_agent --json
ParameterTypeRequiredDescription
agent_id integer yes The agent ID.
freshservice.freshservice_list_assets 1 parameters
Schema command
kosmo integrations:schema freshservice.freshservice_list_assets --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (1-based).
freshservice.freshservice_get_asset 1 parameters
Schema command
kosmo integrations:schema freshservice.freshservice_get_asset --json
ParameterTypeRequiredDescription
asset_id integer yes The asset display ID.
freshservice.freshservice_get_current_user 0 parameters
Schema command
kosmo integrations:schema freshservice.freshservice_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.