productivity
Basecamp 3 Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Basecamp 3 KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.basecamp.*.
Use lua_read_doc("integrations.basecamp") 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
Basecamp 3 workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.basecamp.list_projects({}))' --json kosmo integrations:lua --eval 'print(docs.read("basecamp"))' --json
kosmo integrations:lua --eval 'print(docs.read("basecamp.list_projects"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local basecamp = app.integrations.basecamp
local result = basecamp.list_projects({})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.basecamp, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.basecamp.default.* or app.integrations.basecamp.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Basecamp 3, 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.
Basecamp 3 — Lua API Reference
list_projects
List all Basecamp projects visible to the authenticated user.
Parameters
None required.
Example
local result = app.integrations.basecamp.list_projects({})
for _, project in ipairs(result) do
print(project.id .. ": " .. project.name)
end
get_project
Get details for a single Basecamp project.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | The Basecamp project ID |
Example
local result = app.integrations.basecamp.get_project({
project_id = 12345
})
print("Project: " .. result.name)
print("Description: " .. (result.description or "none"))
list_todos
List to-dos in a specific Basecamp to-do list.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | The Basecamp project ID |
todoset_id | integer | yes | The to-do set (bucket) ID within the project |
todolist_id | integer | yes | The specific to-do list ID |
Example
local result = app.integrations.basecamp.list_todos({
project_id = 12345,
todoset_id = 67890,
todolist_id = 11111
})
for _, todo in ipairs(result) do
print(todo.content .. (todo.completed and " ✓" or " ○"))
end
create_todo
Create a new to-do in a Basecamp to-do list.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | The Basecamp project ID |
todoset_id | integer | yes | The to-do set (bucket) ID within the project |
todolist_id | integer | yes | The specific to-do list ID |
content | string | yes | The to-do text |
description | string | no | Extended description (HTML supported) |
due_on | string | no | Due date in ISO 8601 format (e.g., “2026-04-30”) |
assignee_ids | array | no | List of person IDs to assign (e.g., {1234, 5678}) |
Example
local result = app.integrations.basecamp.create_todo({
project_id = 12345,
todoset_id = 67890,
todolist_id = 11111,
content = "Review the latest pull request",
description = "Check PR #42 for the auth module changes",
due_on = "2026-04-30"
})
print("Created to-do: " .. result.content)
list_messages
List messages (message board posts) for a Basecamp project.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | The Basecamp project ID |
Example
local result = app.integrations.basecamp.list_messages({
project_id = 12345
})
for _, msg in ipairs(result) do
print(msg.subject .. " by " .. (msg.creator.name or "unknown"))
end
get_message
Get a single message from a Basecamp project.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | The Basecamp project ID |
message_id | integer | yes | The message (board post) ID |
Example
local result = app.integrations.basecamp.get_message({
project_id = 12345,
message_id = 99999
})
print("Subject: " .. result.subject)
print("By: " .. result.creator.name)
get_current_user
Get the profile of the currently authenticated Basecamp user.
Parameters
None required.
Example
local result = app.integrations.basecamp.get_current_user({})
print("Logged in as: " .. result.first_name .. " " .. result.last_name)
print("Email: " .. result.email_address)
Multi-Account Usage
If you have multiple Basecamp accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.basecamp.function_name({...})
-- Explicit default (portable across setups)
app.integrations.basecamp.default.function_name({...})
-- Named accounts
app.integrations.basecamp.work.function_name({...})
app.integrations.basecamp.client.function_name({...})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# Basecamp 3 — Lua API Reference
## list_projects
List all Basecamp projects visible to the authenticated user.
### Parameters
*None required.*
### Example
```lua
local result = app.integrations.basecamp.list_projects({})
for _, project in ipairs(result) do
print(project.id .. ": " .. project.name)
end
```
---
## get_project
Get details for a single Basecamp project.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | integer | yes | The Basecamp project ID |
### Example
```lua
local result = app.integrations.basecamp.get_project({
project_id = 12345
})
print("Project: " .. result.name)
print("Description: " .. (result.description or "none"))
```
---
## list_todos
List to-dos in a specific Basecamp to-do list.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | integer | yes | The Basecamp project ID |
| `todoset_id` | integer | yes | The to-do set (bucket) ID within the project |
| `todolist_id` | integer | yes | The specific to-do list ID |
### Example
```lua
local result = app.integrations.basecamp.list_todos({
project_id = 12345,
todoset_id = 67890,
todolist_id = 11111
})
for _, todo in ipairs(result) do
print(todo.content .. (todo.completed and " ✓" or " ○"))
end
```
---
## create_todo
Create a new to-do in a Basecamp to-do list.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | integer | yes | The Basecamp project ID |
| `todoset_id` | integer | yes | The to-do set (bucket) ID within the project |
| `todolist_id` | integer | yes | The specific to-do list ID |
| `content` | string | yes | The to-do text |
| `description` | string | no | Extended description (HTML supported) |
| `due_on` | string | no | Due date in ISO 8601 format (e.g., "2026-04-30") |
| `assignee_ids` | array | no | List of person IDs to assign (e.g., {1234, 5678}) |
### Example
```lua
local result = app.integrations.basecamp.create_todo({
project_id = 12345,
todoset_id = 67890,
todolist_id = 11111,
content = "Review the latest pull request",
description = "Check PR #42 for the auth module changes",
due_on = "2026-04-30"
})
print("Created to-do: " .. result.content)
```
---
## list_messages
List messages (message board posts) for a Basecamp project.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | integer | yes | The Basecamp project ID |
### Example
```lua
local result = app.integrations.basecamp.list_messages({
project_id = 12345
})
for _, msg in ipairs(result) do
print(msg.subject .. " by " .. (msg.creator.name or "unknown"))
end
```
---
## get_message
Get a single message from a Basecamp project.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | integer | yes | The Basecamp project ID |
| `message_id` | integer | yes | The message (board post) ID |
### Example
```lua
local result = app.integrations.basecamp.get_message({
project_id = 12345,
message_id = 99999
})
print("Subject: " .. result.subject)
print("By: " .. result.creator.name)
```
---
## get_current_user
Get the profile of the currently authenticated Basecamp user.
### Parameters
*None required.*
### Example
```lua
local result = app.integrations.basecamp.get_current_user({})
print("Logged in as: " .. result.first_name .. " " .. result.last_name)
print("Email: " .. result.email_address)
```
---
## Multi-Account Usage
If you have multiple Basecamp accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.basecamp.function_name({...})
-- Explicit default (portable across setups)
app.integrations.basecamp.default.function_name({...})
-- Named accounts
app.integrations.basecamp.work.function_name({...})
app.integrations.basecamp.client.function_name({...})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.basecamp.list_projects({})
print(result) Functions
list_projects Read
List all Basecamp projects visible to the authenticated user. Returns project names, IDs, descriptions, and creation dates.
- Lua path
app.integrations.basecamp.list_projects- Full name
basecamp.basecamp_list_projects
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
get_project Read
Get details for a single Basecamp project by ID. Returns the project name, description, members, and metadata.
- Lua path
app.integrations.basecamp.get_project- Full name
basecamp.basecamp_get_project
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | The Basecamp project ID. |
list_dos Read
List to-dos in a Basecamp to-do list. Requires the project ID, to-do set ID, and to-do list ID. Returns to-do items with their content, completion status, assignees, and due dates.
- Lua path
app.integrations.basecamp.list_dos- Full name
basecamp.basecamp_list_todos
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | The Basecamp project ID. |
todoset_id | integer | yes | The to-do set (bucket) ID within the project. Typically found in the project's "todolists" tool. |
todolist_id | integer | yes | The specific to-do list ID to retrieve to-dos from. |
create_do Write
Create a new to-do in a Basecamp to-do list. Specify the project, to-do set, to-do list, and to-do text. Optionally include a description, due date, and assignee IDs.
- Lua path
app.integrations.basecamp.create_do- Full name
basecamp.basecamp_create_todo
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | The Basecamp project ID. |
todoset_id | integer | yes | The to-do set (bucket) ID within the project. |
todolist_id | integer | yes | The specific to-do list ID to add the to-do to. |
content | string | yes | The to-do text (e.g., "Review pull request"). |
description | string | no | Extended description for the to-do. Supports HTML formatting. |
due_on | string | no | Due date in ISO 8601 format (e.g., "2026-04-30"). |
assignee_ids | array | no | List of person IDs to assign (e.g., [1234, 5678]). |
list_messages Read
List messages (message board posts) for a Basecamp project. Returns message subjects, content excerpts, authors, and timestamps.
- Lua path
app.integrations.basecamp.list_messages- Full name
basecamp.basecamp_list_messages
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | The Basecamp project ID. |
get_message Read
Get a single message from a Basecamp project by ID. Returns the full message subject, content, author, and metadata.
- Lua path
app.integrations.basecamp.get_message- Full name
basecamp.basecamp_get_message
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | The Basecamp project ID. |
message_id | integer | yes | The message (board post) ID. |
get_current_user Read
Get the profile of the currently authenticated Basecamp user. Returns name, email, avatar, and account details.
- Lua path
app.integrations.basecamp.get_current_user- Full name
basecamp.basecamp_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||