KosmoKrator

productivity

Autopilot CLI for AI Agents

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

Autopilot CLI Setup

Autopilot can be configured headlessly with `kosmokrator integrations:configure autopilot`.

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

Credentials

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

KeyEnv varTypeRequiredLabel
api_key AUTOPILOT_API_KEY Secret secret yes API Key
url AUTOPILOT_URL URL url no API Base URL

Command Patterns

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

Generic CLI call
kosmo integrations:call autopilot.autopilot_create_contact '{}' --json
Provider shortcut
kosmo integrations:autopilot autopilot_create_contact '{}' --json

Discovery

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

Discovery commands
kosmo integrations:docs autopilot --json
kosmo integrations:docs autopilot.autopilot_create_contact --json
kosmo integrations:schema autopilot.autopilot_create_contact --json
kosmo integrations:search "Autopilot" --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.

autopilot.autopilot_create_contact

Create or update a contact. Autopilot de-duplicates contacts by Email and merges provided fields. Official Autopilot API Blueprint endpoint: POST https://api.autopilothq.com/v1/contact.

Write write
Parameters
none
Generic call
kosmo integrations:call autopilot.autopilot_create_contact '{}' --json
Shortcut
kosmo integrations:autopilot autopilot_create_contact '{}' --json

autopilot.autopilot_get_contact

Retrieve one contact by Autopilot contact_id or email address. Official Autopilot API Blueprint endpoint: GET https://api.autopilothq.com/v1/contact/{contact_id_or_email}.

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

autopilot.autopilot_delete_contact

Permanently delete one contact by Autopilot contact_id or email address. Official Autopilot API Blueprint endpoint: DELETE https://api.autopilothq.com/v1/contact/{contact_id_or_email}.

Write write
Parameters
none
Generic call
kosmo integrations:call autopilot.autopilot_delete_contact '{}' --json
Shortcut
kosmo integrations:autopilot autopilot_delete_contact '{}' --json

autopilot.autopilot_get_contacts_on_list

Retrieve contacts belonging to a specific Autopilot list. Official Autopilot API Blueprint endpoint: GET https://api.autopilothq.com/v1/list/{list_id}.

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

autopilot.autopilot_add_list

Create a new Autopilot list. Official Autopilot API Blueprint endpoint: POST https://api.autopilothq.com/v1/list.

Write write
Parameters
none
Generic call
kosmo integrations:call autopilot.autopilot_add_list '{}' --json
Shortcut
kosmo integrations:autopilot autopilot_add_list '{}' --json

autopilot.autopilot_delete_list

Delete an Autopilot list. Supply the documented list identifier in payload. Official Autopilot API Blueprint endpoint: DELETE https://api.autopilothq.com/v1/list.

Write write
Parameters
none
Generic call
kosmo integrations:call autopilot.autopilot_delete_list '{}' --json
Shortcut
kosmo integrations:autopilot autopilot_delete_list '{}' --json

autopilot.autopilot_eject_contact_from_journey

Remove a contact from a specific journey before they complete all steps. Official Autopilot API Blueprint endpoint: DELETE https://api.autopilothq.com/v1/journey/{journey_id}/contact/{contact_id_or_email}.

Write write
Parameters
none
Generic call
kosmo integrations:call autopilot.autopilot_eject_contact_from_journey '{}' --json
Shortcut
kosmo integrations:autopilot autopilot_eject_contact_from_journey '{}' --json

autopilot.autopilot_register_rest_hook

Register a REST hook target URL for a supported Autopilot event. Official Autopilot API Blueprint endpoint: POST https://api.autopilothq.com/v1/hook.

Write write
Parameters
none
Generic call
kosmo integrations:call autopilot.autopilot_register_rest_hook '{}' --json
Shortcut
kosmo integrations:autopilot autopilot_register_rest_hook '{}' --json

autopilot.autopilot_unregister_rest_hook

Unregister a REST hook by hook_id. Official Autopilot API Blueprint endpoint: DELETE https://api.autopilothq.com/v1/hook/{hook_id}.

Write write
Parameters
none
Generic call
kosmo integrations:call autopilot.autopilot_unregister_rest_hook '{}' --json
Shortcut
kosmo integrations:autopilot autopilot_unregister_rest_hook '{}' --json

autopilot.autopilot_list_rest_hooks

List registered REST hooks. Official Autopilot API Blueprint endpoint: GET https://api.autopilothq.com/v1/hooks.

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

Function Schemas

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

autopilot.autopilot_create_contact 0 parameters
Schema command
kosmo integrations:schema autopilot.autopilot_create_contact --json
ParameterTypeRequiredDescription
No parameters.
autopilot.autopilot_get_contact 0 parameters
Schema command
kosmo integrations:schema autopilot.autopilot_get_contact --json
ParameterTypeRequiredDescription
No parameters.
autopilot.autopilot_delete_contact 0 parameters
Schema command
kosmo integrations:schema autopilot.autopilot_delete_contact --json
ParameterTypeRequiredDescription
No parameters.
autopilot.autopilot_get_contacts_on_list 0 parameters
Schema command
kosmo integrations:schema autopilot.autopilot_get_contacts_on_list --json
ParameterTypeRequiredDescription
No parameters.
autopilot.autopilot_add_list 0 parameters
Schema command
kosmo integrations:schema autopilot.autopilot_add_list --json
ParameterTypeRequiredDescription
No parameters.
autopilot.autopilot_delete_list 0 parameters
Schema command
kosmo integrations:schema autopilot.autopilot_delete_list --json
ParameterTypeRequiredDescription
No parameters.
autopilot.autopilot_eject_contact_from_journey 0 parameters
Schema command
kosmo integrations:schema autopilot.autopilot_eject_contact_from_journey --json
ParameterTypeRequiredDescription
No parameters.
autopilot.autopilot_register_rest_hook 0 parameters
Schema command
kosmo integrations:schema autopilot.autopilot_register_rest_hook --json
ParameterTypeRequiredDescription
No parameters.
autopilot.autopilot_unregister_rest_hook 0 parameters
Schema command
kosmo integrations:schema autopilot.autopilot_unregister_rest_hook --json
ParameterTypeRequiredDescription
No parameters.
autopilot.autopilot_list_rest_hooks 0 parameters
Schema command
kosmo integrations:schema autopilot.autopilot_list_rest_hooks --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.