Amplitude

Learn how to use Amplitude with Composio

Overview

SLUG: AMPLITUDE

Description

Amplitude Inc. is an American publicly trading company that develops digital analytics software.

Authentication Details

username
stringRequired
password
stringRequired

Connecting to Amplitude

Create an auth config

Use the dashboard to create an auth config for the Amplitude toolkit. This allows you to connect multiple Amplitude accounts to Composio for agents to use.

1

Select App

Navigate to the Amplitude toolkit page and click “Setup Integration”.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Integration”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using Basic Auth

1from composio import Composio
2from composio.types import auth_scheme
3
4# Replace these with your actual values
5amplitude_auth_config_id = "ac_YOUR_AMPLITUDE_CONFIG_ID"
6user_id = "user@example.com"
7username = "your_amplitude_username"
8password = "your_amplitude_password"
9
10composio = Composio()
11
12# Create a new connected account for Amplitude using Basic Auth
13connection_request = composio.connected_accounts.initiate(
14 user_id=user_id,
15 auth_config_id=amplitude_auth_config_id,
16 config=auth_scheme.basic_auth(
17 username=username,
18 password=password
19 )
20)
21
22# Basic authentication is immediate - no redirect needed
23print(f"Successfully connected Amplitude for user {user_id}")
24
25# You can verify the connection using:
26# connected_account = composio.connected_accounts.get(user_id=user_id, app_id="AMPLITUDE")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Amplitude toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["AMPLITUDE"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Check Amplitude Cohort Status

Description

Check the status of a cohort export request. this action allows you to: - poll the status of an in-progress cohort download request - determine if a cohort is ready for download

Action Parameters

request_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Request Amplitude Cohort

Description

Get a single cohort by id and initiate download. this action allows you to: - request a specific cohort from amplitude - optionally include user properties in the response - start the asynchronous download process key features: - supports filtering by specific user properties - returns a request id used for polling status and downloading - supports eu data residency

Action Parameters

cohort_id
stringRequired
include_properties
boolean
property_keys
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update User Properties in Amplitude

Description

Update user properties using amplitude's identify api. this action allows you to: - set or update the user id for a device id - update user properties without sending an event - perform operations on user properties (set, append, etc.) - update user attributes like device info and location

Action Parameters

api_key
stringRequired
identification
objectRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Amplitude Cohorts

Description

List all discoverable cohorts for an amplitude project. this action allows you to: - get a list of all cohorts in your amplitude project - optionally include sync information for each cohort key features: - returns cohort details including id, name, size, and definition - optionally includes sync metadata for integration with other tools - supports eu data residency

Action Parameters

include_sync_info
boolean

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Send Events to Amplitude

Description

Send events to amplitude using the http v2 api. this action allows you to send events to amplitude for tracking user behavior and analytics. it supports all amplitude event fields, handles proper validation, and includes comprehensive error handling.

Action Parameters

api_key
stringRequired
events
arrayRequired
options
object

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Amplitude Event Category

Description

Create a new event category in amplitude. this action allows you to: - create a new event category to organize event types - validate category name before creation key features: - creates event categories for organizing events - returns success/failure status

Action Parameters

category_name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Amplitude Event Type

Description

Create a new event type in amplitude. this action allows you to: - define a new event type with various properties - associate the event with a category - add metadata like description, tags, and owner key features: - creates trackable events in your amplitude project - supports full event type configuration

Action Parameters

category
string
description
string
event_type
stringRequired
is_active
boolean
is_hidden_from_dropdowns
boolean
is_hidden_from_pathfinder
boolean
is_hidden_from_persona_results
boolean
is_hidden_from_timeline
boolean
owner
string
tags
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Amplitude Event Category

Description

Delete an event category from amplitude. this action allows you to: - delete an existing event category - remove category organization from events key features: - permanently removes event categories - returns success/failure status

Action Parameters

category_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Amplitude Event Type

Description

Delete an event type from amplitude. this action allows you to: - remove an event type from your project - mark live events as deleted - remove planned events from the tracking plan key features: - different behavior based on event status (live, planned, etc.) - returns success/failure status

Action Parameters

event_type
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Amplitude Event Categories

Description

Get event categories from amplitude. this action allows you to: - get all event categories in your project - get a specific category by name

Action Parameters

category_name
string

Action Response

data
object
error
string
errors
array
success
booleanRequired
successful
booleanRequired

Tool Name: Get Amplitude Event Type

Description

Get a specific event type from amplitude by name. this action allows you to: - retrieve detailed information about a single event type - get all properties and metadata for the event key features: - retrieves comprehensive event type details - returns metadata like category, description, and settings - supports lookup by exact event name

Action Parameters

event_type
stringRequired

Action Response

data
object
error
string
errors
array
success
booleanRequired
successful
booleanRequired

Tool Name: Get Amplitude Event Types

Description

Get all event types from amplitude. this action allows you to: - retrieve all event types in your project - optionally include deleted events

Action Parameters

show_deleted
boolean

Action Response

data
array
error
string
errors
array
success
booleanRequired
successful
booleanRequired

Tool Name: Restore Amplitude Event Type

Description

Restore a deleted event type in amplitude. this action allows you to: - restore a previously deleted event type - make the event available again in the ui and api key features: - undoes the deletion of an event type - returns success/failure status

Action Parameters

event_type
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Amplitude Cohort Membership

Description

Incrementally update cohort membership by adding or removing ids. this action allows you to: - add new ids to an existing cohort - remove ids from an existing cohort - perform multiple operations in a single request

Action Parameters

cohort_id
stringRequired
count_group
string
memberships
arrayRequired
skip_invalid_ids
booleanDefaults to True

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Amplitude Event Category

Description

Update an existing event category in amplitude. this action allows you to: - update the name of an existing event category - validate the new category name key features: - updates category names - returns success/failure status

Action Parameters

category_id
integerRequired
category_name
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Amplitude Event Type

Description

Update an existing event type in amplitude. this action allows you to: - change event type properties - update event name, category, metadata, and settings - modify display name for ingested events key features: - updates event type configuration - supports partial updates (only specified fields are changed)

Action Parameters

category
string
description
string
display_name
string
event_type
stringRequired
is_active
boolean
is_hidden_from_dropdowns
boolean
is_hidden_from_pathfinder
boolean
is_hidden_from_persona_results
boolean
is_hidden_from_timeline
boolean
new_event_type
string
owner
string
tags
string

Action Response

data
objectRequired
error
string
successful
booleanRequired