KosmoKrator

productivity

Render Lua API for KosmoKrator Agents

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

7 functions 6 read 1 write API key auth

Lua Namespace

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

Render — Lua API Reference

list_services

List all services in the Render account.

Parameters

NameTypeRequiredDescription
limitintegernoNumber of services per page (default: 20, max: 100)
cursorstringnoPagination cursor from a previous response

Example

local result = app.integrations.render2.list_services({
  limit = 50
})

for _, svc in ipairs(result.services) do
  print(svc.name .. " (" .. svc.type .. ") - " .. svc.status)
end

get_service

Get details for a specific Render service.

Parameters

NameTypeRequiredDescription
service_idstringyesThe service ID (e.g., "srv-cabc12345678")

Example

local result = app.integrations.render2.get_service({ service_id = "srv-cabc12345678" })
local svc = result.service
print(svc.name .. " - " .. svc.type .. " - " .. svc.url)

create_service

Create a new service on Render.

Parameters

NameTypeRequiredDescription
typestringyesService type: "web_service", "background_worker", "cron_job", or "private_service"
namestringyesName for the service
repostringyesGit repository URL (e.g., "https://github.com/user/repo")
branchstringnoGit branch to deploy (default: "main")
regionstringnoRegion: "oregon", "ohio", "frankfurt", "singapore"
planstringnoPlan: "starter", "standard", "pro", "pro_plus"
runtimestringnoRuntime: "node", "python", "ruby", "docker"
build_commandstringnoShell command to build
start_commandstringnoShell command to start
env_varsobjectnoEnvironment variables as key-value pairs

Example

local result = app.integrations.render2.create_service({
  type = "web_service",
  name = "my-api",
  repo = "https://github.com/myorg/my-api",
  branch = "main",
  region = "oregon",
  plan = "starter",
  build_command = "npm run build",
  start_command = "npm start",
  env_vars = {
    NODE_ENV = "production"
  }
})

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

list_deploys

List deploys for a specific Render service.

Parameters

NameTypeRequiredDescription
service_idstringyesThe service ID
limitintegernoNumber of deploys per page (default: 20, max: 100)
cursorstringnoPagination cursor from a previous response

Example

local result = app.integrations.render2.list_deploys({
  service_id = "srv-cabc12345678",
  limit = 10
})

for _, deploy in ipairs(result.deploys) do
  print(deploy.id .. " - " .. deploy.status .. " - " .. (deploy.commit.message or ""))
end

get_deploy

Get details for a specific deploy.

Parameters

NameTypeRequiredDescription
deploy_idstringyesThe deploy ID (e.g., "dep-cabc12345678")

Example

local result = app.integrations.render2.get_deploy({ deploy_id = "dep-cabc12345678" })
local d = result.deploy
print(d.status .. " - " .. d.commit.id .. ": " .. d.commit.message)

list_jobs

List jobs for a specific Render service.

Parameters

NameTypeRequiredDescription
service_idstringyesThe service ID
limitintegernoNumber of jobs per page (default: 20, max: 100)
cursorstringnoPagination cursor from a previous response

Example

local result = app.integrations.render2.list_jobs({
  service_id = "srv-cabc12345678",
  limit = 10
})

for _, job in ipairs(result.jobs) do
  print(job.id .. " - " .. job.status .. " - " .. job.startCommand)
end

get_current_user

Get the current authenticated account information.

Parameters

None.

Example

local result = app.integrations.render2.get_current_user({})
print("Account: " .. result.email .. " (" .. result.id .. ")")

Multi-Account Usage

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

-- Default account (always works)
app.integrations.render2.list_services({})

-- Explicit default (portable across setups)
app.integrations.render2.default.list_services({})

-- Named accounts
app.integrations.render2.production.list_services({})
app.integrations.render2.staging.list_services({})

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

Raw agent markdown
# Render — Lua API Reference

## list_services

List all services in the Render account.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Number of services per page (default: 20, max: 100) |
| `cursor` | string | no | Pagination cursor from a previous response |

### Example

```lua
local result = app.integrations.render2.list_services({
  limit = 50
})

for _, svc in ipairs(result.services) do
  print(svc.name .. " (" .. svc.type .. ") - " .. svc.status)
end
```

---

## get_service

Get details for a specific Render service.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `service_id` | string | yes | The service ID (e.g., `"srv-cabc12345678"`) |

### Example

```lua
local result = app.integrations.render2.get_service({ service_id = "srv-cabc12345678" })
local svc = result.service
print(svc.name .. " - " .. svc.type .. " - " .. svc.url)
```

---

## create_service

Create a new service on Render.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `type` | string | yes | Service type: `"web_service"`, `"background_worker"`, `"cron_job"`, or `"private_service"` |
| `name` | string | yes | Name for the service |
| `repo` | string | yes | Git repository URL (e.g., `"https://github.com/user/repo"`) |
| `branch` | string | no | Git branch to deploy (default: `"main"`) |
| `region` | string | no | Region: `"oregon"`, `"ohio"`, `"frankfurt"`, `"singapore"` |
| `plan` | string | no | Plan: `"starter"`, `"standard"`, `"pro"`, `"pro_plus"` |
| `runtime` | string | no | Runtime: `"node"`, `"python"`, `"ruby"`, `"docker"` |
| `build_command` | string | no | Shell command to build |
| `start_command` | string | no | Shell command to start |
| `env_vars` | object | no | Environment variables as key-value pairs |

