KosmoKrator

email

Loops CLI for AI Agents

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

6 functions 3 read 3 write API key auth

Loops CLI Setup

Loops can be configured headlessly with `kosmokrator integrations:configure loops`.

# 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 loops --set api_key="$LOOPS_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor loops --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 LOOPS_API_KEY Secret secret yes API Key
url LOOPS_URL URL url no API Base URL

Call Loops Headlessly

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

kosmo integrations:call loops.loops_list_contacts '{
  "limit": 1,
  "offset": 1
}' --json

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

kosmo integrations:loops loops_list_contacts '{
  "limit": 1,
  "offset": 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 loops --json
kosmo integrations:docs loops.loops_list_contacts --json
kosmo integrations:schema loops.loops_list_contacts --json
kosmo integrations:search "Loops" --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 Loops.

loops.loops_list_contacts

Read read

List contacts from Loops with pagination. Returns contact records including email, name, and custom properties.

Parameters
limit, offset

Generic CLI call

kosmo integrations:call loops.loops_list_contacts '{"limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:loops loops_list_contacts '{"limit":1,"offset":1}' --json

loops.loops_get_contact

Read read

Get a single contact from Loops by their unique contact ID. Returns full contact details including email, name, and custom properties.

Parameters
contact_id

Generic CLI call

kosmo integrations:call loops.loops_get_contact '{"contact_id":"example_contact_id"}' --json

Provider shortcut

kosmo integrations:loops loops_get_contact '{"contact_id":"example_contact_id"}' --json

loops.loops_create_contact

Write write

Create a new contact in Loops. Requires an email address. Optionally include first and last name.

Parameters
email, first_name, last_name

Generic CLI call

kosmo integrations:call loops.loops_create_contact '{"email":"example_email","first_name":"example_first_name","last_name":"example_last_name"}' --json

Provider shortcut

kosmo integrations:loops loops_create_contact '{"email":"example_email","first_name":"example_first_name","last_name":"example_last_name"}' --json

loops.loops_update_contact

Write write

Update an existing contact in Loops. Provide the contact ID and the fields to update (e.g., email, first_name, last_name, or custom properties).

Parameters
contact_id, email, first_name, last_name, properties

Generic CLI call

kosmo integrations:call loops.loops_update_contact '{"contact_id":"example_contact_id","email":"example_email","first_name":"example_first_name","last_name":"example_last_name","properties":"example_properties"}' --json

Provider shortcut

kosmo integrations:loops loops_update_contact '{"contact_id":"example_contact_id","email":"example_email","first_name":"example_first_name","last_name":"example_last_name","properties":"example_properties"}' --json

loops.loops_send_event

Write write

Send a custom event to Loops for a contact identified by email. Events can trigger automations and loops in your Loops account.

Parameters
email, event_name, properties

Generic CLI call

kosmo integrations:call loops.loops_send_event '{"email":"example_email","event_name":"example_event_name","properties":"example_properties"}' --json

Provider shortcut

kosmo integrations:loops loops_send_event '{"email":"example_email","event_name":"example_event_name","properties":"example_properties"}' --json

loops.loops_get_current_user

Read read

Get the currently authenticated Loops user. Use this to verify the API connection and see account details.

Parameters
none

Generic CLI call

kosmo integrations:call loops.loops_get_current_user '{}' --json

Provider shortcut

kosmo integrations:loops loops_get_current_user '{}' --json

Function Schemas

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

loops.loops_list_contacts

List contacts from Loops with pagination. Returns contact records including email, name, and custom properties.

Operation
Read read
Schema command
kosmo integrations:schema loops.loops_list_contacts --json
ParameterTypeRequiredDescription
limit integer no Maximum number of contacts to return (default: 50, max: 50).
offset integer no Number of contacts to skip for pagination (default: 0).

loops.loops_get_contact

Get a single contact from Loops by their unique contact ID. Returns full contact details including email, name, and custom properties.

Operation
Read read
Schema command
kosmo integrations:schema loops.loops_get_contact --json
ParameterTypeRequiredDescription
contact_id string yes The unique contact ID.

loops.loops_create_contact

Create a new contact in Loops. Requires an email address. Optionally include first and last name.

Operation
Write write
Schema command
kosmo integrations:schema loops.loops_create_contact --json
ParameterTypeRequiredDescription
email string yes The contact's email address.
first_name string no The contact's first name.
last_name string no The contact's last name.

loops.loops_update_contact

Update an existing contact in Loops. Provide the contact ID and the fields to update (e.g., email, first_name, last_name, or custom properties).

Operation
Write write
Schema command
kosmo integrations:schema loops.loops_update_contact --json
ParameterTypeRequiredDescription
contact_id string yes The unique contact ID to update.
email string no Updated email address.
first_name string no Updated first name.
last_name string no Updated last name.
properties object no Custom properties to update as key-value pairs.

loops.loops_send_event

Send a custom event to Loops for a contact identified by email. Events can trigger automations and loops in your Loops account.

Operation
Write write
Schema command
kosmo integrations:schema loops.loops_send_event --json
ParameterTypeRequiredDescription
email string yes The contact's email address.
event_name string yes The name of the event to send (e.g., "signup", "purchase", "trial_started").
properties object no Optional event properties as key-value pairs to attach additional data.

loops.loops_get_current_user

Get the currently authenticated Loops user. Use this to verify the API connection and see account details.

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