KosmoKrator

productivity

Agora CLI for AI Agents

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

Agora CLI Setup

Agora can be configured headlessly with `kosmokrator integrations:configure agora`.

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 agora --set customer_id="$AGORA_CUSTOMER_ID" --set customer_secret="$AGORA_CUSTOMER_SECRET" --set app_id="$AGORA_APP_ID" --enable --read allow --write ask --json
kosmokrator integrations:doctor agora --json
kosmokrator integrations:status --json

Credentials

Authentication type: basic auth basic_auth. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
customer_id AGORA_CUSTOMER_ID Text text yes Customer ID
customer_secret AGORA_CUSTOMER_SECRET Secret secret yes Customer Secret
app_id AGORA_APP_ID Text text yes App ID
url AGORA_URL URL url no REST 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 agora.agora_acquire_recording_resource '{"cname":"example_cname","uid":"example_uid","scene":1,"resource_expired_hour":1,"start_parameter":"example_start_parameter","client_request":"example_client_request"}' --json
Provider shortcut
kosmo integrations:agora agora_acquire_recording_resource '{"cname":"example_cname","uid":"example_uid","scene":1,"resource_expired_hour":1,"start_parameter":"example_start_parameter","client_request":"example_client_request"}' --json

Discovery

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

Discovery commands
kosmo integrations:docs agora --json
kosmo integrations:docs agora.agora_acquire_recording_resource --json
kosmo integrations:schema agora.agora_acquire_recording_resource --json
kosmo integrations:search "Agora" --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.

agora.agora_acquire_recording_resource

Request a resource ID before starting an Agora Cloud Recording session.

Write write
Parameters
cname, uid, scene, resource_expired_hour, start_parameter, client_request
Generic call
kosmo integrations:call agora.agora_acquire_recording_resource '{"cname":"example_cname","uid":"example_uid","scene":1,"resource_expired_hour":1,"start_parameter":"example_start_parameter","client_request":"example_client_request"}' --json
Shortcut
kosmo integrations:agora agora_acquire_recording_resource '{"cname":"example_cname","uid":"example_uid","scene":1,"resource_expired_hour":1,"start_parameter":"example_start_parameter","client_request":"example_client_request"}' --json

agora.agora_start_recording

Start an Agora Cloud Recording session using a resource ID returned by agora_acquire_recording_resource.

Write write
Parameters
resource_id, mode, cname, uid, token, recording_config, recording_file_config, storage_config, snapshot_config, extension_service_config, client_request
Generic call
kosmo integrations:call agora.agora_start_recording '{"resource_id":"example_resource_id","mode":"example_mode","cname":"example_cname","uid":"example_uid","token":"example_token","recording_config":"example_recording_config","recording_file_config":"example_recording_file_config","storage_config":"example_storage_config"}' --json
Shortcut
kosmo integrations:agora agora_start_recording '{"resource_id":"example_resource_id","mode":"example_mode","cname":"example_cname","uid":"example_uid","token":"example_token","recording_config":"example_recording_config","recording_file_config":"example_recording_file_config","storage_config":"example_storage_config"}' --json

agora.agora_query_recording

Query the status of an active Agora Cloud Recording session.

Read read
Parameters
resource_id, sid, mode
Generic call
kosmo integrations:call agora.agora_query_recording '{"resource_id":"example_resource_id","sid":"example_sid","mode":"example_mode"}' --json
Shortcut
kosmo integrations:agora agora_query_recording '{"resource_id":"example_resource_id","sid":"example_sid","mode":"example_mode"}' --json

agora.agora_update_recording

Update an active Agora Cloud Recording subscription list or web recorder state.

Write write
Parameters
resource_id, sid, mode, cname, uid, stream_subscribe, web_recorder_config, rtmp_publish_config, client_request
Generic call
kosmo integrations:call agora.agora_update_recording '{"resource_id":"example_resource_id","sid":"example_sid","mode":"example_mode","cname":"example_cname","uid":"example_uid","stream_subscribe":"example_stream_subscribe","web_recorder_config":"example_web_recorder_config","rtmp_publish_config":"example_rtmp_publish_config"}' --json
Shortcut
kosmo integrations:agora agora_update_recording '{"resource_id":"example_resource_id","sid":"example_sid","mode":"example_mode","cname":"example_cname","uid":"example_uid","stream_subscribe":"example_stream_subscribe","web_recorder_config":"example_web_recorder_config","rtmp_publish_config":"example_rtmp_publish_config"}' --json

agora.agora_update_recording_layout

Update the video mixing layout for an active Agora composite recording.

