KosmoKrator

data

Builder.io Lua API for KosmoKrator Agents

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

7 functions 6 read 1 write API key auth

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.

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

NameTypeRequiredDescription
limitintegernoMaximum number of models to return.
offsetintegernoNumber 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

NameTypeRequiredDescription
model_idstringyesThe 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

NameTypeRequiredDescription
model_namestringyesThe model name to list content for (e.g. “page”, “blog-post”).
limitintegernoMaximum number of entries to return.
offsetintegernoNumber of entries to skip for pagination.
querystringnoQuery string to filter content entries.
fieldsstringnoComma-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

NameTypeRequiredDescription
content_idstringyesThe 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

NameTypeRequiredDescription
model_namestringyesThe model name for the new content entry (e.g. “page”, “blog-post”).
namestringyesThe name/title of the new content entry.
datastringyesJSON 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

NameTypeRequiredDescription
limitintegernoMaximum number of symbols to return.
offsetintegernoNumber 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.

Metadata-Derived Lua Example

local result = app.integrations.builder_io.builder_io_list_models({
  limit = 1,
  offset = 1
})
print(result)

Functions

builder_io_list_models

List all models in the Builder.io space. Optionally control pagination with limit and offset. Returns model IDs, names, kinds, and metadata.

Operation
Read read
Full name
builder-io.builder_io_list_models
ParameterTypeRequiredDescription
limit integer no Maximum number of models to return.
offset integer no Number of models to skip for pagination.

builder_io_get_model

Get detailed information about a specific Builder.io model by its ID or name. Returns the model definition including fields, kind, and metadata.

Operation
Read read
Full name
builder-io.builder_io_get_model
ParameterTypeRequiredDescription
model_id string yes The ID or name of the model to retrieve.

builder_io_list_content

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.

Operation
Read read
Full name
builder-io.builder_io_list_content
ParameterTypeRequiredDescription
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.

builder_io_get_content

Get detailed information about a specific Builder.io content entry by its ID. Returns the full entry data, model reference, and timestamps.

Operation
Read read
Full name
builder-io.builder_io_get_content
ParameterTypeRequiredDescription
content_id string yes The ID of the content entry to retrieve.

builder_io_create_content

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.

Operation
Write write
Full name
builder-io.builder_io_create_content
ParameterTypeRequiredDescription
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"}.

builder_io_list_symbols

List all symbols (reusable components) in the Builder.io space. Optionally control pagination with limit and offset. Returns symbol IDs, names, and metadata.

Operation
Read read
Full name
builder-io.builder_io_list_symbols
ParameterTypeRequiredDescription
limit integer no Maximum number of symbols to return.
offset integer no Number of symbols to skip for pagination.

builder_io_get_current_user

Get information about the currently authenticated Builder.io user. Returns the user's name, email, and account details.

Operation
Read read
Full name
builder-io.builder_io_get_current_user
ParameterTypeRequiredDescription
No parameters.