agora_list_projects
List all Agora projects. Returns project IDs, names, and their current status.
- Operation
- Read
read - Full name
agora.agora_list_projects
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
communication
Agent-facing Lua documentation and function reference for the Agora KosmoKrator integration.
Agents call this integration through app.integrations.agora.*.
Use lua_read_doc("integrations.agora") inside KosmoKrator to discover the same reference at runtime.
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
List all Agora projects.
| Name | Type | Required | Description |
|---|---|---|---|
| — | — | — | No parameters required |
local result = app.integrations["agora"].list_projects({})
for _, project in ipairs(result.data) do
print(project.id .. ": " .. project.name .. " (" .. project.status .. ")")
end
Get details of a specific project by ID.
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The project ID |
local result = app.integrations["agora"].get_project({
project_id = "abc123"
})
print("Project: " .. result.name)
print("App ID: " .. result.app_id)
print("Status: " .. result.status)
Create a new Agora project.
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | A unique name for the project |
recording_config | object | no | Recording configuration (e.g., max_idle_time, stream_types) |
sign_key | boolean | no | Whether to enable a signaling key (default: false) |
local result = app.integrations["agora"].create_project({
name = "my-video-app",
sign_key = true
})
print("Created project: " .. result.name)
print("App ID: " .. result.app_id)
List cloud recordings with optional filters.
| Name | Type | Required | Description |
|---|---|---|---|
cname | string | no | Filter by channel name |
resource_id | string | no | Filter by resource ID |
limit | integer | no | Maximum results (default: 20) |
start_ts | integer | no | Unix timestamp to filter recordings starting after this time |
end_ts | integer | no | Unix timestamp to filter recordings ending before this time |
local result = app.integrations["agora"].list_recordings({
cname = "meeting-room",
limit = 10
})
for _, rec in ipairs(result.data) do
print(rec.sid .. ": " .. rec.cname .. " (" .. rec.status .. ")")
end
Get details of a specific recording by session ID.
| Name | Type | Required | Description |
|---|---|---|---|
recording_id | string | yes | The recording session ID (sid) |
local result = app.integrations["agora"].get_recording({
recording_id = "sid-abc123"
})
print("SID: " .. result.sid)
print("Channel: " .. result.cname)
print("Status: " .. result.status)
if result.file_list then
for _, file in ipairs(result.file_list) do
print(" File: " .. file.filename .. " -> " .. file.download_url)
end
end
Start a cloud recording for a channel.
| Name | Type | Required | Description |
|---|---|---|---|
cname | string | yes | The channel name to record |
uid | string | yes | User ID of the recording client in the channel |
clientRequest | object | no | Recording and storage configuration |
clientRequest = {
recordingConfig = {
maxIdleTime = 30,
streamTypes = 2,
channelType = 0
},
storageConfig = {
vendor = 1,
region = 0,
bucket = "my-bucket",
accessKey = "...",
secretKey = "...",
fileNamePrefix = { "recording" }
}
}
local result = app.integrations["agora"].start_recording({
cname = "meeting-room",
uid = "527841",
clientRequest = {
recordingConfig = {
maxIdleTime = 30,
streamTypes = 2
},
storageConfig = {
vendor = 1,
region = 0,
bucket = "my-recordings",
accessKey = "AKIA...",
secretKey = "secret...",
fileNamePrefix = { "agora", "rec" }
}
}
})
print("Recording started: " .. result.sid)
print("Resource ID: " .. result.resourceId)
Get information about the current authenticated Agora user.
| Name | Type | Required | Description |
|---|---|---|---|
| — | — | — | No parameters required |
local result = app.integrations["agora"].get_current_user({})
print("User: " .. result.user.name)
print("Email: " .. result.user.email)
If you have multiple Agora accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations["agora"].function_name({...})
-- Explicit default (portable across setups)
app.integrations["agora"].default.function_name({...})
-- Named accounts
app.integrations["agora"].production.function_name({...})
app.integrations["agora"].staging.function_name({...})
All functions are identical across accounts — only the credentials differ.
# Agora — Lua API Reference
## list_projects
List all Agora projects.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| — | — | — | No parameters required |
### Example
```lua
local result = app.integrations["agora"].list_projects({})
for _, project in ipairs(result.data) do
print(project.id .. ": " .. project.name .. " (" .. project.status .. ")")
end
```
---
## get_project
Get details of a specific project by ID.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The project ID |
### Example
```lua
local result = app.integrations["agora"].get_project({
project_id = "abc123"
})
print("Project: " .. result.name)
print("App ID: " .. result.app_id)
print("Status: " .. result.status)
```
---
## create_project
Create a new Agora project.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | string | yes | A unique name for the project |
| `recording_config` | object | no | Recording configuration (e.g., max_idle_time, stream_types) |
| `sign_key` | boolean | no | Whether to enable a signaling key (default: false) |
### Example
```lua
local result = app.integrations["agora"].create_project({
name = "my-video-app",
sign_key = true
})
print("Created project: " .. result.name)
print("App ID: " .. result.app_id)
```
---
## list_recordings
List cloud recordings with optional filters.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `cname` | string | no | Filter by channel name |
| `resource_id` | string | no | Filter by resource ID |
| `limit` | integer | no | Maximum results (default: 20) |
| `start_ts` | integer | no | Unix timestamp to filter recordings starting after this time |
| `end_ts` | integer | no | Unix timestamp to filter recordings ending before this time |
### Example
```lua
local result = app.integrations["agora"].list_recordings({
cname = "meeting-room",
limit = 10
})
for _, rec in ipairs(result.data) do
print(rec.sid .. ": " .. rec.cname .. " (" .. rec.status .. ")")
end
```
---
## get_recording
Get details of a specific recording by session ID.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `recording_id` | string | yes | The recording session ID (sid) |
### Example
```lua
local result = app.integrations["agora"].get_recording({
recording_id = "sid-abc123"
})
print("SID: " .. result.sid)
print("Channel: " .. result.cname)
print("Status: " .. result.status)
if result.file_list then
for _, file in ipairs(result.file_list) do
print(" File: " .. file.filename .. " -> " .. file.download_url)
end
end
```
---
## start_recording
Start a cloud recording for a channel.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `cname` | string | yes | The channel name to record |
| `uid` | string | yes | User ID of the recording client in the channel |
| `clientRequest` | object | no | Recording and storage configuration |
### clientRequest Syntax
```lua
clientRequest = {
recordingConfig = {
maxIdleTime = 30,
streamTypes = 2,
channelType = 0
},
storageConfig = {
vendor = 1,
region = 0,
bucket = "my-bucket",
accessKey = "...",
secretKey = "...",
fileNamePrefix = { "recording" }
}
}
```
### Example
```lua
local result = app.integrations["agora"].start_recording({
cname = "meeting-room",
uid = "527841",
clientRequest = {
recordingConfig = {
maxIdleTime = 30,
streamTypes = 2
},
storageConfig = {
vendor = 1,
region = 0,
bucket = "my-recordings",
accessKey = "AKIA...",
secretKey = "secret...",
fileNamePrefix = { "agora", "rec" }
}
}
})
print("Recording started: " .. result.sid)
print("Resource ID: " .. result.resourceId)
```
---
## get_current_user
Get information about the current authenticated Agora user.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| — | — | — | No parameters required |
### Example
```lua
local result = app.integrations["agora"].get_current_user({})
print("User: " .. result.user.name)
print("Email: " .. result.user.email)
```
---
## Multi-Account Usage
If you have multiple Agora accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations["agora"].function_name({...})
-- Explicit default (portable across setups)
app.integrations["agora"].default.function_name({...})
-- Named accounts
app.integrations["agora"].production.function_name({...})
app.integrations["agora"].staging.function_name({...})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.agora.agora_list_projects({})
print(result) agora_list_projectsList all Agora projects. Returns project IDs, names, and their current status.
readagora.agora_list_projects| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
agora_get_projectGet details of a specific Agora project by ID, including its name, App ID, App Certificate, and status.
readagora.agora_get_project| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The project ID. |
agora_create_projectCreate a new Agora project. Specify a project name and optional configuration such as recording settings and authentication mode.
writeagora.agora_create_project| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | A unique name for the project. |
recording_config | object | no | Recording configuration as a JSON object (e.g., {"max_idle_time": 30, "stream_types": 2}). |
sign_key | boolean | no | Whether to enable a signaling key for the project (default: false). |
agora_list_recordingsList cloud recordings from Agora with optional filters. Supports filtering by channel name, resource ID, and time range.
readagora.agora_list_recordings| Parameter | Type | Required | Description |
|---|---|---|---|
cname | string | no | Filter recordings by channel name. |
resource_id | string | no | Filter by resource ID. |
limit | integer | no | Maximum number of recordings to return (default: 20). |
start_ts | integer | no | Unix timestamp to filter recordings starting after this time. |
end_ts | integer | no | Unix timestamp to filter recordings ending before this time. |
agora_get_recordingGet details of a specific Agora cloud recording by its session ID (sid), including status, file list, and download URLs.
readagora.agora_get_recording| Parameter | Type | Required | Description |
|---|---|---|---|
recording_id | string | yes | The recording session ID (sid). |
agora_start_recordingStart a cloud recording for an Agora channel. Specify the channel name, UID, and recording configuration such as container format, storage settings, and layout.
writeagora.agora_start_recording| Parameter | Type | Required | Description |
|---|---|---|---|
cname | string | yes | The channel name to record. |
uid | string | yes | The user ID of the recording client in the channel. |
clientRequest | object | no | Recording configuration including recordingConfig and storageConfig (e.g., {"recordingConfig": {"maxIdleTime": 30, "streamTypes": 2}, "storageConfig": {"vendor": 1, "region": 0, "bucket": "my-bucket", "accessKey": "...", "secretKey": "...", "fileNamePrefix": ["recording"]}}). |
agora_get_current_userGet information about the current authenticated Agora user.
readagora.agora_get_current_user| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||