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.

Amplitude Analytics CLI Setup

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

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 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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

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

Command Patterns

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

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

Discovery

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

Discovery commands
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

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.

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.

Read read
Parameters
user_id, device_id, start, end, limit
Generic 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
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

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

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

amplitude.amplitude_list_funnels

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

Read read
Parameters
project_id, limit
Generic call
kosmo integrations:call amplitude.amplitude_list_funnels '{"project_id":1,"limit":1}' --json
Shortcut
kosmo integrations:amplitude amplitude_list_funnels '{"project_id":1,"limit":1}' --json

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.

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

amplitude.amplitude_list_cohorts

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

Read read
Parameters
project_id, limit
Generic call
kosmo integrations:call amplitude.amplitude_list_cohorts '{"project_id":1,"limit":1}' --json
Shortcut
kosmo integrations:amplitude amplitude_list_cohorts '{"project_id":1,"limit":1}' --json

amplitude.amplitude_get_cohort

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

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

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.

Read read
Parameters
none
Generic call
kosmo integrations:call amplitude.amplitude_get_current_user '{}' --json
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 5 parameters
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 1 parameters
Schema command
kosmo integrations:schema amplitude.amplitude_get_event --json
ParameterTypeRequiredDescription
id string yes The Amplitude event ID.
amplitude.amplitude_list_funnels 2 parameters
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 1 parameters
Schema command
kosmo integrations:schema amplitude.amplitude_get_funnel --json
ParameterTypeRequiredDescription
id string yes The Amplitude funnel ID.
amplitude.amplitude_list_cohorts 2 parameters
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 1 parameters
Schema command
kosmo integrations:schema amplitude.amplitude_get_cohort --json
ParameterTypeRequiredDescription
id string yes The Amplitude cohort ID.
amplitude.amplitude_get_current_user 0 parameters
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.