### Example

```lua
local result = app.integrations.render2.create_service({
  type = "web_service",
  name = "my-api",
  repo = "https://github.com/myorg/my-api",
  branch = "main",
  region = "oregon",
  plan = "starter",
  build_command = "npm run build",
  start_command = "npm start",
  env_vars = {
    NODE_ENV = "production"
  }
})

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

---

## list_deploys

List deploys for a specific Render service.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `service_id` | string | yes | The service ID |
| `limit` | integer | no | Number of deploys per page (default: 20, max: 100) |
| `cursor` | string | no | Pagination cursor from a previous response |

### Example

```lua
local result = app.integrations.render2.list_deploys({
  service_id = "srv-cabc12345678",
  limit = 10
})

for _, deploy in ipairs(result.deploys) do
  print(deploy.id .. " - " .. deploy.status .. " - " .. (deploy.commit.message or ""))
end
```

---

## get_deploy

Get details for a specific deploy.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `deploy_id` | string | yes | The deploy ID (e.g., `"dep-cabc12345678"`) |

### Example

```lua
local result = app.integrations.render2.get_deploy({ deploy_id = "dep-cabc12345678" })
local d = result.deploy
print(d.status .. " - " .. d.commit.id .. ": " .. d.commit.message)
```

---

## list_jobs

List jobs for a specific Render service.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `service_id` | string | yes | The service ID |
| `limit` | integer | no | Number of jobs per page (default: 20, max: 100) |
| `cursor` | string | no | Pagination cursor from a previous response |

### Example

```lua
local result = app.integrations.render2.list_jobs({
  service_id = "srv-cabc12345678",
  limit = 10
})

for _, job in ipairs(result.jobs) do
  print(job.id .. " - " .. job.status .. " - " .. job.startCommand)
end
```

---

## get_current_user

Get the current authenticated account information.

### Parameters

None.

### Example

```lua
local result = app.integrations.render2.get_current_user({})
print("Account: " .. result.email .. " (" .. result.id .. ")")
```

---

## Multi-Account Usage

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

```lua
-- Default account (always works)
app.integrations.render2.list_services({})

-- Explicit default (portable across setups)
app.integrations.render2.default.list_services({})

-- Named accounts
app.integrations.render2.production.list_services({})
app.integrations.render2.staging.list_services({})
```

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

Metadata-Derived Lua Example

local result = app.integrations.render2.render_list_services({
  limit = 1,
  cursor = "example_cursor"
})
print(result)

Functions

render_list_services

List all services in the Render account. Returns service IDs, names, type, status, and URLs.

Operation
Read read
Full name
render2.render_list_services
ParameterTypeRequiredDescription
limit integer no Number of services to return per page (default: 20, max: 100).
cursor string no Pagination cursor from a previous response.

render_get_service

Get details for a specific Render service by ID. Returns full service information including type, status, URLs, and configuration.

Operation
Read read
Full name
render2.render_get_service
ParameterTypeRequiredDescription
service_id string yes The service ID (e.g., "srv-cabc12345678").

render_create_service

Create a new service on Render. Supports web services, background workers, cron jobs, and private services.

Operation
Write write
Full name
render2.render_create_service
ParameterTypeRequiredDescription
type string yes Service type: "web_service", "background_worker", "cron_job", or "private_service".
name string yes The name for the service.
repo string yes The Git repository URL (e.g., "https://github.com/user/repo").
branch string no The Git branch to deploy (default: "main").
region string no Region slug (e.g., "oregon", "ohio", "frankfurt", "singapore").
plan string no Plan type: "starter", "standard", "pro", "pro_plus" (default: "starter").
runtime string no Runtime for the service (e.g., "node", "python", "ruby", "docker").
build_command string no Shell command to build the service.
start_command string no Shell command to start the service.
env_vars object no Environment variables as key-value pairs.

render_list_deploys

List deploys for a specific Render service. Returns deploy IDs, status, commit info, and timestamps.

Operation
Read read
Full name
render2.render_list_deploys
ParameterTypeRequiredDescription
service_id string yes The service ID to list deploys for.
limit integer no Number of deploys to return per page (default: 20, max: 100).
cursor string no Pagination cursor from a previous response.

render_get_deploy

Get details for a specific Render deploy by ID. Returns full deploy information including status, commit, and logs.

Operation
Read read
Full name
render2.render_get_deploy
ParameterTypeRequiredDescription
deploy_id string yes The deploy ID (e.g., "dep-cabc12345678").

render_list_jobs

List jobs for a specific Render service. Returns job IDs, status, start command, and timestamps.

Operation
Read read
Full name
render2.render_list_jobs
ParameterTypeRequiredDescription
service_id string yes The service ID to list jobs for.
limit integer no Number of jobs to return per page (default: 20, max: 100).
cursor string no Pagination cursor from a previous response.

render_get_current_user

Get information about the current authenticated Render account, including email, name, and plan.

Operation
Read read
Full name
render2.render_get_current_user
ParameterTypeRequiredDescription
No parameters.