KosmoKrator

communication

Daily.co Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the Daily.co KosmoKrator integration.

7 functions 5 read 2 write API key auth

Lua Namespace

Agents call this integration through app.integrations.daily_co.*. Use lua_read_doc("integrations.daily-co") inside KosmoKrator to discover the same reference at runtime.

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Daily.co — Lua API Reference

list_rooms

List video rooms with optional pagination.

Parameters

NameTypeRequiredDescription
limitintegernoMaximum number of rooms to return (default: 20, max: 100)
ending_beforestringnoRoom ID for cursor-based pagination (returns rooms before this ID)
starting_afterstringnoRoom ID for cursor-based pagination (returns rooms after this ID)

Example

local result = app.integrations["daily-co"].list_rooms({
  limit = 10
})

for _, room in ipairs(result.data) do
  print(room.id .. ": " .. room.name .. " (" .. room.url .. ")")
end

get_room

Get details of a specific room by name.

Parameters

NameTypeRequiredDescription
namestringyesThe room name

Example

local result = app.integrations["daily-co"].get_room({
  name = "standup"
})

print("Room: " .. result.name)
print("URL: " .. result.url)
print("Privacy: " .. result.privacy)

create_room

Create a new video room.

Parameters

NameTypeRequiredDescription
namestringnoA unique name for the room (auto-generated if omitted)
privacystringnoRoom privacy: "private" (default) or "public"
propertiesobjectnoRoom configuration (e.g., max_participants, enable_recording, exp)

Properties Syntax

properties = {
  max_participants = 10,
  enable_recording = "cloud",
  exp = 1700000000
}

Example

local result = app.integrations["daily-co"].create_room({
  name = "team-sync",
  privacy = "public",
  properties = {
    max_participants = 25,
    enable_recording = "cloud"
  }
})

print("Created room: " .. result.name)
print("URL: " .. result.url)

delete_room

Delete a video room by name.

Parameters

NameTypeRequiredDescription
namestringyesThe room name to delete

Example

local result = app.integrations["daily-co"].delete_room({
  name = "old-room"
})

print("Room deleted successfully")

list_meetings

List meetings with optional filters.

Parameters

NameTypeRequiredDescription
roomstringnoFilter by room name
limitintegernoMaximum results (default: 20, max: 100)
starting_afterstringnoMeeting ID for cursor-based pagination
ending_beforestringnoMeeting ID for cursor-based pagination

Example

local result = app.integrations["daily-co"].list_meetings({
  room = "standup",
  limit = 10
})

for _, meeting in ipairs(result.data) do
  print(meeting.id .. ": " .. meeting.room .. " at " .. meeting.start_time)
end

get_meeting

Get details of a specific meeting by ID.

Parameters

NameTypeRequiredDescription
meeting_idstringyesThe meeting UUID

Example

local result = app.integrations["daily-co"].get_meeting({
  meeting_id = "abc123-def456"
})

print("Meeting ID: " .. result.id)
print("Room: " .. result.room)
print("Start: " .. result.start_time)
print("Duration: " .. (result.duration or "ongoing"))

list_recordings

List recordings with optional filters.

Parameters

NameTypeRequiredDescription
roomstringnoFilter by room name
limitintegernoMaximum results (default: 20, max: 100)
starting_afterstringnoRecording ID for cursor-based pagination
ending_beforestringnoRecording ID for cursor-based pagination

Example

local result = app.integrations["daily-co"].list_recordings({
  room = "standup",
  limit = 10
})

for _, rec in ipairs(result.data) do
  print(rec.id .. ": " .. rec.room .. " (" .. rec.status .. ")")
  if rec.download_link then
    print("  Download: " .. rec.download_link)
  end
end

Multi-Account Usage

If you have multiple Daily.co accounts configured, use account-specific namespaces:

-- Default account (always works)
app.integrations["daily-co"].function_name({...})

-- Explicit default (portable across setups)
app.integrations["daily-co"].default.function_name({...})

-- Named accounts
app.integrations["daily-co"].production.function_name({...})
app.integrations["daily-co"].staging.function_name({...})

All functions are identical across accounts — only the credentials differ.

Raw agent markdown
# Daily.co — Lua API Reference

## list_rooms

List video rooms with optional pagination.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Maximum number of rooms to return (default: 20, max: 100) |
| `ending_before` | string | no | Room ID for cursor-based pagination (returns rooms before this ID) |
| `starting_after` | string | no | Room ID for cursor-based pagination (returns rooms after this ID) |

### Example

```lua
local result = app.integrations["daily-co"].list_rooms({
  limit = 10
})

for _, room in ipairs(result.data) do
  print(room.id .. ": " .. room.name .. " (" .. room.url .. ")")
end
```

---

## get_room

Get details of a specific room by name.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | string | yes | The room name |

### Example

```lua
local result = app.integrations["daily-co"].get_room({
  name = "standup"
})

print("Room: " .. result.name)
print("URL: " .. result.url)
print("Privacy: " .. result.privacy)
```

---

## create_room

Create a new video room.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | string | no | A unique name for the room (auto-generated if omitted) |
| `privacy` | string | no | Room privacy: `"private"` (default) or `"public"` |
| `properties` | object | no | Room configuration (e.g., max_participants, enable_recording, exp) |

### Properties Syntax

```lua
properties = {
  max_participants = 10,
  enable_recording = "cloud",
  exp = 1700000000
}
```

### Example

