KosmoKrator

analytics

Amplitude Analytics CLI for AI Agents

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

7 functions 7 read 0 write API key auth

Amplitude Analytics CLI Setup

Amplitude Analytics can be configured headlessly with `kosmokrator integrations:configure amplitude`.

# 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 amplitude --set api_key="$AMPLITUDE_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor amplitude --json
kosmokrator integrations:status --json

Credentials

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

KeyEnv varTypeRequiredLabel
api_key AMPLITUDE_API_KEY Secret secret yes API Key
url AMPLITUDE_URL URL url no Amplitude URL

Call Amplitude Analytics Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call amplitude.amplitude_list_events '{
  "user_id": "example_user_id",
  "device_id": "example_device_id",
  "start": "example_start",
  "end": "example_end",
  "limit": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:amplitude amplitude_list_events '{
  "user_id": "example_user_id",
  "device_id": "example_device_id",
  "start": "example_start",
  "end": "example_end",
  "limit": 1
}' --json

Agent Discovery Commands

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

kosmo integrations:docs amplitude --json
kosmo integrations:docs amplitude.amplitude_list_events --json
kosmo integrations:schema amplitude.amplitude_list_events --json
kosmo integrations:search "Amplitude Analytics" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Amplitude Analytics.

amplitude.amplitude_list_events

Read read

List events from Amplitude Analytics. Optionally filter by user ID, device ID, or time range. Returns the most recent events matching the criteria.

Parameters
user_id, device_id, start, end, limit

Generic CLI call

kosmo integrations:call amplitude.amplitude_list_events '{"user_id":"example_user_id","device_id":"example_device_id","start":"example_start","end":"example_end","limit":1}' --json

Provider shortcut

kosmo integrations:amplitude amplitude_list_events '{"user_id":"example_user_id","device_id":"example_device_id","start":"example_start","end":"example_end","limit":1}' --json

amplitude.amplitude_get_event

Read read

Retrieve a single Amplitude event by its ID. Returns full event details including all event properties and metadata.

Parameters
id

Generic CLI call

kosmo integrations:call amplitude.amplitude_get_event '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:amplitude amplitude_get_event '{"id":"example_id"}' --json

amplitude.amplitude_list_funnels

Read read

List funnels configured in Amplitude. Optionally filter by project ID. Returns funnel names, IDs, and summary conversion metrics.

Parameters
project_id, limit

Generic CLI call

kosmo integrations:call amplitude.amplitude_list_funnels '{"project_id":1,"limit":1}' --json

Provider shortcut

kosmo integrations:amplitude amplitude_list_funnels '{"project_id":1,"limit":1}' --json

amplitude.amplitude_get_funnel

Read read

Retrieve a single Amplitude funnel by its ID. Returns the full funnel definition including steps, conversion rates, and drop-off metrics.

Parameters
id

Generic CLI call

kosmo integrations:call amplitude.amplitude_get_funnel '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:amplitude amplitude_get_funnel '{"id":"example_id"}' --json

amplitude.amplitude_list_cohorts

Read read

List behavioral cohorts in Amplitude. Optionally filter by project ID. Returns cohort names, IDs, and membership counts.

Parameters
project_id, limit

Generic CLI call

kosmo integrations:call amplitude.amplitude_list_cohorts '{"project_id":1,"limit":1}' --json

Provider shortcut

kosmo integrations:amplitude amplitude_list_cohorts '{"project_id":1,"limit":1}' --json

amplitude.amplitude_get_cohort

Read read

Retrieve a single Amplitude cohort by its ID. Returns the full cohort definition including behavioral criteria and membership size.

Parameters
id

Generic CLI call

kosmo integrations:call amplitude.amplitude_get_cohort '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:amplitude amplitude_get_cohort '{"id":"example_id"}' --json

amplitude.amplitude_get_current_user

Read read

Get the currently authenticated Amplitude user. Returns account details for the API key owner — useful for verifying credentials and checking permissions.

Parameters
none

Generic CLI call

kosmo integrations:call amplitude.amplitude_get_current_user '{}' --json

Provider shortcut

kosmo integrations:amplitude amplitude_get_current_user '{}' --json

Function Schemas

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

amplitude.amplitude_list_events

List events from Amplitude Analytics. Optionally filter by user ID, device ID, or time range. Returns the most recent events matching the criteria.

Operation
Read read
Schema command
kosmo integrations:schema amplitude.amplitude_list_events --json
ParameterTypeRequiredDescription
user_id string no Filter events by Amplitude user ID.
device_id string no Filter events by device ID.
start string no Start timestamp (ISO 8601 e.g. "2025-01-01T00:00:00Z" or milliseconds epoch).
end string no End timestamp (ISO 8601 e.g. "2025-01-31T23:59:59Z" or milliseconds epoch).
limit integer no Maximum number of events to return (default: 1000).

amplitude.amplitude_get_event

Retrieve a single Amplitude event by its ID. Returns full event details including all event properties and metadata.

Operation
Read read
Schema command
kosmo integrations:schema amplitude.amplitude_get_event --json
ParameterTypeRequiredDescription
id string yes The Amplitude event ID.

amplitude.amplitude_list_funnels

List funnels configured in Amplitude. Optionally filter by project ID. Returns funnel names, IDs, and summary conversion metrics.

Operation
Read read
Schema command
kosmo integrations:schema amplitude.amplitude_list_funnels --json
ParameterTypeRequiredDescription
project_id integer no Filter by Amplitude project ID.
limit integer no Maximum number of funnels to return (default: 100).

amplitude.amplitude_get_funnel

Retrieve a single Amplitude funnel by its ID. Returns the full funnel definition including steps, conversion rates, and drop-off metrics.

Operation
Read read
Schema command
kosmo integrations:schema amplitude.amplitude_get_funnel --json
ParameterTypeRequiredDescription
id string yes The Amplitude funnel ID.

amplitude.amplitude_list_cohorts

List behavioral cohorts in Amplitude. Optionally filter by project ID. Returns cohort names, IDs, and membership counts.

Operation
Read read
Schema command
kosmo integrations:schema amplitude.amplitude_list_cohorts --json
ParameterTypeRequiredDescription
project_id integer no Filter by Amplitude project ID.
limit integer no Maximum number of cohorts to return (default: 100).

amplitude.amplitude_get_cohort

Retrieve a single Amplitude cohort by its ID. Returns the full cohort definition including behavioral criteria and membership size.

Operation
Read read
Schema command
kosmo integrations:schema amplitude.amplitude_get_cohort --json
ParameterTypeRequiredDescription
id string yes The Amplitude cohort ID.

amplitude.amplitude_get_current_user

Get the currently authenticated Amplitude user. Returns account details for the API key owner — useful for verifying credentials and checking permissions.

Operation
Read read
Schema command
kosmo integrations:schema amplitude.amplitude_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.