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 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.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
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.
kosmo integrations:call autopilot.autopilot_create_contact '{}' --json 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.
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 - Parameters
- none
kosmo integrations:call autopilot.autopilot_create_contact '{}' --json 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 - Parameters
- none
kosmo integrations:call autopilot.autopilot_get_contact '{}' --json 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 - Parameters
- none
kosmo integrations:call autopilot.autopilot_delete_contact '{}' --json 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 - Parameters
- none
kosmo integrations:call autopilot.autopilot_get_contacts_on_list '{}' --json 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 - Parameters
- none
kosmo integrations:call autopilot.autopilot_add_list '{}' --json 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 - Parameters
- none
kosmo integrations:call autopilot.autopilot_delete_list '{}' --json 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 - Parameters
- none
kosmo integrations:call autopilot.autopilot_eject_contact_from_journey '{}' --json 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 - Parameters
- none
kosmo integrations:call autopilot.autopilot_register_rest_hook '{}' --json 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 - Parameters
- none
kosmo integrations:call autopilot.autopilot_unregister_rest_hook '{}' --json 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 - Parameters
- none
kosmo integrations:call autopilot.autopilot_list_rest_hooks '{}' --json 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
kosmo integrations:schema autopilot.autopilot_create_contact --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
autopilot.autopilot_get_contact 0 parameters
kosmo integrations:schema autopilot.autopilot_get_contact --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
autopilot.autopilot_delete_contact 0 parameters
kosmo integrations:schema autopilot.autopilot_delete_contact --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
autopilot.autopilot_get_contacts_on_list 0 parameters
kosmo integrations:schema autopilot.autopilot_get_contacts_on_list --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
autopilot.autopilot_add_list 0 parameters
kosmo integrations:schema autopilot.autopilot_add_list --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
autopilot.autopilot_delete_list 0 parameters
kosmo integrations:schema autopilot.autopilot_delete_list --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
autopilot.autopilot_eject_contact_from_journey 0 parameters
kosmo integrations:schema autopilot.autopilot_eject_contact_from_journey --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
autopilot.autopilot_register_rest_hook 0 parameters
kosmo integrations:schema autopilot.autopilot_register_rest_hook --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
autopilot.autopilot_unregister_rest_hook 0 parameters
kosmo integrations:schema autopilot.autopilot_unregister_rest_hook --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
autopilot.autopilot_list_rest_hooks 0 parameters
kosmo integrations:schema autopilot.autopilot_list_rest_hooks --json | Parameter | Type | Required | Description |
|---|---|---|---|
| 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.