```lua
local result = app.integrations["daily-co"].create_room({
  name = "team-sync",
  privacy = "public",
  properties = {
    max_participants = 25,
    enable_recording = "cloud"
  }
})

print("Created room: " .. result.name)
print("URL: " .. result.url)
```

---

## delete_room

Delete a video room by name.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | string | yes | The room name to delete |

### Example

```lua
local result = app.integrations["daily-co"].delete_room({
  name = "old-room"
})

print("Room deleted successfully")
```

---

## list_meetings

List meetings with optional filters.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `room` | string | no | Filter by room name |
| `limit` | integer | no | Maximum results (default: 20, max: 100) |
| `starting_after` | string | no | Meeting ID for cursor-based pagination |
| `ending_before` | string | no | Meeting ID for cursor-based pagination |

### Example

```lua
local result = app.integrations["daily-co"].list_meetings({
  room = "standup",
  limit = 10
})

for _, meeting in ipairs(result.data) do
  print(meeting.id .. ": " .. meeting.room .. " at " .. meeting.start_time)
end
```

---

## get_meeting

Get details of a specific meeting by ID.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `meeting_id` | string | yes | The meeting UUID |

### Example

```lua
local result = app.integrations["daily-co"].get_meeting({
  meeting_id = "abc123-def456"
})

print("Meeting ID: " .. result.id)
print("Room: " .. result.room)
print("Start: " .. result.start_time)
print("Duration: " .. (result.duration or "ongoing"))
```

---

## list_recordings

List recordings with optional filters.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `room` | string | no | Filter by room name |
| `limit` | integer | no | Maximum results (default: 20, max: 100) |
| `starting_after` | string | no | Recording ID for cursor-based pagination |
| `ending_before` | string | no | Recording ID for cursor-based pagination |

### Example

```lua
local result = app.integrations["daily-co"].list_recordings({
  room = "standup",
  limit = 10
})

for _, rec in ipairs(result.data) do
  print(rec.id .. ": " .. rec.room .. " (" .. rec.status .. ")")
  if rec.download_link then
    print("  Download: " .. rec.download_link)
  end
end
```

---

## Multi-Account Usage

If you have multiple Daily.co accounts configured, use account-specific namespaces:

```lua
-- Default account (always works)
app.integrations["daily-co"].function_name({...})

-- Explicit default (portable across setups)
app.integrations["daily-co"].default.function_name({...})

-- Named accounts
app.integrations["daily-co"].production.function_name({...})
app.integrations["daily-co"].staging.function_name({...})
```

All functions are identical across accounts — only the credentials differ.

Metadata-Derived Lua Example

local result = app.integrations.daily_co.daily_co_list_rooms({
  limit = 1,
  ending_before = "example_ending_before",
  starting_after = "example_starting_after"
})
print(result)

Functions

daily_co_list_rooms

List video rooms from Daily.co. Returns a paginated list of rooms with their names, URLs, privacy settings, and creation dates.

Operation
Read read
Full name
daily-co.daily_co_list_rooms
ParameterTypeRequiredDescription
limit integer no Maximum number of rooms to return (default: 20, max: 100).
ending_before string no Room ID used for cursor-based pagination. Returns rooms before this ID.
starting_after string no Room ID used for cursor-based pagination. Returns rooms after this ID.

daily_co_get_room

Get details of a specific Daily.co room by name, including its URL, privacy setting, configuration properties, and participant limits.

Operation
Read read
Full name
daily-co.daily_co_get_room
ParameterTypeRequiredDescription
name string yes The room name.

daily_co_create_room

Create a new Daily.co video room. Specify a room name and optional properties like privacy mode, max participants, and recording settings.

Operation
Write write
Full name
daily-co.daily_co_create_room
ParameterTypeRequiredDescription
name string no A unique name for the room. If omitted, Daily.co generates a random name.
privacy string no Room privacy: "private" (default) or "public".
properties object no Room configuration as a JSON object (e.g., {"max_participants": 10, "enable_recording": "cloud", "exp": 1700000000}).

daily_co_delete_room

Delete a Daily.co video room by name. This permanently removes the room and it cannot be rejoined.

Operation
Write write
Full name
daily-co.daily_co_delete_room
ParameterTypeRequiredDescription
name string yes The room name to delete.

daily_co_list_meetings

List meetings from Daily.co with optional filters. Supports filtering by room, time range, and cursor-based pagination.

Operation
Read read
Full name
daily-co.daily_co_list_meetings
ParameterTypeRequiredDescription
room string no Filter meetings by room name.
limit integer no Maximum number of meetings to return (default: 20, max: 100).
starting_after string no Meeting ID used for cursor-based pagination. Returns meetings after this ID.
ending_before string no Meeting ID used for cursor-based pagination. Returns meetings before this ID.

daily_co_get_meeting

Get details of a specific Daily.co meeting by ID, including participant information, duration, and session data.

Operation
Read read
Full name
daily-co.daily_co_get_meeting
ParameterTypeRequiredDescription
meeting_id string yes The meeting UUID.

daily_co_list_recordings

List recordings from Daily.co with optional filters. Supports filtering by room, time range, and cursor-based pagination.

Operation
Read read
Full name
daily-co.daily_co_list_recordings
ParameterTypeRequiredDescription
room string no Filter recordings by room name.
limit integer no Maximum number of recordings to return (default: 20, max: 100).
starting_after string no Recording ID used for cursor-based pagination. Returns recordings after this ID.
ending_before string no Recording ID used for cursor-based pagination. Returns recordings before this ID.