KosmoKrator

video

Loom Lua API for KosmoKrator Agents

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

8 functions 6 read 2 write Bearer token auth

Lua Namespace

Agents call this integration through app.integrations.loom.*. Use lua_read_doc("integrations.loom") 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.

Loom — Lua API Reference

list_videos

List Loom videos with pagination support.

Parameters

NameTypeRequiredDescription
limitintegernoMaximum number of videos to return (default: 20, max: 50)
pageintegernoPage number for pagination (default: 1)

Examples

List recent videos

local result = app.integrations.loom.list_videos({
  limit = 10,
  page = 1
})

for _, video in ipairs(result.videos) do
  print(video.id .. ": " .. video.title)
end

Paginate through all videos

local page = 1
local limit = 50

repeat
  local result = app.integrations.loom.list_videos({
    limit = limit,
    page = page
  })

  for _, video in ipairs(result.videos or {}) do
    print(video.title)
  end

  page = page + 1
until #result == 0 or #result < limit

get_video

Get detailed information about a specific Loom video.

Parameters

NameTypeRequiredDescription
video_idstringyesThe unique identifier of the Loom video

Examples

Get video details

local result = app.integrations.loom.get_video({
  video_id = "abc123-def456"
})

print(result.title)
print(result.duration)
print(result.playback_url)

create_video

Create a new Loom video placeholder with a title and optional description.

Parameters

NameTypeRequiredDescription
titlestringyesThe title of the video
descriptionstringnoAn optional description for the video

Examples

Create a video

local result = app.integrations.loom.create_video({
  title = "Sprint Review - Week 14",
  description = "Weekly sprint review covering completed features and blockers."
})

print("Created video: " .. result.id)

delete_video

Delete a Loom video permanently. This action cannot be undone.

Parameters

NameTypeRequiredDescription
video_idstringyesThe unique identifier of the video to delete

Examples

Delete a video

local result = app.integrations.loom.delete_video({
  video_id = "abc123-def456"
})

print(result)

list_folders

List Loom folders with pagination support.

Parameters

NameTypeRequiredDescription
limitintegernoMaximum number of folders to return (default: 20)
pageintegernoPage number for pagination (default: 1)

Examples

List folders

local result = app.integrations.loom.list_folders({
  limit = 20,
  page = 1
})

for _, folder in ipairs(result.folders or result) do
  print(folder.name .. " (ID: " .. folder.id .. ")")
end

get_folder

Get detailed information about a specific Loom folder.

Parameters

NameTypeRequiredDescription
folder_idstringyesThe unique identifier of the Loom folder

Examples

Get folder details

local result = app.integrations.loom.get_folder({
  folder_id = "folder-abc123"
})

print(result.name)
print("Video count: " .. result.video_count)

list_workspaces

List all Loom workspaces accessible to the authenticated user.

Parameters

No parameters required.

Examples

List workspaces

local result = app.integrations.loom.list_workspaces({})

for _, workspace in ipairs(result.workspaces or result) do
  print(workspace.name .. " (ID: " .. workspace.id .. ")")
end

get_current_user

Get the authenticated Loom user’s profile information.

Parameters

No parameters required.

Examples

Get current user profile

local result = app.integrations.loom.get_current_user({})

print("Logged in as: " .. result.name .. " (" .. result.email .. ")")

Multi-Account Usage

If you have multiple Loom accounts configured, use account-specific namespaces:

-- Default account (always works)
app.integrations.loom.function_name({...})

-- Explicit default (portable across setups)
app.integrations.loom.default.function_name({...})

-- Named accounts
app.integrations.loom.work.function_name({...})
app.integrations.loom.personal.function_name({...})

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

Raw agent markdown
# Loom — Lua API Reference

## list_videos

List Loom videos with pagination support.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Maximum number of videos to return (default: 20, max: 50) |
| `page` | integer | no | Page number for pagination (default: 1) |

### Examples

#### List recent videos

```lua
local result = app.integrations.loom.list_videos({
  limit = 10,
  page = 1
})

for _, video in ipairs(result.videos) do
  print(video.id .. ": " .. video.title)
end
```

#### Paginate through all videos

```lua
local page = 1
local limit = 50

repeat
  local result = app.integrations.loom.list_videos({
    limit = limit,
    page = page
  })

  for _, video in ipairs(result.videos or {}) do
    print(video.title)
  end

  page = page + 1
until #result == 0 or #result < limit
```

---

## get_video

Get detailed information about a specific Loom video.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `video_id` | string | yes | The unique identifier of the Loom video |

### Examples

#### Get video details

```lua
local result = app.integrations.loom.get_video({
  video_id = "abc123-def456"
})

print(result.title)
print(result.duration)
print(result.playback_url)
```

