KosmoKrator

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, 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 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.

KeyEnv varTypeRequiredLabel
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.

Generic CLI call
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
Provider shortcut
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.

Discovery commands
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 read
Parameters
input_types, output_types, agent_ids, with_argument, with_agent_slots_factor
Generic call
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
Shortcut
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 read
Parameters
id, with_manifest, with_agent_object, with_code, with_slaves, with_sub_slaves
Generic call
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
Shortcut
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 write
Parameters
id, argument, arguments, bonus_argument, save_argument, payload
Generic call
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
Shortcut
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 write
Parameters
id, name, script, branch, environment, launch_type, argument, payload
Generic call
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
Shortcut
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 write
Parameters
id
Generic call
kosmo integrations:call phantombuster.phantombuster_stop_agent '{"id":"example_id"}' --json
Shortcut
kosmo integrations:phantombuster phantombuster_stop_agent '{"id":"example_id"}' --json

phantombuster.phantombuster_delete_agent

Delete a Phantombuster agent by ID.

Write write
Parameters
id
Generic call
kosmo integrations:call phantombuster.phantombuster_delete_agent '{"id":"example_id"}' --json
Shortcut
kosmo integrations:phantombuster phantombuster_delete_agent '{"id":"example_id"}' --json

phantombuster.phantombuster_list_deleted_agents

List deleted Phantombuster agents in the current organization.

Read read
Parameters
none
Generic call
kosmo integrations:call phantombuster.phantombuster_list_deleted_agents '{}' --json
Shortcut
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 read
Parameters
id, from_output_pos, prev_container_id, prev_status, prev_runtime_event_index
Generic call
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
Shortcut
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 read
Parameters
agent_id, before_ended_at, limit, mode, with_runtime_events
Generic call
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
Shortcut
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 read
Parameters
id, with_result_object, with_output, with_runtime_events, with_newer_and_older_container_id
Generic call
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
Shortcut
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 read
Parameters
id, mode
Generic call
kosmo integrations:call phantombuster.phantombuster_fetch_container_output '{"id":"example_id","mode":"example_mode"}' --json
Shortcut
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 read
Parameters
id
Generic call
kosmo integrations:call phantombuster.phantombuster_fetch_container_result_object '{"id":"example_id"}' --json
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call phantombuster.phantombuster_list_scripts '{}' --json
Shortcut
kosmo integrations:phantombuster phantombuster_list_scripts '{}' --json

phantombuster.phantombuster_get_script

Get a Phantombuster script by ID.

Read read
Parameters
id
Generic call
kosmo integrations:call phantombuster.phantombuster_get_script '{"id":"example_id"}' --json
Shortcut
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 write
Parameters
payload
Generic call
kosmo integrations:call phantombuster.phantombuster_save_script '{"payload":"example_payload"}' --json
Shortcut
kosmo integrations:phantombuster phantombuster_save_script '{"payload":"example_payload"}' --json

phantombuster.phantombuster_delete_script

Delete a Phantombuster script by ID.

Write write
Parameters
id
Generic call
kosmo integrations:call phantombuster.phantombuster_delete_script '{"id":"example_id"}' --json
Shortcut
kosmo integrations:phantombuster phantombuster_delete_script '{"id":"example_id"}' --json

phantombuster.phantombuster_list_branches

List script branches in the current Phantombuster organization.

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

phantombuster.phantombuster_get_organization

Get current Phantombuster organization metadata and optional configuration details.

Read read
Parameters
with_global_object, with_proxies, with_crm_integrations, with_custom_prompts
Generic call
kosmo integrations:call phantombuster.phantombuster_get_organization '{"with_global_object":true,"with_proxies":true,"with_crm_integrations":true,"with_custom_prompts":true}' --json
Shortcut
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 read
Parameters
ip
Generic call
kosmo integrations:call phantombuster.phantombuster_get_ip_location '{"ip":"example_ip"}' --json
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call phantombuster.phantombuster_get_current_user '{}' --json
Shortcut
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 read
Parameters
path, params
Generic call
kosmo integrations:call phantombuster.phantombuster_api_get '{"path":"example_path","params":"example_params"}' --json
Shortcut
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 write
Parameters
path, payload
Generic call
kosmo integrations:call phantombuster.phantombuster_api_post '{"path":"example_path","payload":"example_payload"}' --json
Shortcut
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 write
Parameters
path, payload
Generic call
kosmo integrations:call phantombuster.phantombuster_api_put '{"path":"example_path","payload":"example_payload"}' --json
Shortcut
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 write
Parameters
path, payload
Generic call
kosmo integrations:call phantombuster.phantombuster_api_delete '{"path":"example_path","payload":"example_payload"}' --json
Shortcut
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
Schema command
kosmo integrations:schema phantombuster.phantombuster_list_agents --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema phantombuster.phantombuster_get_agent --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema phantombuster.phantombuster_launch_agent --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema phantombuster.phantombuster_save_agent --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema phantombuster.phantombuster_stop_agent --json
ParameterTypeRequiredDescription
id string yes Agent ID.
phantombuster.phantombuster_delete_agent 1 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_delete_agent --json
ParameterTypeRequiredDescription
id string yes Agent ID.
phantombuster.phantombuster_list_deleted_agents 0 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_list_deleted_agents --json
ParameterTypeRequiredDescription
No parameters.
phantombuster.phantombuster_fetch_agent_output 5 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_fetch_agent_output --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema phantombuster.phantombuster_list_containers --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema phantombuster.phantombuster_get_container --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema phantombuster.phantombuster_fetch_container_output --json
ParameterTypeRequiredDescription
id string yes Container ID.
mode string no Output mode. Defaults to json.
phantombuster.phantombuster_fetch_container_result_object 1 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_fetch_container_result_object --json
ParameterTypeRequiredDescription
id string yes Container ID.
phantombuster.phantombuster_list_scripts 0 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_list_scripts --json
ParameterTypeRequiredDescription
No parameters.
phantombuster.phantombuster_get_script 1 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_get_script --json
ParameterTypeRequiredDescription
id string yes Script ID.
phantombuster.phantombuster_save_script 1 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_save_script --json
ParameterTypeRequiredDescription
payload object yes Official /scripts/save payload.
phantombuster.phantombuster_delete_script 1 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_delete_script --json
ParameterTypeRequiredDescription
id string yes Script ID.
phantombuster.phantombuster_list_branches 0 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_list_branches --json
ParameterTypeRequiredDescription
No parameters.
phantombuster.phantombuster_get_organization 4 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_get_organization --json
ParameterTypeRequiredDescription
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
Schema command
kosmo integrations:schema phantombuster.phantombuster_get_ip_location --json
ParameterTypeRequiredDescription
ip string yes IPv4 or IPv6 address.
phantombuster.phantombuster_get_current_user 0 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_get_current_user --json
ParameterTypeRequiredDescription
No parameters.
phantombuster.phantombuster_api_get 2 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_api_get --json
ParameterTypeRequiredDescription
path string yes Relative Phantombuster API path.
params object no Query parameters.
phantombuster.phantombuster_api_post 2 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_api_post --json
ParameterTypeRequiredDescription
path string yes Relative Phantombuster API path.
payload object no JSON body.
phantombuster.phantombuster_api_put 2 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_api_put --json
ParameterTypeRequiredDescription
path string yes Relative Phantombuster API path.
payload object no JSON body.
phantombuster.phantombuster_api_delete 2 parameters
Schema command
kosmo integrations:schema phantombuster.phantombuster_api_delete --json
ParameterTypeRequiredDescription
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.