data
Builder.io Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Builder.io KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.builder_io.*.
Use lua_read_doc("integrations.builder-io") 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
Builder.io workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.builder_io.list_models({limit = 1, offset = 1}))' --json kosmo integrations:lua --eval 'print(docs.read("builder-io"))' --json
kosmo integrations:lua --eval 'print(docs.read("builder-io.list_models"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local builder_io = app.integrations.builder_io
local result = builder_io.list_models({limit = 1, offset = 1})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.builder_io, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.builder_io.default.* or app.integrations.builder_io.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Builder.io, 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.
Client for the Builder.io Visual CMS API covering models, content, symbols, and user info — Lua API Reference
builder_io_list_models
List all models in the Builder.io space.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of models to return. |
offset | integer | no | Number of models to skip for pagination. |
Example
local result = app.integrations.builder_io.builder_io_list_models({
limit = 25
offset = 0
})
builder_io_get_model
Get detailed information about a specific Builder.io model by its ID or name.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
model_id | string | yes | The ID or name of the model to retrieve. |
Example
local result = app.integrations.builder_io.builder_io_get_model({
model_id = "page"
})
builder_io_list_content
List content entries for a specific Builder.io model.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
model_name | string | yes | The model name to list content for (e.g. “page”, “blog-post”). |
limit | integer | no | Maximum number of entries to return. |
offset | integer | no | Number of entries to skip for pagination. |
query | string | no | Query string to filter content entries. |
fields | string | no | Comma-separated list of fields to include in the response. |
Example
local result = app.integrations.builder_io.builder_io_list_content({
model_name = "blog-post"
limit = 10
offset = 0
})
builder_io_get_content
Get detailed information about a specific Builder.io content entry by its ID.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
content_id | string | yes | The ID of the content entry to retrieve. |
Example
local result = app.integrations.builder_io.builder_io_get_content({
content_id = "abc123"
})
builder_io_create_content
Create a new content entry in Builder.io for a given model.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
model_name | string | yes | The model name for the new content entry (e.g. “page”, “blog-post”). |
name | string | yes | The name/title of the new content entry. |
data | string | yes | JSON object of content data. E.g. {"blocks": [], "title": "My Page"}. |
Example
local result = app.integrations.builder_io.builder_io_create_content({
model_name = "page"
name = "My New Page"
data = '{"title": "My Page", "blocks": []}'
})
builder_io_list_symbols
List all symbols (reusable components) in the Builder.io space.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of symbols to return. |
offset | integer | no | Number of symbols to skip for pagination. |
Example
local result = app.integrations.builder_io.builder_io_list_symbols({
limit = 25
offset = 0
})
builder_io_get_current_user
Get information about the currently authenticated Builder.io user.
Example
local result = app.integrations.builder_io.builder_io_get_current_user({
})
Multi-Account Usage
If you have multiple builder-io accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.builder_io.function_name({...})
-- Explicit default (portable across setups)
app.integrations.builder_io.default.function_name({...})
-- Named accounts
app.integrations.builder_io.work.function_name({...})
app.integrations.builder_io.personal.function_name({...})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# Client for the Builder.io Visual CMS API covering models, content, symbols, and user info — Lua API Reference
## builder_io_list_models
List all models in the Builder.io space.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Maximum number of models to return. |
| `offset` | integer | no | Number of models to skip for pagination. |
### Example
```lua
local result = app.integrations.builder_io.builder_io_list_models({
limit = 25
offset = 0
})
```
## builder_io_get_model
Get detailed information about a specific Builder.io model by its ID or name.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `model_id` | string | yes | The ID or name of the model to retrieve. |
### Example
```lua
local result = app.integrations.builder_io.builder_io_get_model({
model_id = "page"
})
```
## builder_io_list_content
List content entries for a specific Builder.io model.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `model_name` | string | yes | The model name to list content for (e.g. "page", "blog-post"). |
| `limit` | integer | no | Maximum number of entries to return. |
| `offset` | integer | no | Number of entries to skip for pagination. |
| `query` | string | no | Query string to filter content entries. |
| `fields` | string | no | Comma-separated list of fields to include in the response. |
### Example
```lua
local result = app.integrations.builder_io.builder_io_list_content({
model_name = "blog-post"
limit = 10
offset = 0
})
```
## builder_io_get_content
Get detailed information about a specific Builder.io content entry by its ID.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `content_id` | string | yes | The ID of the content entry to retrieve. |
### Example
```lua
local result = app.integrations.builder_io.builder_io_get_content({
content_id = "abc123"
})
```
## builder_io_create_content
Create a new content entry in Builder.io for a given model.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `model_name` | string | yes | The model name for the new content entry (e.g. "page", "blog-post"). |
| `name` | string | yes | The name/title of the new content entry. |
| `data` | string | yes | JSON object of content data. E.g. `{"blocks": [], "title": "My Page"}`. |
### Example
```lua
local result = app.integrations.builder_io.builder_io_create_content({
model_name = "page"
name = "My New Page"
data = '{"title": "My Page", "blocks": []}'
})
```
## builder_io_list_symbols
List all symbols (reusable components) in the Builder.io space.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Maximum number of symbols to return. |
| `offset` | integer | no | Number of symbols to skip for pagination. |
### Example
```lua
local result = app.integrations.builder_io.builder_io_list_symbols({
limit = 25
offset = 0
})
```
## builder_io_get_current_user
Get information about the currently authenticated Builder.io user.
### Example
```lua
local result = app.integrations.builder_io.builder_io_get_current_user({
})
```
---
## Multi-Account Usage
If you have multiple builder-io accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.builder_io.function_name({...})
-- Explicit default (portable across setups)
app.integrations.builder_io.default.function_name({...})
-- Named accounts
app.integrations.builder_io.work.function_name({...})
app.integrations.builder_io.personal.function_name({...})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.builder_io.list_models({limit = 1, offset = 1})
print(result) Functions
list_models Read
List all models in the Builder.io space. Optionally control pagination with limit and offset. Returns model IDs, names, kinds, and metadata.
- Lua path
app.integrations.builder_io.list_models- Full name
builder-io.builder_io_list_models
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of models to return. |
offset | integer | no | Number of models to skip for pagination. |
get_model Read
Get detailed information about a specific Builder.io model by its ID or name. Returns the model definition including fields, kind, and metadata.
- Lua path
app.integrations.builder_io.get_model- Full name
builder-io.builder_io_get_model
| Parameter | Type | Required | Description |
|---|---|---|---|
model_id | string | yes | The ID or name of the model to retrieve. |
list_content Read
List content entries for a specific Builder.io model. Optionally control pagination with limit and offset, or filter with a query string. Returns entry IDs, names, and data.
- Lua path
app.integrations.builder_io.list_content- Full name
builder-io.builder_io_list_content
| Parameter | Type | Required | Description |
|---|---|---|---|
model_name | string | yes | The model name to list content for (e.g. "page", "blog-post"). |
limit | integer | no | Maximum number of entries to return. |
offset | integer | no | Number of entries to skip for pagination. |
query | string | no | Query string to filter content entries. |
fields | string | no | Comma-separated list of fields to include in the response. |
get_content Read
Get detailed information about a specific Builder.io content entry by its ID. Returns the full entry data, model reference, and timestamps.
- Lua path
app.integrations.builder_io.get_content- Full name
builder-io.builder_io_get_content
| Parameter | Type | Required | Description |
|---|---|---|---|
content_id | string | yes | The ID of the content entry to retrieve. |
create_content Write
Create a new content entry in Builder.io for a given model. Provide the model name and a JSON object with the content data. The entry is created as a draft by default.
- Lua path
app.integrations.builder_io.create_content- Full name
builder-io.builder_io_create_content
| Parameter | Type | Required | Description |
|---|---|---|---|
model_name | string | yes | The model name for the new content entry (e.g. "page", "blog-post"). |
name | string | yes | The name/title of the new content entry. |
data | string | yes | JSON object of content data. E.g. {"blocks": [], "title": "My Page"}. |
list_symbols Read
List all symbols (reusable components) in the Builder.io space. Optionally control pagination with limit and offset. Returns symbol IDs, names, and metadata.
- Lua path
app.integrations.builder_io.list_symbols- Full name
builder-io.builder_io_list_symbols
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Maximum number of symbols to return. |
offset | integer | no | Number of symbols to skip for pagination. |
get_current_user Read
Get information about the currently authenticated Builder.io user. Returns the user's name, email, and account details.
- Lua path
app.integrations.builder_io.get_current_user- Full name
builder-io.builder_io_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||