---

## create_video

Create a new Loom video placeholder with a title and optional description.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `title` | string | yes | The title of the video |
| `description` | string | no | An optional description for the video |

### Examples

#### Create a video

```lua
local result = app.integrations.loom.create_video({
  title = "Sprint Review - Week 14",
  description = "Weekly sprint review covering completed features and blockers."
})

print("Created video: " .. result.id)
```

---

## delete_video

Delete a Loom video permanently. This action cannot be undone.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `video_id` | string | yes | The unique identifier of the video to delete |

### Examples

#### Delete a video

```lua
local result = app.integrations.loom.delete_video({
  video_id = "abc123-def456"
})

print(result)
```

---

## list_folders

List Loom folders with pagination support.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Maximum number of folders to return (default: 20) |
| `page` | integer | no | Page number for pagination (default: 1) |

### Examples

#### List folders

```lua
local result = app.integrations.loom.list_folders({
  limit = 20,
  page = 1
})

for _, folder in ipairs(result.folders or result) do
  print(folder.name .. " (ID: " .. folder.id .. ")")
end
```

---

## get_folder

Get detailed information about a specific Loom folder.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `folder_id` | string | yes | The unique identifier of the Loom folder |

### Examples

#### Get folder details

```lua
local result = app.integrations.loom.get_folder({
  folder_id = "folder-abc123"
})

print(result.name)
print("Video count: " .. result.video_count)
```

---

## list_workspaces

List all Loom workspaces accessible to the authenticated user.

### Parameters

No parameters required.

### Examples

#### List workspaces

```lua
local result = app.integrations.loom.list_workspaces({})

for _, workspace in ipairs(result.workspaces or result) do
  print(workspace.name .. " (ID: " .. workspace.id .. ")")
end
```

---

## get_current_user

Get the authenticated Loom user's profile information.

### Parameters

No parameters required.

### Examples

#### Get current user profile

```lua
local result = app.integrations.loom.get_current_user({})

print("Logged in as: " .. result.name .. " (" .. result.email .. ")")
```

---

## Multi-Account Usage

If you have multiple Loom accounts configured, use account-specific namespaces:

```lua
-- Default account (always works)
app.integrations.loom.function_name({...})

-- Explicit default (portable across setups)
app.integrations.loom.default.function_name({...})

-- Named accounts
app.integrations.loom.work.function_name({...})
app.integrations.loom.personal.function_name({...})
```

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

Metadata-Derived Lua Example

local result = app.integrations.loom.loom_list_videos({
  limit = 1,
  page = 1
})
print(result)

Functions

loom_list_videos

List Loom videos. Returns video titles, IDs, durations, URLs, and creation dates. Use limit and page for pagination.

Operation
Read read
Full name
loom.loom_list_videos
ParameterTypeRequiredDescription
limit integer no Maximum number of videos to return (default: 20, max: 50).
page integer no Page number for pagination (default: 1).

loom_get_video

Get detailed information about a specific Loom video by its ID, including playback URL, duration, thumbnail, and metadata.

Operation
Read read
Full name
loom.loom_get_video
ParameterTypeRequiredDescription
video_id string yes The unique identifier of the Loom video.

loom_create_video

Create a new Loom video with a title and optional description. Returns the video details and upload URLs.

Operation
Write write
Full name
loom.loom_create_video
ParameterTypeRequiredDescription
title string yes The title of the video.
description string no An optional description for the video.

loom_delete_video

Delete a Loom video permanently. This action cannot be undone.

Operation
Write write
Full name
loom.loom_delete_video
ParameterTypeRequiredDescription
video_id string yes The unique identifier of the Loom video to delete.

loom_list_workspaces

List all Loom workspaces accessible to the authenticated user, including workspace names and member information.

Operation
Read read
Full name
loom.loom_list_workspaces
ParameterTypeRequiredDescription
No parameters.

loom_list_folders

List Loom folders. Returns folder names, IDs, and video counts. Use limit and page for pagination.

Operation
Read read
Full name
loom.loom_list_folders
ParameterTypeRequiredDescription
limit integer no Maximum number of folders to return (default: 20).
page integer no Page number for pagination (default: 1).

loom_get_folder

Get detailed information about a specific Loom folder by its ID, including name, video count, and hierarchy.

Operation
Read read
Full name
loom.loom_get_folder
ParameterTypeRequiredDescription
folder_id string yes The unique identifier of the Loom folder.

loom_get_current_user

Get the authenticated Loom user's profile information, including name, email, and account details.

Operation
Read read
Full name
loom.loom_get_current_user
ParameterTypeRequiredDescription
No parameters.