Write write
Parameters
resource_id, sid, cname, uid, mixed_video_layout, background_color, layout_config, background_config, default_user_background_image, client_request
Generic call
kosmo integrations:call agora.agora_update_recording_layout '{"resource_id":"example_resource_id","sid":"example_sid","cname":"example_cname","uid":"example_uid","mixed_video_layout":1,"background_color":"example_background_color","layout_config":"example_layout_config","background_config":"example_background_config"}' --json
Shortcut
kosmo integrations:agora agora_update_recording_layout '{"resource_id":"example_resource_id","sid":"example_sid","cname":"example_cname","uid":"example_uid","mixed_video_layout":1,"background_color":"example_background_color","layout_config":"example_layout_config","background_config":"example_background_config"}' --json

agora.agora_stop_recording

Stop an active Agora Cloud Recording session.

Write write
Parameters
resource_id, sid, mode, cname, uid, async_stop, client_request
Generic call
kosmo integrations:call agora.agora_stop_recording '{"resource_id":"example_resource_id","sid":"example_sid","mode":"example_mode","cname":"example_cname","uid":"example_uid","async_stop":true,"client_request":"example_client_request"}' --json
Shortcut
kosmo integrations:agora agora_stop_recording '{"resource_id":"example_resource_id","sid":"example_sid","mode":"example_mode","cname":"example_cname","uid":"example_uid","async_stop":true,"client_request":"example_client_request"}' --json

agora.agora_get_notification_ips

Fetch Agora message notification service IP addresses for firewall allowlists.

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

Function Schemas

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

agora.agora_acquire_recording_resource 6 parameters
Schema command
kosmo integrations:schema agora.agora_acquire_recording_resource --json
ParameterTypeRequiredDescription
cname string yes Agora channel name to record.
uid string yes Recording client UID. Must be unique in the channel.
scene integer no Optional Agora scene value. Common default is 0.
resource_expired_hour integer no Optional resource expiration in hours.
start_parameter object no Optional Agora startParameter object for chained acquire/start configuration.
client_request object no Raw acquire clientRequest object. Explicit fields above override matching values.
agora.agora_start_recording 11 parameters
Schema command
kosmo integrations:schema agora.agora_start_recording --json
ParameterTypeRequiredDescription
resource_id string yes Resource ID returned by acquire.
mode string yes Recording mode: individual, mix, or web.
cname string yes Agora channel name to record.
uid string yes Recording client UID used in acquire.
token string no Optional RTC token for the recording client.
recording_config object no Agora recordingConfig object.
recording_file_config object no Agora recordingFileConfig object, for example avFileType.
storage_config object no Agora storageConfig object for the destination cloud storage.
snapshot_config object no Optional snapshotConfig object.
extension_service_config object no Optional extensionServiceConfig object for web recording or streaming extensions.
client_request object no Raw start clientRequest object. Explicit fields above override matching values.
agora.agora_query_recording 3 parameters
Schema command
kosmo integrations:schema agora.agora_query_recording --json
ParameterTypeRequiredDescription
resource_id string yes Resource ID returned by acquire.
sid string yes Recording session ID returned by start.
mode string yes Recording mode: individual, mix, or web.
agora.agora_update_recording 9 parameters
Schema command
kosmo integrations:schema agora.agora_update_recording --json
ParameterTypeRequiredDescription
resource_id string yes Resource ID returned by acquire.
sid string yes Recording session ID returned by start.
mode string yes Recording mode: individual, mix, or web.
cname string yes Agora channel name used for the recording.
uid string yes Recording client UID used in acquire and start.
stream_subscribe object no Agora streamSubscribe object for subscription updates.
web_recorder_config object no Agora webRecorderConfig object for web recording updates.
rtmp_publish_config object no Agora rtmpPublishConfig object for web recording stream publishing updates.
client_request object no Raw update clientRequest object. Explicit fields above override matching values.
agora.agora_update_recording_layout 10 parameters
Schema command
kosmo integrations:schema agora.agora_update_recording_layout --json
ParameterTypeRequiredDescription
resource_id string yes Resource ID returned by acquire.
sid string yes Recording session ID returned by start.
cname string yes Agora channel name used for the recording.
uid string yes Recording client UID used in acquire and start.
mixed_video_layout integer no Agora mixedVideoLayout value.
background_color string no Background color for mixed layout, for example "#000000".
layout_config array no Agora layoutConfig array for custom mixed layout regions.
background_config array no Agora backgroundConfig array.
default_user_background_image string no Default user background image URL.
client_request object no Raw updateLayout clientRequest object. Explicit fields above override matching values.
agora.agora_stop_recording 7 parameters
Schema command
kosmo integrations:schema agora.agora_stop_recording --json
ParameterTypeRequiredDescription
resource_id string yes Resource ID returned by acquire.
sid string yes Recording session ID returned by start.
mode string yes Recording mode: individual, mix, or web.
cname string yes Agora channel name used for the recording.
uid string yes Recording client UID used in acquire and start.
async_stop boolean no Return immediately instead of waiting for files to upload.
client_request object no Raw stop clientRequest object. async_stop overrides async_stop inside this object.
agora.agora_get_notification_ips 0 parameters
Schema command
kosmo integrations:schema agora.agora_get_notification_ips --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.