data
Phantombuster CLI for AI Agents
Use the Phantombuster CLI from KosmoKrator to call Phantombuster tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Phantombuster CLI Setup
Phantombuster can be configured headlessly with `kosmokrator integrations:configure phantombuster`.
# 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 phantombuster --set api_key="$PHANTOMBUSTER_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor phantombuster --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.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
api_key | PHANTOMBUSTER_API_KEY | Secret secret | yes | API Key |
url | PHANTOMBUSTER_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 phantombuster.phantombuster_list_agents '{"input_types":"example_input_types","output_types":"example_output_types","agent_ids":"example_agent_ids","with_argument":true,"with_agent_slots_factor":true}' --json kosmo integrations:phantombuster phantombuster_list_agents '{"input_types":"example_input_types","output_types":"example_output_types","agent_ids":"example_agent_ids","with_argument":true,"with_agent_slots_factor":true}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs phantombuster --json
kosmo integrations:docs phantombuster.phantombuster_list_agents --json
kosmo integrations:schema phantombuster.phantombuster_list_agents --json
kosmo integrations:search "Phantombuster" --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.
phantombuster.phantombuster_list_agents
List all Phantombuster agents in your account. Returns agent IDs, names, and status so you can inspect or launch them.
read - Parameters
- input_types, output_types, agent_ids, with_argument, with_agent_slots_factor
kosmo integrations:call phantombuster.phantombuster_list_agents '{"input_types":"example_input_types","output_types":"example_output_types","agent_ids":"example_agent_ids","with_argument":true,"with_agent_slots_factor":true}' --json kosmo integrations:phantombuster phantombuster_list_agents '{"input_types":"example_input_types","output_types":"example_output_types","agent_ids":"example_agent_ids","with_argument":true,"with_agent_slots_factor":true}' --json phantombuster.phantombuster_get_agent
Get details for a specific Phantombuster agent, including its configuration, last run status, and output.
read - Parameters
- id, with_manifest, with_agent_object, with_code, with_slaves, with_sub_slaves
kosmo integrations:call phantombuster.phantombuster_get_agent '{"id":"example_id","with_manifest":true,"with_agent_object":true,"with_code":true,"with_slaves":true,"with_sub_slaves":true}' --json kosmo integrations:phantombuster phantombuster_get_agent '{"id":"example_id","with_manifest":true,"with_agent_object":true,"with_code":true,"with_slaves":true,"with_sub_slaves":true}' --json phantombuster.phantombuster_launch_agent
Launch a Phantombuster agent to start an automation. Returns the container ID for tracking execution progress.
write - Parameters
- id, argument, arguments, bonus_argument, save_argument, payload
kosmo integrations:call phantombuster.phantombuster_launch_agent '{"id":"example_id","argument":"example_argument","arguments":"example_arguments","bonus_argument":"example_bonus_argument","save_argument":true,"payload":"example_payload"}' --json kosmo integrations:phantombuster phantombuster_launch_agent '{"id":"example_id","argument":"example_argument","arguments":"example_arguments","bonus_argument":"example_bonus_argument","save_argument":true,"payload":"example_payload"}' --json phantombuster.phantombuster_save_agent
Create or update a Phantombuster agent using official /agents/save fields.
write - Parameters
- id, name, script, branch, environment, launch_type, argument, payload
kosmo integrations:call phantombuster.phantombuster_save_agent '{"id":"example_id","name":"example_name","script":"example_script","branch":"example_branch","environment":"example_environment","launch_type":"example_launch_type","argument":"example_argument","payload":"example_payload"}' --json kosmo integrations:phantombuster phantombuster_save_agent '{"id":"example_id","name":"example_name","script":"example_script","branch":"example_branch","environment":"example_environment","launch_type":"example_launch_type","argument":"example_argument","payload":"example_payload"}' --json phantombuster.phantombuster_stop_agent
Stop a running Phantombuster agent.
write - Parameters
- id
kosmo integrations:call phantombuster.phantombuster_stop_agent '{"id":"example_id"}' --json kosmo integrations:phantombuster phantombuster_stop_agent '{"id":"example_id"}' --json phantombuster.phantombuster_delete_agent
Delete a Phantombuster agent by ID.
write - Parameters
- id
kosmo integrations:call phantombuster.phantombuster_delete_agent '{"id":"example_id"}' --json kosmo integrations:phantombuster phantombuster_delete_agent '{"id":"example_id"}' --json phantombuster.phantombuster_list_deleted_agents
List deleted Phantombuster agents in the current organization.
read - Parameters
- none
kosmo integrations:call phantombuster.phantombuster_list_deleted_agents '{}' --json kosmo integrations:phantombuster phantombuster_list_deleted_agents '{}' --json phantombuster.phantombuster_fetch_agent_output
Fetch output from the latest relevant container of a Phantombuster agent.
read - Parameters
- id, from_output_pos, prev_container_id, prev_status, prev_runtime_event_index
kosmo integrations:call phantombuster.phantombuster_fetch_agent_output '{"id":"example_id","from_output_pos":1,"prev_container_id":"example_prev_container_id","prev_status":"example_prev_status","prev_runtime_event_index":1}' --json kosmo integrations:phantombuster phantombuster_fetch_agent_output '{"id":"example_id","from_output_pos":1,"prev_container_id":"example_prev_container_id","prev_status":"example_prev_status","prev_runtime_event_index":1}' --json phantombuster.phantombuster_list_containers
List Phantombuster containers (execution runs) for one agent. Returns container IDs, status, timestamps, and optional runtime events.
read - Parameters
- agent_id, before_ended_at, limit, mode, with_runtime_events
kosmo integrations:call phantombuster.phantombuster_list_containers '{"agent_id":"example_agent_id","before_ended_at":"example_before_ended_at","limit":1,"mode":"example_mode","with_runtime_events":true}' --json kosmo integrations:phantombuster phantombuster_list_containers '{"agent_id":"example_agent_id","before_ended_at":"example_before_ended_at","limit":1,"mode":"example_mode","with_runtime_events":true}' --json phantombuster.phantombuster_get_container
Get details for a specific Phantombuster container (execution run), including its status, output, and logs.
read - Parameters
- id, with_result_object, with_output, with_runtime_events, with_newer_and_older_container_id
kosmo integrations:call phantombuster.phantombuster_get_container '{"id":"example_id","with_result_object":true,"with_output":true,"with_runtime_events":true,"with_newer_and_older_container_id":true}' --json kosmo integrations:phantombuster phantombuster_get_container '{"id":"example_id","with_result_object":true,"with_output":true,"with_runtime_events":true,"with_newer_and_older_container_id":true}' --json phantombuster.phantombuster_fetch_container_output
Fetch JSON or raw output for a Phantombuster container.
read - Parameters
- id, mode
kosmo integrations:call phantombuster.phantombuster_fetch_container_output '{"id":"example_id","mode":"example_mode"}' --json kosmo integrations:phantombuster phantombuster_fetch_container_output '{"id":"example_id","mode":"example_mode"}' --json phantombuster.phantombuster_fetch_container_result_object
Fetch the result object associated with a Phantombuster container.
read - Parameters
- id
kosmo integrations:call phantombuster.phantombuster_fetch_container_result_object '{"id":"example_id"}' --json kosmo integrations:phantombuster phantombuster_fetch_container_result_object '{"id":"example_id"}' --json phantombuster.phantombuster_list_scripts
List scripts available to the authenticated Phantombuster user.
read - Parameters
- none
kosmo integrations:call phantombuster.phantombuster_list_scripts '{}' --json kosmo integrations:phantombuster phantombuster_list_scripts '{}' --json phantombuster.phantombuster_get_script
Get a Phantombuster script by ID.
read - Parameters
- id
kosmo integrations:call phantombuster.phantombuster_get_script '{"id":"example_id"}' --json kosmo integrations:phantombuster phantombuster_get_script '{"id":"example_id"}' --json phantombuster.phantombuster_save_script
Create or update a Phantombuster script using official /scripts/save fields.
write - Parameters
- payload
kosmo integrations:call phantombuster.phantombuster_save_script '{"payload":"example_payload"}' --json kosmo integrations:phantombuster phantombuster_save_script '{"payload":"example_payload"}' --json phantombuster.phantombuster_delete_script
Delete a Phantombuster script by ID.
write - Parameters
- id
kosmo integrations:call phantombuster.phantombuster_delete_script '{"id":"example_id"}' --json kosmo integrations:phantombuster phantombuster_delete_script '{"id":"example_id"}' --json phantombuster.phantombuster_list_branches
List script branches in the current Phantombuster organization.
read - Parameters
- none
kosmo integrations:call phantombuster.phantombuster_list_branches '{}' --json kosmo integrations:phantombuster phantombuster_list_branches '{}' --json phantombuster.phantombuster_get_organization
Get current Phantombuster organization metadata and optional configuration details.
read - Parameters
- with_global_object, with_proxies, with_crm_integrations, with_custom_prompts
kosmo integrations:call phantombuster.phantombuster_get_organization '{"with_global_object":true,"with_proxies":true,"with_crm_integrations":true,"with_custom_prompts":true}' --json kosmo integrations:phantombuster phantombuster_get_organization '{"with_global_object":true,"with_proxies":true,"with_crm_integrations":true,"with_custom_prompts":true}' --json phantombuster.phantombuster_get_ip_location
Retrieve the country metadata for an IPv4 or IPv6 address.
read - Parameters
- ip
kosmo integrations:call phantombuster.phantombuster_get_ip_location '{"ip":"example_ip"}' --json kosmo integrations:phantombuster phantombuster_get_ip_location '{"ip":"example_ip"}' --json phantombuster.phantombuster_get_current_user
Get the authenticated Phantombuster user profile, including account info and plan details.
read - Parameters
- none
kosmo integrations:call phantombuster.phantombuster_get_current_user '{}' --json kosmo integrations:phantombuster phantombuster_get_current_user '{}' --json phantombuster.phantombuster_api_get
Call a relative Phantombuster API GET path, such as "/agents/fetch-all". Absolute URLs are rejected.
read - Parameters
- path, params
kosmo integrations:call phantombuster.phantombuster_api_get '{"path":"example_path","params":"example_params"}' --json kosmo integrations:phantombuster phantombuster_api_get '{"path":"example_path","params":"example_params"}' --json phantombuster.phantombuster_api_post
Call a relative Phantombuster API POST path. Absolute URLs are rejected.
write - Parameters
- path, payload
kosmo integrations:call phantombuster.phantombuster_api_post '{"path":"example_path","payload":"example_payload"}' --json kosmo integrations:phantombuster phantombuster_api_post '{"path":"example_path","payload":"example_payload"}' --json phantombuster.phantombuster_api_put
Call a relative Phantombuster API PUT path. Absolute URLs are rejected.
write - Parameters
- path, payload
kosmo integrations:call phantombuster.phantombuster_api_put '{"path":"example_path","payload":"example_payload"}' --json kosmo integrations:phantombuster phantombuster_api_put '{"path":"example_path","payload":"example_payload"}' --json phantombuster.phantombuster_api_delete
Call a relative Phantombuster API DELETE path. Absolute URLs are rejected.
write - Parameters
- path, payload
kosmo integrations:call phantombuster.phantombuster_api_delete '{"path":"example_path","payload":"example_payload"}' --json kosmo integrations:phantombuster phantombuster_api_delete '{"path":"example_path","payload":"example_payload"}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
phantombuster.phantombuster_list_agents 5 parameters
kosmo integrations:schema phantombuster.phantombuster_list_agents --json | Parameter | Type | Required | Description |
|---|---|---|---|
input_types | array | no | Filter by manifest input types. |
output_types | array | no | Filter by manifest output types. |
agent_ids | array | no | Limit to up to 100 agent IDs. |
with_argument | boolean | no | Include default agent arguments. |
with_agent_slots_factor | boolean | no | Include reserved agent slots factor. |
phantombuster.phantombuster_get_agent 6 parameters
kosmo integrations:schema phantombuster.phantombuster_get_agent --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The agent ID (e.g., "1234567890123456789"). |
with_manifest | boolean | no | Include the agent manifest. |
with_agent_object | boolean | no | Include the agent object. |
with_code | boolean | no | Include script code when available. |
with_slaves | boolean | no | Include slave agents. |
with_sub_slaves | boolean | no | Include nested slave agents. |
phantombuster.phantombuster_launch_agent 6 parameters
kosmo integrations:schema phantombuster.phantombuster_launch_agent --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The agent ID to launch (e.g., "1234567890123456789"). |
argument | object | no | Temporary launch argument object or string accepted by Phantombuster. |
arguments | object | no | Alternative launch argument field accepted by Phantombuster. |
bonus_argument | object | no | Single-use argument merged with the saved argument. |
save_argument | boolean | no | Save argument as the default launch options. |
payload | object | no | Additional official launch fields. |
phantombuster.phantombuster_save_agent 8 parameters
kosmo integrations:schema phantombuster.phantombuster_save_agent --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | no | Existing agent ID to update. Omit to create. |
name | string | no | Agent name. |
script | string | no | Script ID. |
branch | string | no | Branch ID. |
environment | string | no | Script environment. |
launch_type | string | no | Launch mode. |
argument | object | no | Default launch argument. |
payload | object | no | Additional official /agents/save fields. |
phantombuster.phantombuster_stop_agent 1 parameters
kosmo integrations:schema phantombuster.phantombuster_stop_agent --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Agent ID. |
phantombuster.phantombuster_delete_agent 1 parameters
kosmo integrations:schema phantombuster.phantombuster_delete_agent --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Agent ID. |
phantombuster.phantombuster_list_deleted_agents 0 parameters
kosmo integrations:schema phantombuster.phantombuster_list_deleted_agents --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
phantombuster.phantombuster_fetch_agent_output 5 parameters
kosmo integrations:schema phantombuster.phantombuster_fetch_agent_output --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Agent ID. |
from_output_pos | number | no | Start output from this position. |
prev_container_id | string | no | Previously seen container ID. |
prev_status | string | no | Previously seen status. |
prev_runtime_event_index | number | no | Runtime event index to continue from. |
phantombuster.phantombuster_list_containers 5 parameters
kosmo integrations:schema phantombuster.phantombuster_list_containers --json | Parameter | Type | Required | Description |
|---|---|---|---|
agent_id | string | yes | Agent ID whose containers should be listed. |
before_ended_at | string | no | Return containers that ended before this date. |
limit | integer | no | Maximum number of containers. |
mode | string | no | Return all or only finalized containers. |
with_runtime_events | boolean | no | Include runtime events. |
phantombuster.phantombuster_get_container 5 parameters
kosmo integrations:schema phantombuster.phantombuster_get_container --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The container ID (e.g., "9876543210987654321"). |
with_result_object | boolean | no | Include the result object. |
with_output | boolean | no | Include output. |
with_runtime_events | boolean | no | Include runtime events. |
with_newer_and_older_container_id | boolean | no | Include adjacent container IDs. |
phantombuster.phantombuster_fetch_container_output 2 parameters
kosmo integrations:schema phantombuster.phantombuster_fetch_container_output --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Container ID. |
mode | string | no | Output mode. Defaults to json. |
phantombuster.phantombuster_fetch_container_result_object 1 parameters
kosmo integrations:schema phantombuster.phantombuster_fetch_container_result_object --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Container ID. |
phantombuster.phantombuster_list_scripts 0 parameters
kosmo integrations:schema phantombuster.phantombuster_list_scripts --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
phantombuster.phantombuster_get_script 1 parameters
kosmo integrations:schema phantombuster.phantombuster_get_script --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Script ID. |
phantombuster.phantombuster_save_script 1 parameters
kosmo integrations:schema phantombuster.phantombuster_save_script --json | Parameter | Type | Required | Description |
|---|---|---|---|
payload | object | yes | Official /scripts/save payload. |
phantombuster.phantombuster_delete_script 1 parameters
kosmo integrations:schema phantombuster.phantombuster_delete_script --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Script ID. |
phantombuster.phantombuster_list_branches 0 parameters
kosmo integrations:schema phantombuster.phantombuster_list_branches --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
phantombuster.phantombuster_get_organization 4 parameters
kosmo integrations:schema phantombuster.phantombuster_get_organization --json | Parameter | Type | Required | Description |
|---|---|---|---|
with_global_object | boolean | no | Include the organization global object. |
with_proxies | boolean | no | Include organization proxies. |
with_crm_integrations | boolean | no | Include CRM integration metadata. |
with_custom_prompts | boolean | no | Include custom prompt metadata. |
phantombuster.phantombuster_get_ip_location 1 parameters
kosmo integrations:schema phantombuster.phantombuster_get_ip_location --json | Parameter | Type | Required | Description |
|---|---|---|---|
ip | string | yes | IPv4 or IPv6 address. |
phantombuster.phantombuster_get_current_user 0 parameters
kosmo integrations:schema phantombuster.phantombuster_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
phantombuster.phantombuster_api_get 2 parameters
kosmo integrations:schema phantombuster.phantombuster_api_get --json | Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Phantombuster API path. |
params | object | no | Query parameters. |
phantombuster.phantombuster_api_post 2 parameters
kosmo integrations:schema phantombuster.phantombuster_api_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Phantombuster API path. |
payload | object | no | JSON body. |
phantombuster.phantombuster_api_put 2 parameters
kosmo integrations:schema phantombuster.phantombuster_api_put --json | Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Phantombuster API path. |
payload | object | no | JSON body. |
phantombuster.phantombuster_api_delete 2 parameters
kosmo integrations:schema phantombuster.phantombuster_api_delete --json | Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Phantombuster API path. |
payload | object | no | Optional JSON body. |
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.