productivity
RunPod Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the RunPod KosmoKrator integration.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.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
RunPod workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.runpod.list({}))' --json kosmo integrations:lua --eval 'print(docs.read("runpod"))' --json
kosmo integrations:lua --eval 'print(docs.read("runpod.list"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local runpod = app.integrations.runpod
local result = runpod.list({})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.runpod, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.runpod.default.* or app.integrations.runpod.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need RunPod, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json 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
| Name | Type | Required | Description |
|---|---|---|---|
pod_id | string | yes | The 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. local result = app.integrations.runpod.list({})
print(result) Functions
list Read
List all GPU pods in your RunPod account. Returns pod IDs, names, status, GPU types, and runtime details.
- Lua path
app.integrations.runpod.list- Full name
runpod.runpod_list_pods
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get Read
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.
- Lua path
app.integrations.runpod.get- Full name
runpod.runpod_get_pod
| Parameter | Type | Required | Description |
|---|---|---|---|
pod_id | string | yes | The RunPod pod ID. |
list_templates Read
List all available RunPod templates. Returns template IDs, names, images, and machine configurations.
- Lua path
app.integrations.runpod.list_templates- Full name
runpod.runpod_list_templates
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_network_volumes Read
List all network volumes in your RunPod account. Returns volume IDs, names, sizes, and data center information.
- Lua path
app.integrations.runpod.list_network_volumes- Full name
runpod.runpod_list_network_volumes
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_endpoints Read
List all RunPod endpoints. Returns endpoint IDs, names, statuses, and configuration details.
- Lua path
app.integrations.runpod.list_endpoints- Full name
runpod.runpod_list_endpoints
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_serverless Read
List all serverless endpoints in your RunPod account. Returns endpoint IDs, names, statuses, and worker configurations.
- Lua path
app.integrations.runpod.list_serverless- Full name
runpod.runpod_list_serverless
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_current_user Read
Get the profile of the currently authenticated RunPod user, including name, email, and account details.
- Lua path
app.integrations.runpod.get_current_user- Full name
runpod.runpod_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||