productivity
Kamatera Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Kamatera KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.kamatera.*.
Use lua_read_doc("integrations.kamatera") 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
Kamatera workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.kamatera.list_servers({}))' --json kosmo integrations:lua --eval 'print(docs.read("kamatera"))' --json
kosmo integrations:lua --eval 'print(docs.read("kamatera.list_servers"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local kamatera = app.integrations.kamatera
local result = kamatera.list_servers({})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.kamatera, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.kamatera.default.* or app.integrations.kamatera.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Kamatera, 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.
Kamatera — Lua API Reference
list_servers
List all cloud servers in the account.
Parameters
None.
Example
local result = app.integrations.kamatera.list_servers({})
for _, server in ipairs(result.servers) do
print(server.name .. " (" .. server.status .. ") - " .. server.cpu .. " CPU / " .. server.ram .. " MB RAM")
end
get_server
Get details for a specific cloud server.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The server ID |
Example
local result = app.integrations.kamatera.get_server({ id = "server-abc123" })
local s = result.server
print(s.name .. " - " .. s.datacenter .. " - " .. s.image .. " - " .. s.status)
create_server
Create a new cloud server.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | yes | The server name |
datacenter | string | yes | The datacenter ID (e.g. “IL-JER”) |
image | string | yes | The image ID or OS name |
cpu | integer | yes | Number of vCPUs |
ram | integer | yes | RAM in MB |
disk | integer | yes | Disk size in GB |
password | string | no | Root password (auto-generated if omitted) |
network | string | no | Network ID to attach the server to |
quantity | integer | no | Number of servers to create |
Example
local result = app.integrations.kamatera.create_server({
name = "web-server-01",
datacenter = "IL-JER",
image = "ubuntu_22.04",
cpu = 2,
ram = 4096,
disk = 50,
})
print("Server created: " .. result.id)
list_networks
List all networks in the account.
Parameters
None.
Example
local result = app.integrations.kamatera.list_networks({})
for _, network in ipairs(result.networks) do
print(network.id .. " - " .. network.name .. " - " .. network.cidr .. " (" .. network.datacenter .. ")")
end
list_images
List all available images for server creation.
Parameters
None.
Example
local result = app.integrations.kamatera.list_images({})
for _, image in ipairs(result.images) do
print(image.id .. " - " .. image.name .. " - " .. image.os)
end
list_datacenters
List all available datacenter locations.
Parameters
None.
Example
local result = app.integrations.kamatera.list_datacenters({})
for _, dc in ipairs(result.datacenters) do
print(dc.id .. " - " .. dc.name .. ", " .. dc.country)
end
get_current_user
Get the current authenticated account information.
Parameters
None.
Example
local result = app.integrations.kamatera.get_current_user({})
print("Account: " .. (result.account.email or result.user.email))
Multi-Account Usage
If you have multiple Kamatera accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.kamatera.list_servers({})
-- Explicit default (portable across setups)
app.integrations.kamatera.default.list_servers({})
-- Named accounts
app.integrations.kamatera.production.list_servers({})
app.integrations.kamatera.staging.list_servers({})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# Kamatera — Lua API Reference
## list_servers
List all cloud servers in the account.
### Parameters
None.
### Example
```lua
local result = app.integrations.kamatera.list_servers({})
for _, server in ipairs(result.servers) do
print(server.name .. " (" .. server.status .. ") - " .. server.cpu .. " CPU / " .. server.ram .. " MB RAM")
end
```
---
## get_server
Get details for a specific cloud server.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The server ID |
### Example
```lua
local result = app.integrations.kamatera.get_server({ id = "server-abc123" })
local s = result.server
print(s.name .. " - " .. s.datacenter .. " - " .. s.image .. " - " .. s.status)
```
---
## create_server
Create a new cloud server.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `name` | string | yes | The server name |
| `datacenter` | string | yes | The datacenter ID (e.g. "IL-JER") |
| `image` | string | yes | The image ID or OS name |
| `cpu` | integer | yes | Number of vCPUs |
| `ram` | integer | yes | RAM in MB |
| `disk` | integer | yes | Disk size in GB |
| `password` | string | no | Root password (auto-generated if omitted) |
| `network` | string | no | Network ID to attach the server to |
| `quantity` | integer | no | Number of servers to create |
### Example
```lua
local result = app.integrations.kamatera.create_server({
name = "web-server-01",
datacenter = "IL-JER",
image = "ubuntu_22.04",
cpu = 2,
ram = 4096,
disk = 50,
})
print("Server created: " .. result.id)
```
---
## list_networks
List all networks in the account.
### Parameters
None.
### Example
```lua
local result = app.integrations.kamatera.list_networks({})
for _, network in ipairs(result.networks) do
print(network.id .. " - " .. network.name .. " - " .. network.cidr .. " (" .. network.datacenter .. ")")
end
```
---
## list_images
List all available images for server creation.
### Parameters
None.
### Example
```lua
local result = app.integrations.kamatera.list_images({})
for _, image in ipairs(result.images) do
print(image.id .. " - " .. image.name .. " - " .. image.os)
end
```
---
## list_datacenters
List all available datacenter locations.
### Parameters
None.
### Example
```lua
local result = app.integrations.kamatera.list_datacenters({})
for _, dc in ipairs(result.datacenters) do
print(dc.id .. " - " .. dc.name .. ", " .. dc.country)
end
```
---
## get_current_user
Get the current authenticated account information.
### Parameters
None.
### Example
```lua
local result = app.integrations.kamatera.get_current_user({})
print("Account: " .. (result.account.email or result.user.email))
```
---
## Multi-Account Usage
If you have multiple Kamatera accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.kamatera.list_servers({})
-- Explicit default (portable across setups)
app.integrations.kamatera.default.list_servers({})
-- Named accounts
app.integrations.kamatera.production.list_servers({})
app.integrations.kamatera.staging.list_servers({})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.kamatera.list_servers({})
print(result) Functions
list_servers Read
List all cloud servers in the Kamatera account. Returns IDs, names, status, and configuration details.
- Lua path
app.integrations.kamatera.list_servers- Full name
kamatera.kamatera_list_servers
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_server Read
Get details for a specific Kamatera cloud server by ID. Returns full server information including status, CPU, RAM, disk, and IP addresses.
- Lua path
app.integrations.kamatera.get_server- Full name
kamatera.kamatera_get_server
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The server ID. |
create_server Write
Create a new cloud server in Kamatera. Requires a name, datacenter, image, CPU count, RAM, and disk size.
- Lua path
app.integrations.kamatera.create_server- Full name
kamatera.kamatera_create_server
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | The server name. |
datacenter | string | yes | The datacenter ID (e.g. "IL-JER"). |
image | string | yes | The image ID or name for the OS to install. |
cpu | integer | yes | Number of vCPUs. |
ram | integer | yes | RAM in MB. |
disk | integer | yes | Disk size in GB. |
password | string | no | Root password for the server. Auto-generated if omitted. |
network | string | no | Network ID to attach the server to. |
quantity | integer | no | Number of servers to create with this configuration. |
list_networks Read
List all networks in the Kamatera account. Returns network IDs, names, datacenter, and CIDR details.
- Lua path
app.integrations.kamatera.list_networks- Full name
kamatera.kamatera_list_networks
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_images Read
List all available images for server creation in Kamatera. Returns image IDs, names, OS type, and sizes.
- Lua path
app.integrations.kamatera.list_images- Full name
kamatera.kamatera_list_images
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
list_datacenters Read
List all available Kamatera datacenter locations. Returns datacenter IDs, names, city, and country.
- Lua path
app.integrations.kamatera.list_datacenters- Full name
kamatera.kamatera_list_datacenters
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_current_user Read
Get information about the current authenticated Kamatera account, including email, name, and account details.
- Lua path
app.integrations.kamatera.get_current_user- Full name
kamatera.kamatera_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||