KosmoKrator

productivity

RunPod Lua API for KosmoKrator Agents

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

7 functions 7 read 0 write Bearer token auth

Lua Namespace

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

RunPod — Lua API Reference

list_pods

List all GPU pods in your RunPod account.

Parameters

None.

Example

local result = app.integrations.runpod.list_pods({})

for _, pod in ipairs(result.pods) do
  print(pod.name .. " (ID: " .. pod.pod_id .. ") — " .. pod.status)
end

get_pod

Get detailed information about a specific RunPod GPU pod.

Parameters

NameTypeRequiredDescription
pod_idstringyesThe RunPod pod ID

Example

local pod = app.integrations.runpod.get_pod({
  pod_id = "abc123def456"
})

print("Pod: " .. pod.name)
print("Status: " .. pod.status)
print("GPU: " .. pod.machine.gpuDisplayName)

list_templates

List all available RunPod templates.

Parameters

None.

Example

local result = app.integrations.runpod.list_templates({})

for _, tmpl in ipairs(result.templates) do
  print(tmpl.name .. " — " .. (tmpl.image or "no image"))
end

list_network_volumes

List all network volumes in your RunPod account.

Parameters

None.

Example

local result = app.integrations.runpod.list_network_volumes({})

for _, vol in ipairs(result.network_volumes) do
  print(vol.name .. " (" .. vol.size_in_gb .. " GB)")
end

list_endpoints

List all RunPod endpoints.

Parameters

None.

Example

local result = app.integrations.runpod.list_endpoints({})

for _, ep in ipairs(result.endpoints) do
  print(ep.name .. " — " .. (ep.status or "unknown"))
end

list_serverless

List all serverless endpoints in your RunPod account.

Parameters

None.

Example

local result = app.integrations.runpod.list_serverless({})

for _, sl in ipairs(result.serverless) do
  print(sl.name .. " — workers: " .. (sl.workers_min or 0) .. "-" .. (sl.workers_max or "?"))
end

get_current_user

Get the profile of the currently authenticated RunPod user.

Parameters

None.

Example

local user = app.integrations.runpod.get_current_user({})
print("Logged in as: " .. (user.firstName or user.username or "Unknown"))

Multi-Account Usage

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

-- Default account (always works)
app.integrations.runpod.list_pods({})

-- Explicit default (portable across setups)
app.integrations.runpod.default.list_pods({})

-- Named accounts
app.integrations.runpod.work.list_pods({})
app.integrations.runpod.personal.get_pod({ pod_id = "abc123" })

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

Raw agent markdown
# RunPod — Lua API Reference

## list_pods

List all GPU pods in your RunPod account.

### Parameters

None.

### Example

```lua
local result = app.integrations.runpod.list_pods({})

for _, pod in ipairs(result.pods) do
  print(pod.name .. " (ID: " .. pod.pod_id .. ") — " .. pod.status)
end
```

---

## get_pod

Get detailed information about a specific RunPod GPU pod.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `pod_id` | string | yes | The RunPod pod ID |

### Example

```lua
local pod = app.integrations.runpod.get_pod({
  pod_id = "abc123def456"
})

print("Pod: " .. pod.name)
print("Status: " .. pod.status)
print("GPU: " .. pod.machine.gpuDisplayName)
```

---

## list_templates

List all available RunPod templates.

### Parameters

None.

### Example

```lua
local result = app.integrations.runpod.list_templates({})

for _, tmpl in ipairs(result.templates) do
  print(tmpl.name .. " — " .. (tmpl.image or "no image"))
end
```

---

## list_network_volumes

List all network volumes in your RunPod account.

### Parameters

None.

### Example

```lua
local result = app.integrations.runpod.list_network_volumes({})

for _, vol in ipairs(result.network_volumes) do
  print(vol.name .. " (" .. vol.size_in_gb .. " GB)")
end
```

---

## list_endpoints

List all RunPod endpoints.

### Parameters

None.

### Example

```lua
local result = app.integrations.runpod.list_endpoints({})

for _, ep in ipairs(result.endpoints) do
  print(ep.name .. " — " .. (ep.status or "unknown"))
end
```

---

## list_serverless

List all serverless endpoints in your RunPod account.

### Parameters

None.

### Example

```lua
local result = app.integrations.runpod.list_serverless({})

for _, sl in ipairs(result.serverless) do
  print(sl.name .. " — workers: " .. (sl.workers_min or 0) .. "-" .. (sl.workers_max or "?"))
end
```

---

## get_current_user

Get the profile of the currently authenticated RunPod user.

### Parameters

None.

### Example

```lua
local user = app.integrations.runpod.get_current_user({})
print("Logged in as: " .. (user.firstName or user.username or "Unknown"))
```

---

## Multi-Account Usage

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

```lua
-- Default account (always works)
app.integrations.runpod.list_pods({})

-- Explicit default (portable across setups)
app.integrations.runpod.default.list_pods({})

-- Named accounts
app.integrations.runpod.work.list_pods({})
app.integrations.runpod.personal.get_pod({ pod_id = "abc123" })
```

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

Metadata-Derived Lua Example

local result = app.integrations.runpod.runpod_list_pods({})
print(result)

Functions

runpod_list_pods

List all GPU pods in your RunPod account. Returns pod IDs, names, status, GPU types, and runtime details.

Operation
Read read
Full name
runpod.runpod_list_pods
ParameterTypeRequiredDescription
No parameters.

runpod_get_pod

Get detailed information about a specific RunPod GPU pod, including its status, GPU type, runtime, ports, and configuration. Use the pod ID obtained from runpod_list_pods.

Operation
Read read
Full name
runpod.runpod_get_pod
ParameterTypeRequiredDescription
pod_id string yes The RunPod pod ID.

runpod_list_templates

List all available RunPod templates. Returns template IDs, names, images, and machine configurations.

Operation
Read read
Full name
runpod.runpod_list_templates
ParameterTypeRequiredDescription
No parameters.

runpod_list_network_volumes

List all network volumes in your RunPod account. Returns volume IDs, names, sizes, and data center information.

Operation
Read read
Full name
runpod.runpod_list_network_volumes
ParameterTypeRequiredDescription
No parameters.

runpod_list_endpoints

List all RunPod endpoints. Returns endpoint IDs, names, statuses, and configuration details.

Operation
Read read
Full name
runpod.runpod_list_endpoints
ParameterTypeRequiredDescription
No parameters.

runpod_list_serverless

List all serverless endpoints in your RunPod account. Returns endpoint IDs, names, statuses, and worker configurations.

Operation
Read read
Full name
runpod.runpod_list_serverless
ParameterTypeRequiredDescription
No parameters.

runpod_get_current_user

Get the profile of the currently authenticated RunPod user, including name, email, and account details.

Operation
Read read
Full name
runpod.runpod_get_current_user
ParameterTypeRequiredDescription
No parameters.